Skip to content
Memory corruption Advisory Advanced CVE-2023-38649CVE-2023-38648

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.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

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.

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 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

  1. Create a VZT file with a longestname field of 0.
  2. Include a facname entry with a large clonecnt or a long string.
  3. 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.

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.