Skip to content
Memory corruption Advisory Advanced CVE-2023-37447CVE-2023-37446CVE-2023-37445CVE-2023-37444CVE-2023-37442CVE-2023-37443

GTKWave VCD var definition section out-of-bounds read vulnerabilities

GTKWave's VCD parser allows variable definitions after the end of the header, which can change the minimum hash ID and cause an out-of-bounds read when looking up symbols. An attacker could exploit this to achieve arbitrary code execution by opening a malicious .vcd file.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

Multiple out-of-bounds read vulnerabilities exist in the VCD var definition section functionality of GTKWave 3.3.115. A specially crafted .vcd 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 parser does not prevent variable definitions after the header ends, allowing the minimum hash ID to be updated and causing an out-of-bounds array access during symbol lookup.

Impact

An attacker could achieve arbitrary code execution by convincing a victim to open a malicious .vcd file.

What the attacker needed

Victim opens a malicious .vcd file

The fix

The issue was fixed in version 3.3.118 by properly enforcing that variable definitions cannot occur after $enddefinitions.

How it was found

  1. Create a VCD file with a variable definition before $enddefinitions.
  2. Include $enddefinitions to trigger creation of the symbol index.
  3. Add another variable definition after $enddefinitions with an ID that changes vcd_minid.
  4. Add a port dump value that references an ID whose hash falls within the new range.
  5. Open the file in GTKWave or a conversion utility to trigger the out-of-bounds read.

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. A specially crafted trace file can trick the program into reading memory outside its intended bounds, and this can be turned into running attacker-controlled code. The victim must open the malicious file.

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.