-
Notifications
You must be signed in to change notification settings - Fork 886
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
Question about secure mode and relationship to DieHarder #161
Comments
Hi Insu -- I skimmed the paper and it looks like very interesting work!
These mitigations all help against buffer overflow exploits. However, they do not yet mitigate against other application bugs like double free :-( I would like to harden the secure mode further though and add further checks like invalid pointer free's and detecting free list corruption (both easy to add). Double free detection is harder though to do efficiently. Anyway, if you are interested I would like to learn more how we can further strengthen the secure mode of mimalloc; Feel free to contact me by email to discuss it more. |
To follow up, in the latest I hope this will be interesting to check with your new tool. Ps: to enable the more secure mode, define |
Thanks you for your quick reply. Let me try the more secure version and let you know. |
If I compiled correctly,
This gives me very reliable chunk overlaps even with MI_SECURE=4 |
Ouch -- just pushed a fix (the wrong block was tested for free list membership before). I think the current method should catch the vast majority of double-free bugs (with
It feels like situation 1 is generally unavoidable if one wants a reasonable efficient implementation that re-uses memory well??? |
Thanks. Let me check the latest version. We also think the situation 1 is unavoidable. For example, we don't consider the case like
|
Ok. I tested it. As you mentioned, ArcHeap can find some cases that overlapping chunks can happen, but it is not reliable as before, which was nearly 100%. |
Well -- I hope you will still email me as I am quite interested to learn more on how to make mimalloc more secure and perhpaps we can work together on more advanced mitigation; it would be great to protect in-depth against any future as yet unknown attack modes (like the guard pages do). Best, Daan |
Sure. I think it would be nice to eliminate this kind of case completely. We also applied ArcHeap to other allocators and found many exploit primitives, but failed for Scudo, Guader, and FreeGaurd. Maybe it would be interesting to see how they handle such cases and we can do the similar thing with mimalloc without losing too much performance. Then, I think it would be better to leave this issue and close later. |
FYI, we open-sourced our tool (https://github.com/sslab-gatech/ArcHeap). |
Hi, all.
I am currently evaluating my tool, ArcHeap: https://arxiv.org/pdf/1903.00503.pdf
I saw mimalloc has secure mode, so I am testing it with my tool.
And it seems it has the similar bug with DieHarder (https://github.com/emeryberger/DieHard).
This PoC always returns overlapping chunk in my Linux machine.
Does it based on https://github.com/emeryberger/DieHard, so it has the same bug?
Or is it just collision?
The text was updated successfully, but these errors were encountered: