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

NVIDIA nvJPEG2000 Coding Style Component index out-of-bounds write vulnerability

The NVIDIA nvJPEG2000 library fails to validate the component index in the Coding Style Component segment of a JPEG2000 file, allowing an out-of-bounds write. An attacker can supply a malicious file to corrupt memory and potentially execute arbitrary code.

Dimitrios Tatsis Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

A memory corruption vulnerability exists in the Coding Style Component handling of the NVIDIA nvJPEG2000 library version 0.8.0. A specially crafted JPEG2000 file can lead to an out-of-bounds write with arbitrary data which can lead to further memory corruption and arbitrary code execution.

Dimitrios Tatsis, 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

The library does not validate that the component index (Ccoc) is less than the number of components (Csiz) before using it to index an array, leading to an out-of-bounds write.

Impact

An attacker could achieve remote code execution by supplying a malicious JPEG2000 file.

What the attacker needed

CUDA-enabled GPU; malicious JPEG2000 file

The fix

The vulnerability was fixed in a vendor patch release.

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 JPEG2000 file contains a field that tells the decoder which image component a setting applies to. The library uses this number as an array index without checking if it is within the allocated array, so a crafted file can write data past the end of the array. This memory corruption could let an attacker run their own code.

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 Dimitrios Tatsis

View all

21 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.