NVIDIA Linux Driver Hack Gives You Root Access

Posted by Michael Larabel on August 01, 2012

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.

Discuss this article in our forums, IRC channel, or email the author. You can also follow our content via RSS and on social networks like Facebook, Identi.ca, and Twitter (@Phoronix and @MichaelLarabel). Subscribe to Phoronix Premium to view our content without advertisements, view entire articles on a single page, and experience other benefits.
Latest Hardware Reviews
  1. Sumo Lounge Emperor
  2. Gallium3D Continues Improving OpenGL For Older Radeon GPUs
  3. 15-Way Open vs. Closed Source NVIDIA/AMD Linux GPU Comparison
  4. Nouveau vs. NVIDIA Linux Comparison Shows Shortcomings
Latest Software Articles
  1. Intel Linux OpenGL Driver Leading Over Apple OS X
  2. The Cost Of Ubuntu Disk Encryption
  3. Btrfs vs. EXT4 vs. XFS vs. F2FS On Linux 3.10
  4. AMD Radeon R600 GPU LLVM 3.3 Back-End Testing
Latest Linux News
  1. Wayland's Weston Gets Output Scaling Support
  2. Raspberry Pi Gets New Wayland Weston Renderer
  3. Debian GNU/Hurd 2013 Release Brings New Packages
  4. Intel Ultrabook Performance Is Faster With Mesa 9.2
  5. Hot Relocation HDD To SSD Support For Btrfs
  6. Phoronix Test Suite 4.6.0 "Utsira" Released
  7. New Intel X.Org Driver Supports All Of Haswell
  8. SQLite Now Faster With Memory Mapped I/O
  9. Microsoft Releases Skype For Linux 4.2, Has Bug-Fixes
  10. Qt For Tizen Launches, Based On Qt 5.1
  11. KTAP Released For Linux Kernel Dynamic Tracing
Latest Forum Talk
  1. Fedora 18 Comes To ARMv6, Raspberry Pi
  2. Wayland's Weston Gets Output Scaling Support
  3. gnome 3.8 in RHEL7?
  4. Handbrake 0.9.9 Supports OpenCL Offloading
  5. Qt For Tizen Launches, Based On Qt 5.1
  6. Humble Indie Bundle Finally Sells Out
  1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Motherboards
  5. Peripherals
  6. Processors
  7. Software
  8. Operating Systems
  9. All Articles
  1. Linux Benchmarking
  2. OpenBenchmarking.org
  3. Phoronix Test Suite