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

NVIDIA nvJPEG2000 Ndecomp heap-based buffer overflow vulnerability

A heap-based buffer overflow exists in NVIDIA nvJPEG2000 0.8.0 when parsing the Ndecomp field of a COC segment in a JPEG2000 file. An attacker could provide a malicious file to overwrite adjacent heap memory, potentially leading to memory corruption and arbitrary code execution.

Dimitrios Tatsis Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

A heap-based buffer overflow vulnerability exists in the Ndecomp field handling of NVIDIA nvJPEG2000 0.8.0. A specially crafted JPEG2000 file can lead to overwrite of adjacent heap memory 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 Ndecomp value from the COC segment is used as a length in a memset-like operation without validating it against the allocated buffer size.

Impact

An attacker could corrupt adjacent heap memory, potentially leading to further memory corruption and arbitrary code execution.

What the attacker needed

A CUDA-enabled GPU; victim opens a malicious JPEG2000 file

The fix

The vendor released a patch on 2025-02-11.

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 heap buffer overflow happens when a program writes more data into a memory area than it was allocated for, spilling into neighbouring memory. Here, a crafted image file causes the decoder to write past the end of a buffer because it trusts a size value from the file without checking it. This can crash the program or, in worse cases, 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.