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

GTKWave LXT2 num_time_table_entries out-of-bounds write vulnerability

A crafted LXT2 file can cause an out-of-bounds write in GTKWave's time table array because the number of entries is read from the file without checking against the array size. An attacker could achieve arbitrary code execution by convincing a victim to open a malicious file.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

An out-of-bounds write vulnerability exists in the LXT2 numtimetableentries functionality of GTKWave 3.3.115. A specially crafted .lxt2 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 number of time table entries read from the file is not validated against the fixed size of the time_table array, leading to a heap buffer overflow.

Impact

An attacker could execute arbitrary code on the victim's machine by convincing them to open a malicious file.

What the attacker needed

Victim opens a malicious .lxt2 file

The fix

The vulnerability was fixed in version 3.3.118 by adding a check to ensure num_time_table_entries does not exceed the array size.

How it was found

  1. Create a malicious .lxt2 file with a block containing a time sector where num_time_table_entries exceeds 64.
  2. Open the file with GTKWave or a related tool (e.g., lxt2vcd).
  3. The program reads the oversized num_time_table_entries and writes past the time_table array.

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. When it opens a file, it reads a number that says how many time entries to store, but it doesn't check if that number is too big for the space reserved. This lets an attacker write past the end of an array, which can crash the program or run malicious 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.