GHSL-2020-075, GHSL-2020-079, GHSL-2020-080, GHSL-2020-081, GHSL-2020-082, GHSL-2020-083, GHSL-2020-084: Multiple vulnerabilities in SANE Backends (DoS, RCE)
SANE Backends contains multiple memory corruption vulnerabilities in its network scanner handling code, triggered by a malicious device on the same network. An attacker could cause a denial of service (crash) or potentially achieve remote code execution, and some bugs leak information useful for bypassing ASLR.
Originally disclosed on GitHub Security Lab
SANE Backends contains several 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.
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 network read functions trust an attacker-controlled size field from the scanner's response and use it without validating that the destination buffer is large enough, leading to null pointer dereferences, buffer overflows, and out-of-bounds reads.
Impact
A malicious device on the same network could crash the scanning application (denial of service) or potentially execute arbitrary code, and some bugs could leak memory to help bypass ASLR; the one-click bug requires the user to press 'Scan'.
What the attacker needed
Malicious device on same network; victim runs simple-scan (for zero-click bugs); victim clicks 'Scan' (for one-click bug)
The fix
The vulnerabilities were fixed by the SANE project, as indicated by the coordinated disclosure and public announcement.
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.
SANE is software that lets your computer talk to scanners. The code that handles messages from scanners over the network has bugs: it trusts the size value in a message without checking it. A bad device on the same network can send a crafted message that crashes the scanning program or, worse, lets the attacker run their own code on your computer.
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.