GTKWave VZT vzt_rd_get_facname decompression out-of-bounds write vulnerabilities
GTKWave's VZT file parser allocates name buffers based on a file-controlled length but then copies prefix and string data without bounds checks, allowing heap out-of-bounds writes. A crafted .vzt file could lead to arbitrary code execution when opened.
Originally disclosed on Cisco Talos
Multiple out-of-bounds write vulnerabilities exist in the VZT vztrdgetfacname decompression functionality of GTKWave 3.3.115. A specially crafted .vzt file can lead to arbitrary code execution.
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 buffers for decompressed facility names are sized from the file's longestname field, but the prefix-copy and string-copy loops write without verifying they stay within those buffers.
Impact
A specially crafted .vzt file could lead to arbitrary code execution when opened by the victim.
What the attacker needed
Victim opens a malicious .vzt file
The fix
The vendor fixed the issue in version 3.3.118.
How it was found
- Create a VZT file with a longestname field of 0.
- Include a facname entry with a large clonecnt or a long string.
- Open the file with GTKWave or a tool like vzt2vcd to trigger the out-of-bounds write.
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 signal traces from hardware simulations. It reads a file format called VZT that stores names in a compressed way. The program reserves a small amount of memory for each name based on a number written in the file, but then copies more data than that without checking, which can overwrite other memory and 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.