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

Grassroot DICOM RAWCodec::DecodeBytes out-of-bounds read vulnerability

An out-of-bounds read vulnerability exists in the RAWCodec::DecodeBytes function of Grassroot DICOM 3.0.23 because a memcpy uses a length derived from DICOM tags without checking the source buffer size. An attacker can provide a malicious DICOM file to trigger the out-of-bounds read, potentially leading to information disclosure or a crash.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

Medium 6.5 View original

An out-of-bounds read vulnerability exists in the RAWCodec::DecodeBytes functionality of Mathieu Malaterre Grassroot DICOM 3.0.23. A specially crafted DICOM file can lead to an out-of-bounds read.

Emmanuel Tacheau, 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 memcpy at line 70 uses inOutBufferLength, which is derived from DICOM tags and can be larger than the actual source string length, without verifying that the source buffer is large enough.

Impact

An attacker could cause a denial of service (crash) or potentially disclose sensitive information from memory due to the out-of-bounds read.

What the attacker needed

Malicious DICOM file

The fix

The vendor has fixed the code on their sourceforge site.

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.

This report describes a bug in a medical image library. When the program processes a specially crafted image file, it tries to copy more data than it actually has, reading past the end of a memory buffer. This can crash the program or leak memory contents.

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 Emmanuel Tacheau

View all

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