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



Sign in to add a comment
OS X kernel panic due to bad patch for CVE-2015-3712 in GeForce.kext
Project Member Reported by ianbeer@google.com, Jul 31 2015 Back to list
 bug 341  (CVE-2015-3712) was due to the nvidia kernel driver trusting values in user/kernel shared memory when manipulating nvidia "AllocationLists."

The patch for this bug added a few functions like "SanityCheckAllocationList" and "SanityCheckAllocationListHeader". Unfortunately these functions just use a *different* value from shared memory when trying to check the allocations lists leading to an immediate OOB read:

nvGLContext::SanityCheckAllocationList():
0000000000026b1a        pushq   %rbp
0000000000026b1b        movq    %rsp, %rbp
0000000000026b1e        pushq   %r15
0000000000026b20        pushq   %r14
0000000000026b22        pushq   %rbx
0000000000026b23        pushq   %rax
0000000000026b24        movq    %rdi, %r14
0000000000026b27        movq    0x588(%r14), %r15 ; <-- r15 now points to user-controlled memory
0000000000026b2e        movl    (%r15), %eax ; <-- read user-controlled dword
0000000000026b31        movl    -0x8(%r15,%rax,4), %ebx ; <-- use as index for a read

This OOB-read value is passed to nvGLContext::SanityCheckPLLHeader; perhaps it's possible to use this bug to bypass whatever sanity checking these functions are supposed to be doing but I haven't looked yet. At the moment I'm filing this as low severity; I'll update that if I find you might be able to do something more interesting.

This bug is reachable from all sandboxes which allow access to the GPU (eg safari renderer, chrome GPU process.)

Build the PoC with the supplied Makefile.

Tested on OS X 10.10.4 (14E46)


 
nvidia_pocs.zip
2.6 KB Download
Project Member Comment 1 by ianbeer@google.com, Jul 31 2015
Labels: Reported-2015-July-31 Id-626185785
Project Member Comment 2 by scvitti@google.com, Aug 11 2015
Labels: -Reported-2015-July-31 Reported-2015-Jul-31
Project Member Comment 3 by ianbeer@google.com, Oct 22 2015
Labels: CVE-2015-7019 Fixed-2015-Oct-21
OS X Advisory: https://support.apple.com/en-us/HT205375
Project Member Comment 4 by ianbeer@google.com, Oct 22 2015
Status: Fixed
Project Member Comment 5 by ianbeer@google.com, Jan 27 2016
Labels: -Restrict-View-Commit
Sign in to add a comment