Created
April 11, 2018 18:23
-
-
Save DhavalKapil/7f8ade7f7023b6b30ae46f4baa1b1597 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
int main() { | |
uintptr_t *p1 = malloc(0); | |
uintptr_t *p2 = malloc(0); | |
free(p2); | |
// UAF | |
*p2 = (uintptr_t)p2 - 0x10; | |
uintptr_t *p3 = malloc(0); | |
fprintf(stderr, "Fastbin loop: %p,%p,%p\n", p3, malloc(0), malloc(0)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment