Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

house_of_botcake: demonstrate how to malloc back to stack_var #205

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tesuji
Copy link

@tesuji tesuji commented Feb 21, 2025

Currently a draft now to gather reviews before fixing all other versions across glibc.

@Kyle-Kyle
Copy link
Contributor

This is essentially using the chunk overlapping primitive to perform a tcache poisoning attack, which makes it clearer for beginners to realize the power of the technique.
However, I'm a little hesitant about merging this because chunk overlapping is a powerful primitive by itself, more than just the ability to perform tcache poisoning attack (for example, read/write other objects).

I think if you could add a sentence explaining what you could do with the chunk overlapping primitive (directly read/write objects, heap metadata etc) and say tcache poisoning attack is just one of them (write to heap metadata) will be great.

@tesuji
Copy link
Author

tesuji commented Feb 21, 2025

Here is a part of the output from the new changes:
image

I'm not great with words so I'm very happy to have feedback.


puts("Get the overlapping chunk from the unsorted bin.");
intptr_t *unsorted = malloc(0x100 + 0x100 + 0x10);
puts("Use the overlapping chunk to control a->next pointer.");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
puts("Use the overlapping chunk to control a->next pointer.");
puts("Use the overlapping chunk to control victim->next pointer.");

@Kyle-Kyle
Copy link
Contributor

that looks great. Can you please make the changes to all other files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants