New issue
Advanced search Search tips
Starred by 1 user
Status: Fixed
Owner:
Closed: May 2016
Cc:



Sign in to add a comment
OS X/iOS kernel UAF racing getProperty on IOHDIXController and testNetBootMethod on IOHDIXControllerUserClient
Project Member Reported by ianbeer@google.com, Feb 12 2016 Back to list
This is perhaps a more interesting UaF than just racing testNetBootMethod calls as there looks to be a path to getting free'd memory disclosed back to userspace.

Although the copyProperty macro used by is_io_registry_entry_get_property_bin takes the entry's properties lock before reading and
taking a reference on the property the testNetBootMethod external method directly calls the overriden setProperty without
taking that same lock. ::setProperty calls ::release on all the properties before nulling them out then replacing them
with new objects - we can get a UAF if we can get that ::release call to happen before the ::retain in copyProperty.

This PoC will crash as a UaF but with more care I believe you could get the OSSerialize to serialize an invalid object
leading to a nice kernel memory disclosure.

Tested on OS X 10.11.3 El Capitan 15D21 on MacBookAir5,2
 
hdix_race_get_set.c
3.2 KB Download
Project Member Comment 1 by ianbeer@google.com, Feb 12 2016
Labels: Reported-2016-Feb-12 Id-636172681
Project Member Comment 2 by ianbeer@google.com, May 5 2016
Labels: Deadline-Grace
Project Member Comment 3 by ianbeer@google.com, May 18 2016
Labels: Fixed-2016-May-16 CVE-2016-1807
Status: Fixed
Apple advisories:
OS X: https://support.apple.com/en-us/HT206567
iOS: https://support.apple.com/en-us/HT206568
Project Member Comment 4 by ianbeer@google.com, May 25 2016
Cc: ianbeer@google.com
 Issue 730  has been merged into this issue.
Project Member Comment 5 by ianbeer@google.com, Jun 9 2016
Labels: -Restrict-View-Commit
Sign in to add a comment