Skip to content
Memory corruption Advisory Advanced CVE-2023-38618CVE-2023-38621CVE-2023-38620CVE-2023-38619CVE-2023-38623CVE-2023-38622

GTKWave VZT facgeometry parsing integer overflow vulnerabilities

GTKWave 3.3.115 has integer overflow vulnerabilities in the VZT facgeometry parsing code. A specially crafted .vzt file can cause heap out-of-bounds writes, potentially leading to arbitrary code execution when opened by a victim.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

Multiple integer overflow vulnerabilities exist in the VZT facgeometry parsing functionality of GTKWave 3.3.115. A specially crafted .vzt 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 by 4 without checking for overflow, so in 32-bit mode the result wraps to a small value and subsequent writes go out of bounds.

Impact

A victim opening a malicious file could allow an attacker to execute arbitrary code, though the issue only affects 32-bit builds.

What the attacker needed

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

The fix

The vendor fixed the issue in version 3.3.118.

How it was found

  1. Craft a .vzt file with a large numfacs value.
  2. Open the file with GTKWave or a command-line tool.
  3. The program allocates undersized buffers and writes past them.

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 reads a file, it calculates how much memory to reserve based on a number from the file. If that number is very large, the calculation can wrap around and reserve too little memory, so writing data later spills over into other memory. An attacker can craft a file that exploits this to 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 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.