NVIDIA GPU Compiler Driver Shader Functionality out-of-bounds read vulnerability
A malformed shader file can cause the NVIDIA GPU compiler driver to read memory out of bounds. An attacker could exploit this to read arbitrary memory, potentially leading to a guest-to-host escape in virtualised environments.
Originally disclosed on Cisco Talos
An out-of-bounds read vulnerability exists in the Shader Functionality functionality of NVIDIA GPU Compiler Driver 551.61, 31.0.15.5161. A specially crafted executable / shader file can lead to an out-of-bounds read.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the driver fails to validate an index taken from the shader bytecode before using it to read from a heap buffer.
Impact
An attacker could read arbitrary memory and potentially perform a guest-to-host escape in virtualised environments, though the report notes this was demonstrated from a HYPER-V guest using the now-deprecated RemoteFX feature.
What the attacker needed
Ability to supply a malformed shader; victim runs the shader (e.g., via a game or browser)
The fix
The vendor released a security advisory and a patch.
How it was found
- Modify the shader bytecode corresponding to the SINCOS instruction.
- Supply the malformed shader to the NVIDIA driver.
- The driver reads memory out of bounds, causing an access violation.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A shader is a small program that runs on the graphics card to draw things. The driver that prepares shaders for the GPU has a bug: if you give it a specially crafted shader, it reads memory outside the area it should, which can crash or leak data. This matters because in virtual machines it might let an attacker break out of the guest and run code on the host.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.