The Linux Graphics Driver Stack Remains Insecure

Posted by Michael Larabel on February 02, 2013

The Linux graphics driver stack remains currently insecure with some fundamental issues that jeopardize the Linux desktop's integrity, but improvements are still being made to address the current issues.

Martin Peres and Timothée Ravier ignited the Linux graphics security discussion this morning in Brussels during FOSDEM. Their talk, which was entitled "DRI-next/DRM2: A walk through the Linux Graphics stack and its security", went over the current issues and some of what's being tried to improve the situation. The idea ultimately comes down to exposing a secure API to user-land and restricting GPU's RAM access rights.

The insecurity of Linux graphics isn't new but has been talked about previously in past years and what's been the driving forces behind DRI-Next and DRM2. The key goals being worked towards with these Linux graphics security improvements are to fight potential eavesdropping, tampering, and denial of service attack vectors that are possible with the current Linux graphics drivers and stack.

DRM2 / Render Nodes attempts to take care of DRM authentication policy and improve buffer sharing. The Direct Rendering Manager improvements would also allow using GPGPU/OpenCL applications without running an X.Org Server and other benefits. DRI-Next is about improving X.Org Server communication to fix shortcomings of DRI2 and DMA-BUF instead of GEM to share buffers.

What's still left TODO for DRM2 is to fix the DRM buffer object mmap-ing address from per-device to per-FDs, reworking the patches, including support for more graphics driver, testing every combination to check for no regressions, and porting DRM2 to Wayland/Weston. With DRI-Next, there's still research being done about using UNIX sockets for FD passing.

Right now in the Linux graphics driver world there's safeguards being used by different drivers to prevent other processes from reading/writing to memory that isn't their own. The ideal way is isolating users in a separate VM by restricting a GPU user to its own data through abstracting the memory address space. This method is already used by the Nouveau driver for NVIDIA GeFore 8 hardware and newer while it's possible to be supported by the AMD Radeon HD 7000 series and newer along with Intel Sandy Bridge graphics and newer.

The problem with this separate VM approach though is that it does increase the context-switching delay, which could particularly cause problems when using DRI2 and Qt5 and other cases. Right now what the Radeon and Intel open-source drivers is command submission validation by making sure they aren't accessing bad areas of RAM. This method yields a lower context-switching delay and doesn't have any specific hardwae requirements, but does come at a cost of higher CPU usage with needing to check the CS packets for their validity.

Among the ultimate goals expressed by Martin and Timothée are making it possible to implement activities and provide security between them, allow the end-user to decide what they want (e.g. if they want per-application isolation or prefer better performance), and to prepare the stack for GPGPU shared clusters and soon-to-come WebGL applications with better graphics driver security.

In their FOSDEM 2013 summary, they say the current state of affairs is that there's no confidentiality or integration between applications run by the same user, the current Linux graphics stack makes it possible to spy on users, there's no input security with X11 (but there is with Wayland/Weston), and that DRM2/DRI-Next should be good for stepping up the Linux graphics security.

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. Raspberry Pi Gets New Wayland Weston Renderer
  2. Debian GNU/Hurd 2013 Release Brings New Packages
  3. Intel Ultrabook Performance Is Faster With Mesa 9.2
  4. Hot Relocation HDD To SSD Support For Btrfs
  5. Phoronix Test Suite 4.6.0 "Utsira" Released
  6. New Intel X.Org Driver Supports All Of Haswell
  7. SQLite Now Faster With Memory Mapped I/O
  8. Microsoft Releases Skype For Linux 4.2, Has Bug-Fixes
  9. Qt For Tizen Launches, Based On Qt 5.1
  10. KTAP Released For Linux Kernel Dynamic Tracing
  11. Linux 3.10-rc2 Kernel Takes In A Few Extra Pulls
Latest Forum Talk
  1. Debian GNU/Hurd 2013 Release Brings New Packages
  2. Intel Linux OpenGL Driver Leading Over Apple OS X
  3. Raspberry Pi Gets New Wayland Weston Renderer
  4. Handbrake 0.9.9 Supports OpenCL Offloading
  5. DRM Moves Ahead With HTML5 Specification
  6. Chrome 27 Loads Web Pages Faster
  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