-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add the house of Io attack #210
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
Conversation
|
Thanks for bringing up house-of-io again! I think there was a discussion about house-of-io in the past (maybe internally or maybe on how2heap, I can't remember the details) and we decided not to include it due to the need of very special primitives (such as underflow or free of tcache metadata under a very special ordering and structs). But I think now the UAF variant has a bit more value since it got patched and the behavior is different in the latest glibc. I'll suggest you to modify the PR as follows (and sorry for the extra work)
Feel free to share what you think about the plan. I'm open to discussion. |
|
You are absolutely correct wrt. the constraints of house of io. I pretty much only wanted to add it for completeness sake. As far as issues or anything, I haven't found any here specifically on house of io. As I don't see anything wrong with your suggestions, I have implemented all the changes :) |
|
I just realized you can generate a libc pointer with the metadata poisoning, even if you can only ever allocate and free one chunk. Should I also include that as a bonus maybe? |
|
The new changes look good! I'd love to merge it. But before that, let's discuss your question.
I'm not sure what you mean here. Do you mean putting the tcache metadata region into unsorted bin (or something similar) so you can allocate into libc? |
|
also, can you please fix the CI issue? |
What I meant is that when you can manipulate the metadata struct you can change the count to 7, filling the tcache without having to free 7 times. This would be helpful when you are constrained in how you can free. But I guess it's a very niche problem. |
I'll try my luck first tomorrow and let you know if I can't figure it out :D |
In that case, I guess we can just leave it out because I believe people can figure it out pretty easily with the help of existing tcache_metadata_poisoning (you do touch the count at the end of the technique) |
|
Now everything passes. |
House of Io has been described in this blog article.
It's an attack which bypasses the safe-linking by abusing the fact that pointers in the tcache management struct are not protected.
This attack only works in libc versions 2.29 - 2.33, as in those versions the key for a free'd tcache chunk is the pointer to the management struct. Afterwards the key is a random value.
As it was missing I thought of implementing the PoC.