Skip to content
Memory corruption Advisory Advanced CVE-2023-34087

GTKWave EVCD var len parsing improper array index validation vulnerability

An improper array index validation in GTKWave's EVCD parser allows a crafted .evcd file to write a NULL byte to an arbitrary memory location, potentially leading to arbitrary code execution. The victim must open a malicious file.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

An improper array index validation vulnerability exists in the EVCD var len parsing functionality of GTKWave 3.3.115. A specially crafted .evcd 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 length value parsed from the file is used directly as an index into a fixed-size stack buffer without bounds checking.

Impact

An attacker could write a NULL byte to an arbitrary memory location, potentially leading to arbitrary code execution.

What the attacker needed

Victim opens a malicious .evcd file

The fix

The vulnerability was fixed in version 3.3.118.

How it was found

  1. Create a .evcd file with a $var line that sets a large length value.
  2. Add a line starting with 'p' that references the same variable ID.
  3. Open the file with the evcd2vcd utility 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 electronic signal traces. A bug in how it reads a file format called EVCD lets an attacker write a zero byte to any place in the program's memory. This can crash the program or let the 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.