Skip to content
Memory corruption Advisory Advanced CVE-2021-21811

AT&T Labs Xmill XML parsing CreateLabelOrAttrib memory corruption vulnerability

A heap buffer overflow exists in Xmill's XML parsing when handling labels or attributes of a specific size, due to an integer underflow in the custom heap allocator. An attacker could exploit this by providing a crafted XML file, potentially leading to arbitrary heap write and code execution.

Carl Hurd Follow

Originally disclosed on Cisco Talos

High 8.1 View original

A memory corruption vulnerability exists in the XML-parsing CreateLabelOrAttrib functionality of AT&T Labs’ Xmill 0.7. A specially crafted XML file can lead to a heap buffer overflow.

Carl Hurd, 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

Likely an integer underflow in the custom heap allocator's size check, where the current size exceeds the block size after alignment, causing the unsigned subtraction to wrap and bypass the bounds check.

What the attacker needed

Victim opens a crafted XML file with Xmill

How it was found

  1. Craft an XML file with a label or attribute of size 0xFFC9.
  2. Provide the file to Xmill for compression.
  3. The parsing triggers allocation of a 0x10000-byte block, which is filled and then aligned.
  4. A subsequent label allocation causes an integer underflow in the size check, leading to a heap buffer overflow.

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.

Xmill is a tool that compresses XML files. It uses its own memory management, and a mistake in how it calculates available space can cause it to write data past the end of a memory buffer. This can crash the program or allow an attacker to 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 Carl Hurd

View all

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