Skip to content
Memory corruption Advisory Advanced CVE-2023-39273CVE-2023-39271CVE-2023-39274CVE-2023-39275CVE-2023-39272CVE-2023-39270

GTKWave LXT2 facgeometry parsing integer overflow vulnerabilities

Multiple integer overflow vulnerabilities in GTKWave's LXT2 facgeometry parsing allow a crafted .lxt2 file to cause heap out-of-bounds writes, potentially leading to arbitrary code execution. A victim must open a malicious file to trigger the issue.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

Multiple integer overflow vulnerabilities exist in the LXT2 facgeometry parsing functionality of GTKWave 3.3.115. A specially crafted .lxt2 file can lead to arbitrary code execution.

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 size calculation for several heap buffers multiplies a user-controlled count (numfacs) by a constant without checking for integer overflow, so on 32-bit systems the result wraps to a small value, leading to undersized allocations and subsequent out-of-bounds writes.

Impact

A crafted file could cause heap out-of-bounds writes, potentially leading to arbitrary code execution, though the report notes the issue only affects 32-bit mode.

What the attacker needed

Victim opens a malicious .lxt2 file; 32-bit build of GTKWave

The fix

The vulnerabilities were fixed in version 3.3.118.

How it was found

  1. Craft a malicious .lxt2 file with a large numfacs value.
  2. Open the file with GTKWave or a related tool (e.g., lxt2vcd).
  3. The program allocates undersized buffers due to integer overflow.
  4. During parsing, it writes beyond the allocated buffers, causing heap 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. When it opens a file, it reads a number that tells it how many items to expect, then allocates memory based on that number. If the number is very large, a calculation can wrap around and allocate too little memory, so writing the items overflows the buffer and can corrupt memory, potentially letting an attacker run 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 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.