(1) Can I also ask how you found this?
Were you fuzzing Iokit?
(2) I'm trying to work through your ROP. Can you explain a bit more? Thanks.
(2) I'm trying to work through your ROP. Can you explain a bit more? Thanks.
2) When IOServiceRelease is called, vtable+0x20 is called. the vtable pointer is controlled, at +0x20 I place a stack pivot, which sets RSP = RAX and pops 3 times. At 0x20 I place a POP RAX;RET gadget to let the chain begin after 0x28. Payload then locates the credentials structure, sets UID to 0 by bzero()ing, cleans up the memory corruption, decreases the task count for current user and increases task count for root. It then unlocks locks held by IOAudioEngine to prevent your audio from freezing up, and then returns to the userland context.