The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.
typedef struct {
unsigned char e_ident[EI_NIDENT];
uint16_t e_type;| /* Similar to overlapping_chunks.c (from how2heap) with a small change. | |
| * Instead of overwriting size of unsorted chunk, overwrite size of small chunk. | |
| * Now you have to malloc the original size to retrieve this chunk | |
| * Freeing again will now create an overlapped chunk in the unsorted bin which | |
| * can later be retrieved using malloc(corrupt_size); | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| int main() { | |
| uintptr_t *p1 = malloc(0); | |
| uintptr_t *p2 = malloc(0); | |
| free(p2); |
I hereby claim:
To claim this, I am signing this object: