Skip to content
Memory corruption Advisory Advanced CVE-2024-0118

NVIDIA D3D10 Driver Shader Functionality out-of-bounds read vulnerability due to excessive loop iteration

A specially crafted shader file can cause the NVIDIA D3D10 driver to perform an out-of-bounds read because the loop counter is taken directly from shader bytecode. An attacker could trigger this from a guest virtual machine or a web browser, potentially leading to a guest-to-host escape or code execution.

Piotr Bania Follow

Originally disclosed on Cisco Talos

High 7.8 View original

An out-of-bounds read vulnerability exists in the Shader Functionality functionality of NVIDIA D3D10 Driver 555.99, 32.0.15.5599. A specially crafted executable / shader file can lead to an out-of-bounds read.

Piotr Bania, on Cisco Talos

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 uses a loop count from the shader bytecode without validating it, causing the memory address to be adjusted beyond the allocated buffer.

Impact

An attacker could potentially achieve guest-to-host escape from a virtual machine or trigger the vulnerability from a web browser, leading to code execution or a crash.

What the attacker needed

Ability to supply a crafted shader; victim opens a crafted file or webpage

The fix

The vendor released a patch on 2024-10-22.

How it was found

  1. Modify the CUSTOMDATA section in the shader bytecode.
  2. Supply the malformed shader to the NVIDIA driver.
  3. The modified value is used as the maximum number of loop repetitions.
  4. During the loop, a read operation is performed while the memory address is adjusted each iteration.
  5. This leads to an out-of-bounds memory 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 runs on the graphics card to draw things. The NVIDIA driver did not check how many times a loop in the shader should repeat, so a malicious shader could make it read memory outside the intended area. This could crash the driver or, in some setups, let an attacker escape from a virtual machine to 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.

More by Piotr Bania

View all

94 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.