NVIDIA Linux Driver Hack Gives You Root Access

Written by Michael Larabel in NVIDIA on 1 August 2012 at 03:28 PM EDT. 25 Comments
NVIDIA
NVIDIA's had a past few weeks with Linus Torvalds having harsh words for NVIDIA, the downing of their forums, and now a NVIDIA driver exploit being revealed that gives normal users the rights to super-user privileges.

David Airlie published this NVIDIA hack today to a mailing list (the exploit is attached there as a single C file). Airlie isn't the original author of this hack but rather the code was passed onto him by an anonymous user(s). The code was forwarded to NVIDIA Corp more than one month ago, but the official NVIDIA Linux proprietary driver developers have yet to act on the vulnerability. As a result, it was decided to release this to the public. Now maybe NVIDIA will take care of it since this 760 lines of C code can provide root access to a system running the NVIDIA binary blob.
First up I didn't write this but I have executed it and it did work here,

I was given this anonymously, it has been sent to nvidia over a month ago with no reply or advisory and the original author wishes to remain anonymous but would like to have the exploit published at this time, so I said I'd post it for them.

It basically abuses the fact that the /dev/nvidia0 device accept changes to the VGA window and moves the window around until it can read/write to somewhere useful in physical RAM, then it just does an priv escalation by writing directly to kernel memory.
This NVIDIA Linux binary exploit has already been brought up within our forums.

This isn't the first time the NVIDIA binary Linux graphics driver has had a security vulnerability but just months ago there was another high-risk flaw. An earlier flaw was known for years before it was finally corrected about a half-decade ago within the NVIDIA Linux driver.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week