NVIDIA D3D10 Driver Shader Functionality SAMPLE out-of-bounds read vulnerability
A malformed shader file can cause the NVIDIA D3D10 driver to read memory outside the intended buffer. An attacker could use this to read arbitrary memory or potentially escape a virtual machine guest to the host.
Originally disclosed on Cisco Talos
An out-of-bounds read vulnerability exists in the Shader Functionality SAMPLE instruction of NVIDIA D3D10 Driver NVIDIA D3D10 Driver, Version 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 a shader-controlled offset before using it to compute a memory address for a texture sample operation.
Impact
An attacker could read arbitrary memory and potentially perform a guest-to-host escape in virtualised environments, though this was demonstrated only in specific setups such as Hyper-V with RemoteFX.
What the attacker needed
Ability to supply a crafted shader file; victim runs the shader (e.g., opens a file or visits a page)
The fix
The vendor released a security advisory and a patch.
How it was found
- Modify the shader bytecode corresponding to the SAMPLE instruction.
- Supply the malformed shader to the driver.
- The driver computes a memory address from the shader-controlled value and reads from it, causing an out-of-bounds read.
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 tells the graphics card how to draw things. The driver that runs shaders did not check a value from the shader file before using it to calculate a memory address, so a crafted shader could make the driver read memory it should not. This could let an attacker see sensitive data or, in virtualised setups, break out of a guest machine.
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.