New issue
Advanced search Search tips
Starred by 3 users
Status: Fixed
Owner:
Closed: Apr 2015
Cc:



Sign in to add a comment
OS X sandbox escape due to heap corruption in fontd (AGSwapAttributeGroup)
Project Member Reported by ianbeer@google.com, Jan 26 2015 Back to list
The fontd messages handled by the OFAHandle{Strike, Stream, General}Message functions (msgh_id values 32, 31, 33) all use an OOL descriptor to pass a user-controlled buffer. If the uint32_t in the mach message body (after the descriptor) at offset +0x10 is 0 then the OFAHandle* functions will malloc a buffer to hold a copy of the OOL descriptor data, copy the OOL data into it then pass a pointer to that malloc'ed buffer to AGSwapAttributeGroup. This function then reads a uint32_t at offset 0xc from that buffer which corresponds to the number of entries in the buffer. It never checks that this value is safe and uses it as a loop counter to swap the endianness of various parts of the buffer, leading to heap corruption.

fontd is an unsandboxed daemon running as a regular user. It's reachable from various sandboxes including chrome and safari renderer processes.

Attached PoC tested in OS X 10.10.1
 
fontd_ofastrike.c
4.4 KB Download
Project Member Comment 1 by ianbeer@google.com, Jan 26 2015
Labels: Reported-2015-Jan-26 Id-618033414
Project Member Comment 2 by ianbeer@google.com, Jan 26 2015
Owner: ianbeer@google.com
Project Member Comment 3 by ianbeer@google.com, Jan 27 2015
Summary: OS X sandbox escape due to heap corruption in fontd (AGSwapAttributeGroup) (was: OS X sandbox escape due to heap corruption in fontd)
Project Member Comment 4 by ianbeer@google.com, Apr 9 2015
Labels: CVE-2015-1132 Fixed-2015-Apr-08
Status: Fixed
https://support.apple.com/en-us/HT204659
Project Member Comment 5 by ianbeer@google.com, Apr 22 2015
Labels: -Restrict-View-Commit
Sign in to add a comment