Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dguerri committed Sep 3, 2024
1 parent ee73c0d commit 999d7fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _posts/2024-09-02-one-byte-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ chunk_03 = malloc() # Spacer chunk
chunk_vt = malloc() # This will be our fake vtable.
```

Leveraging the off-by-one bug, we resize `chunk_01` from `0x60` to `0xc0` bytes (`0xc0,` as we need to account for the `prev_inuse` flag).
Leveraging the off-by-one bug, we resize `chunk_01` from `0x60` to `0xc0` bytes (`0xc1`, as we need to account for the `prev_inuse` flag).

```python
# Create a fake 0xc0 bytes chunk
Expand Down Expand Up @@ -450,4 +450,4 @@ For the curious, we could get `0x7X` bytes chunks in the corresponding fastbin,
3. allocating 2 `0x60` chunk, and receiving for the second allocation the `0x70` by exhaustion of a reminder chunk;
4. freeing the `0x70` chunk.
Unfortunately, since malloc always allocates only by exact size match from fastbins, there is no way we can claim that memory back to follow the `fd` pointers and get the target memory region on the heap or GLibC.
Unfortunately, since malloc always allocates only by exact size match from fastbins, there is no way we can claim that memory back to follow the `fd` pointers and get the target memory region on the heap or GLibC.

0 comments on commit 999d7fe

Please sign in to comment.