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.
Originally disclosed on Cisco Talos
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.
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
- Craft a .vzt file with a block where num_time_ticks is large enough to overflow the allocation size.
- Open the file with GTKWave or a command-line tool like vzt2vcd.
- The program allocates a small buffer due to integer overflow.
- 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.