New issue
Advanced search Search tips

Issue 724 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:



Sign in to add a comment

OS X kernel stack buffer overflow in GeForce gpu driver

Project Member Reported by ianbeer@google.com, Feb 8 2016

Issue description

nvAPIClient::Escape is the sole external method of nvAcclerator userclient type 0x2a0.
It implements its own method and parameter demuxing using the struct-in struct-out
buffers.

The second dword in the struct in buffer is another method identifier used in a switch
statement in ::Escape to choose the method to call. Method 24 is ::SetClocksShmoo.

On entry to this method rsi points to a buffer in kernel space with completely
user-controlled contents.

The uint16_t field at +0xc is used a loop count for the memory copying loop at
+0xff3e with insufficient bounds checking. The destination stack buffer is 0x520 bytes below the saved
frame pointer but the code only checks whether the value we provide (after bit shifting)
is greater than 0xff. Since each iteration of the loop writes 0x14 bytes we can actually
write up to 0x13ec bytes which is well over the size of the stack buffer which is being copied
into.

This bug is reachable from the safari renderer sandbox and the chrome gpu process sandbox
on device with the appropriate hardware (eg macbookpro)
 
nv_shmoo.c
3.2 KB Download
Project Member

Comment 1 by ianbeer@google.com, Feb 8 2016

Labels: Reported-2016-Feb-08 Id-635983371
Project Member

Comment 2 by ianbeer@google.com, May 5 2016

Labels: Deadline-Grace
Project Member

Comment 3 by ianbeer@google.com, May 25 2016

Labels: Fixed-2016-May-16 CVE-2016-1861
Status: Fixed (was: New)
Apple advisory: https://support.apple.com/en-us/HT206567
Project Member

Comment 4 by ianbeer@google.com, Jun 9 2016

Labels: -Restrict-View-Commit

Sign in to add a comment