Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: [Full-disclosure] exploitation ideas under memory pressure

From: Tavis Ormandy (tavisocmpxchg8b.com)
Date: Fri May 17 2013 - 19:44:58 CDT

On Fri, May 17, 2013 at 02:26:10PM -0700, Tavis Ormandy wrote:
> The question is how to get PATHALLOC() to succeed under memory pressure so we
> can make this exploitable, my first thought was have another thread
> manipulating the free pool, but I can't figure out how to synchronize
> that. Getting code execution should be trivial after this.
> I guess it's possible to just race it until we win, but this seems like an
> inelegant solution. Anyone have any ideas?

Ahh, I just realised a really cute trick, we can make PATHREC->next
point to the same userspace PATHREC, and EPATHOBJ::bFlatten will spin
forever traversing an infinite linked list.


PathRecord->next = PathRecord;

While it's spinning, another thread can clean up the pool, then patch
the listnode (because it's in userspace), to break into pprFlattenRec!
Turning this into a clean write-what-where should be trivial.

Anyone want to volunteer to write it up over the weekend? :)


Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/