File tree 12 files changed +10
-30
lines changed
12 files changed +10
-30
lines changed Original file line number Diff line number Diff line change 9
9
#define SIZE_SZ sizeof(size_t)
10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
- // same for x86_64 and x86
13
12
#define MALLOC_ALIGN (SIZE_SZ*2)
14
13
#define MALLOC_MASK (-MALLOC_ALIGN)
15
14
28
27
/**
29
28
* Tested on:
30
29
* + GLIBC 2.23 (x86_64, x86 & aarch64)
31
- * + GLIBC 2.39 (x86_64, x86 & aarch64)
32
- * + GLIBC 2.34 (x86_64, x86 & aarch64)
33
- * + GLIBC 2.31 (x86_64, x86 & aarch64)
34
- * + GLIBC 2.27 (x86_64, x86 & aarch64)
35
30
*
36
31
* sysmalloc allows us to free() the top chunk of heap to create nearly arbitrary bins,
37
32
* which can be used to corrupt heap without needing to call free() directly.
Original file line number Diff line number Diff line change 9
9
#define SIZE_SZ sizeof(size_t)
10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
- // same for x86_64 and x86
13
12
#define MALLOC_ALIGN (SIZE_SZ*2)
14
13
#define MALLOC_MASK (-MALLOC_ALIGN)
15
14
28
27
/**
29
28
* Tested on:
30
29
* + GLIBC 2.23 (x86_64, x86 & aarch64)
31
- * + GLIBC 2.39 (x86_64, x86 & aarch64)
32
- * + GLIBC 2.34 (x86_64, x86 & aarch64)
33
- * + GLIBC 2.31 (x86_64, x86 & aarch64)
34
- * + GLIBC 2.27 (x86_64, x86 & aarch64)
35
30
*
36
31
* sysmalloc allows us to free() the top chunk of heap to create nearly arbitrary bins,
37
32
* which can be used to corrupt heap without needing to call free() directly.
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
Original file line number Diff line number Diff line change 10
10
11
11
#define CHUNK_HDR_SZ (SIZE_SZ*2)
12
12
// same for x86_64 and x86
13
- #define MALLOC_ALIGN (SIZE_SZ*2)
13
+ #define MALLOC_ALIGN 0x10
14
14
#define MALLOC_MASK (-MALLOC_ALIGN)
15
15
16
16
#define PAGESIZE sysconf(_SC_PAGESIZE)
27
27
28
28
/**
29
29
* Tested on:
30
- * + GLIBC 2.23 (x86_64, x86 & aarch64)
31
30
* + GLIBC 2.39 (x86_64, x86 & aarch64)
32
31
* + GLIBC 2.34 (x86_64, x86 & aarch64)
33
32
* + GLIBC 2.31 (x86_64, x86 & aarch64)
You can’t perform that action at this time.
0 commit comments