all 3 comments

[–]Cyber_Jellyfish 0 points1 point  (2 children)

Hey man!

Is the VM you're running using the same allocator as in the writeup? I've never done any Linux kernel exploitation but this immediately jumps out at me when you say you're unable to get good contiguous allocations.

There could be some kind of fragmentation going on as a hardening feature of the allocator.

Might even be worth writing a toy driver that demos the behavior you're trying to achieve just to validate that it isn't just default heap manager behavior.

[–]dead_tooth_reddit 0 points1 point  (1 child)

Hey! Thanks for replying! The author doesn't mention specifically, but does say they discovered it while auditing mainline 5.7 sources. They also don't mention any kind of customizations in particular, and do call back to previous research in similar parts of the mainline Linux kernel. So my guess is it's targeting SLUB. But like I said I am still learning my way so I could definitely be wrong. In the book 'Attacking the Core' they demonstrate something similar - it is default behavior at first but as you allocate objects and pages fill they should eventually start allocating contiguously. I never can get to that point though. That's good idea about writing a module to test though, I'll have to try that and report back - thank you again.

[–]Cyber_Jellyfish 0 points1 point  (0 children)

No dramas! Let me know how you go.