Skip to content
Memory corruption Advisory Advanced CVE-2023-39413CVE-2023-39414

GTKWave LXT2 lxt2_rd_iter_radix shift operation integer underflow vulnerabilities

GTKWave's LXT2 file parser has an integer underflow in the lxt2_rd_iter_radix shift operation, where a crafted .lxt2 file can cause a memmove with a negative size, leading to memory corruption. An attacker could exploit this to execute arbitrary code if a victim opens a malicious file.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.0 View original

Multiple integer underflow vulnerabilities exist in the LXT2 lxt2rditerradix shift operation functionality of GTKWave 3.3.115. A specially crafted .lxt2 file can lead to memory corruption.

Claudio Bozzato, 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 length of a value buffer can be set to zero, and when a shift operation subtracts one from this length, it underflows to a huge number, causing memmove to copy an excessive amount of data.

Impact

An attacker could exploit this memory corruption to execute arbitrary code, though the CVSS score indicates high attack complexity and user interaction is required.

What the attacker needed

Victim opens a malicious .lxt2 file

The fix

The vulnerability was fixed in version 3.3.118.

How it was found

  1. Craft an LXT2 file with msb and lsb values that make len zero.
  2. Open the file in GTKWave or a tool using lxt2_read.c.
  3. The parser processes the block and reaches lxt2_rd_iter_radix.
  4. A shift operation triggers memmove with a negative size, causing memory corruption.

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.

GTKWave is a program for viewing electronic signal traces. A specially made trace file can trick the program into copying too much data in memory, which can crash it or let an attacker run their own code. The victim just needs to open the file.

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 Claudio Bozzato

View all

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