iOS Kernel Heap Armageddon - Hakim

iOS Kernel Heap Armageddon - Hakim iOS Kernel Heap Armageddon - Hakim

28.11.2014 Views

iOS Kernel Zone Allocator 101 • zone allocator keeps a single linked list of free blocks • last memory block is first in freelist - memory is allocated backwards 0x000 0x200 0x400 0x600 0x800 0xA00 0xC00 0xE00 0x1000 head of freelist Stefan Esser • iOS Kernel Heap Armageddon REVISITED • July 2012 • 12

iOS Kernel Zone Allocator 101 • when memory is allocated the head of the freelist is returned • and the pointer stored in the free memory block is made the new head before allocation after allocation head of freelist head of freelist Stefan Esser • iOS Kernel Heap Armageddon REVISITED • July 2012 • 13

<strong>iOS</strong> <strong>Kernel</strong> Zone Allocator 101<br />

• when memory is allocated the head of the freelist is returned<br />

• and the pointer stored in the free memory block is made the new head<br />

before<br />

allocation<br />

after<br />

allocation<br />

head of freelist<br />

head of freelist<br />

Stefan Esser • <strong>iOS</strong> <strong>Kernel</strong> <strong>Heap</strong> <strong>Armageddon</strong> REVISITED • July 2012 •<br />

13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!