Skip to content
Memory corruption Advisory Advanced CVE-2023-38651CVE-2023-38650

GTKWave VZT vzt_rd_block_vch_decode times parsing integer overflow vulnerabilities

Integer overflow in GTKWave's VZT file parsing allows a crafted file to cause heap memory corruption. An attacker could achieve arbitrary code execution by convincing a victim to open a malicious file.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.0 View original

Multiple integer overflow vulnerabilities exist in the VZT vztrdblockvchdecode times parsing functionality of GTKWave 3.3.115. A specially crafted .vzt 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 number of time ticks is multiplied by 8 without checking for overflow in 32-bit mode, leading to a too-small heap allocation and subsequent out-of-bounds writes.

Impact

A crafted file could cause memory corruption, potentially leading to arbitrary code execution, though this only affects 32-bit mode and may depend on threading and heap implementation.

What the attacker needed

Victim opens a malicious .vzt file; 32-bit mode

The fix

The vulnerability was fixed in version 3.3.118.

How it was found

  1. Craft a .vzt file with a block where num_time_ticks is large enough to overflow the allocation size.
  2. Open the file with GTKWave or a command-line tool like vzt2vcd.
  3. The program allocates a small buffer due to integer overflow.
  4. It then writes time values beyond the buffer, 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 reads a special trace file, it calculates how much memory to reserve for time values. A malicious file can make that calculation wrong, so the program writes past the reserved memory, which can crash it or let an attacker 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.