Skip to content
Memory corruption Advisory Advanced CVE-2019-5085

LEADTOOLS libltdic.so DICOM receive code execution vulnerability

An integer overflow in the DICOM packet parsing of LEADTOOLS libltdic.so allows a specially crafted packet to cause heap corruption, potentially leading to code execution. An attacker can send a packet to trigger this vulnerability.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An exploitable code execution vulnerability exists in the DICOM packet-parsing functionality of LEADTOOLS libltdic.so, version 20.0.2019.3.15. A specially crafted packet can cause an integer overflow, resulting in heap corruption.

Lilith [-_-], 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 an integer overflow when adding 6 to a size value read from the packet, leading to an undersized heap allocation and subsequent heap buffer overflow.

Impact

An attacker could send a packet to cause heap corruption, potentially leading to code execution.

What the attacker needed

Network access to the DICOM service

The fix

The vendor patched the vulnerability.

How it was found

  1. Send a packet with a crafted size field in the first six bytes.
  2. The server reads the six bytes and calculates an allocation size by adding 6 to the value from the packet.
  3. An integer overflow causes the allocation to be smaller than intended.
  4. The server then reads the original size from the packet into the undersized buffer, causing a heap overflow.

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 library used for medical imaging. When the software receives a network message, it calculates a size based on the message and uses that size to allocate memory. If the size calculation overflows, the allocated memory is too small, and the subsequent data write overflows the buffer, corrupting memory. This can let an attacker run their own code on the system.

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