vendor:
Mac OS X
by:
Ian Beer
7,8
CVSS
HIGH
Race Condition
362
CWE
Product Name: Mac OS X
Affected Version From: iOS and OS X
Affected Version To: iOS and OS X
Patch Exists: YES
Related CWE: CVE-2015-5820
CPE: o:apple:mac_os_x
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: iOS and OS X
2015
Race Condition
This exploit is a proof-of-concept (PoC) for a race condition vulnerability in the IORegistryIterator::reset() function in the XNU kernel of iOS and OS X. The vulnerability is caused by a race condition between two threads, where one thread frees the done OSOrderedSet* while the other thread calls ->release on the now free'd OSOrderedSet. This can be exploited by a malicious user to gain control of the instruction pointer, which can be used to execute arbitrary code. The PoC uses OSUnserializeXML to unserialize an OSData object with controlled contents, which puts a controlled heap allocation at the head of the kalloc.80 freelist, giving the attacker control of the instruction pointer.
Mitigation:
As a hardening measure, it is suggested to flip the location of the obfuscated and unobfuscatable pointers in the OSOrderedSet implementation.