Skip to content
Memory corruption Advisory Advanced CVE-2022-32543

ESTsoft Alyac OLE header parsing integer overflow

Alyac's OLE file parser multiplies a file-controlled count by a block size in 32-bit arithmetic, so a large count overflows the size check and a smaller heap buffer is allocated than is later written. A crafted OLE file could therefore cause a heap buffer overflow, which the report says can result in arbitrary code execution.

Jaewon Min Follow

Originally disclosed on Cisco Talos

High 7.3 View original

An integer overflow vulnerability exists in the way ESTsoft Alyac 2.5.8.544 parses OLE files. A specially-crafted OLE file can lead to a heap buffer overflow which can result in arbitrary code execution.

Jaewon Min, 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 multiplication of a file-controlled count by the block size is truncated to 32 bits, so the resulting size check passes and an undersized heap buffer is allocated before a repeated copy overflows it.

Impact

A crafted OLE file could cause a heap buffer overflow that can result in arbitrary code execution, though the CVSS vector indicates local access and user interaction are required.

What the attacker needed

Alyac 2.5.8.544 installed on Windows; Victim scans or opens a crafted OLE file

The fix

The size calculation should be performed in a wider integer type and validated so the allocation matches the total number of bytes to be copied; the report notes a vendor patch was released.

How it was found

  1. Provide Alyac with an OLE file whose header matches the expected signature and field values.
  2. The parser stores a block size of 0x200 or 0x1000 in its object.
  3. A large value at file offset +0x2C makes the size multiplication overflow and pass the file-size check.
  4. A heap buffer is allocated using the overflowed, too-small size.
  5. The parser repeatedly copies 0x200-byte blocks from the file into that buffer, overflowing the heap.

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.

An antivirus program reads files to check them. When it read a particular kind of file (an OLE file, a container format used by Microsoft Office), it did a size calculation that could wrap around to a small number, like an odometer rolling over. It then reserved a small space in memory but copied much more data into it, which can crash the program or 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 Jaewon Min

View all

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