Skip to content
Memory corruption Advisory Intermediate CVE-2021-21812CVE-2021-21813CVE-2021-21814CVE-2021-21815

AT&T Labs Xmill multiple command line parsing vulnerabilities

Multiple stack-based buffer overflows exist in the command-line argument parsing function HandleFileArg of Xmill 0.7. An attacker who can supply a crafted command-line argument can cause a buffer overflow, potentially leading to code execution.

Carl Hurd Follow

Originally disclosed on Cisco Talos

High 7.8 View original

Multiple stack-based buffer overflow vulnerabilities exists in the command-line-parsing HandleFileArg functionality of AT&T Labs’ Xmill 0.7. A specially crafted command-line argument can lead to code execution.

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

The program uses unsafe string copy functions (strcpy, memcpy) and writes a null terminator without checking the length of user-supplied input against the fixed-size buffer.

Impact

An attacker could potentially execute arbitrary code with the privileges of the user running Xmill.

What the attacker needed

Attacker can supply a command-line argument

How it was found

  1. Run xmill.exe with the -c option and a very long argument consisting of repeated characters.
  2. Observe the AddressSanitizer stack-buffer-overflow error.

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.

A buffer overflow happens when a program copies more data into a fixed-size memory area than it can hold, causing data to spill over into adjacent memory. Here, the program takes a file name from the command line and copies it without checking its length, so a very long name can overwrite other memory and crash the program or allow an attacker to 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 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.