Skip to content
Memory corruption Advisory Advanced CVE-2020-6923

GHSL-2020-074, 077, 078: Memory corruptions in HPLIP - CVE-2020-6923

HPLIP's mDNS scanner discovery code parses responses from any device on the local network without bounds checks, so a malicious device can overflow a heap buffer and a stack buffer, and read out of bounds. This could allow remote code execution on a machine running a scanner application such as simple-scan, though the provided proofs of concept only crash the application.

kevinbackhouse Follow

Originally disclosed on GitHub Security Lab

HPLIP contains two memory corruption vulnerabilities which can be triggered by a malicious device or computer that is connected to the same network. The vulnerabilities are triggered when an application such as simple-scan searches the network for scanners.

kevinbackhouse, on GitHub Security Lab

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 the mDNS response parsing code copies attacker-controlled name and model strings into fixed-size buffers without checking their length, and advances a pointer by an attacker-supplied length without validating it against the packet size.

Impact

This may lead to remote code execution by a device on the same network, although mitigations such as ASLR and stack smashing detection may make a reliable exploit difficult, and the proofs of concept only cause a crash.

What the attacker needed

Attacker device on the same network; victim runs a scanner discovery app

The fix

The bugs were fixed after the vendor supplied updated source code and the reporter confirmed the fixes.

How it was found

  1. Compile the fake scanner proof of concept.
  2. Run the fake scanner on the same network as the victim.
  3. Start simple-scan on the victim machine.
  4. Observe simple-scan crash with a segmentation fault or stack smashing 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.

When a scanning program looks for scanners on the local network, it trusts whatever replies arrive. A rogue device on the same network can send a reply that is longer than the program expects, which corrupts the program's memory and can crash it or, in principle, let the attacker run their own code. The report also describes a smaller bug that lets an attacker peek at memory contents.

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 kevinbackhouse

View all

47 more disclosed reports, best first.

More from GitHub Security Lab

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.