Netatalk Security Advisory
| Subject | Stack buffer overflow in PAP client status handling |
|---|---|
| CVE ID# | CVE-2026-142085 |
| Severity | High |
| Disclosure Date | 2026/12/04 |
| Affected Versions | 1.3-2.4.10, 4.0.0-4.6.0 |
| Summary | A malicious PAP printer can cause the pap client to overflow a stack buffer with a crafted status-length byte |
Description
The pap client’s wait-for-idle (-W) and wait-for-printer (-w) paths read
the printer-controlled status-length byte at offset 8 through a plain char
and use it as the length of a copy into a 1024-byte stack buffer.
On platforms where char is signed, a byte from 0x80 through 0xFF
becomes negative. For example, 0xFF becomes -1, which converts to
SIZE_MAX when passed as the size_t copy length (CWE-787). The following
terminator write also uses the signed value as an array index.
The client does not first verify that the response contains the nine-byte
header, that the advertised status text fits within the received response, or
that the copy fits in the destination buffer. A malicious or compromised PAP
printer can send a crafted status response when a user runs pap with -w or
-W against it.
Patch Availability
Upgrade to Netatalk 4.6.1 or later, which includes the fix. Source builds can apply CVE-2026-142085.patch.
CVSS Calculation
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N (7.1)
Workaround
Until upgraded, avoid the -w and -W options and avoid using pap with
printers that are untrusted or may be compromised. Restrict access to trusted
PAP printers where possible.
Credits
Vulnerability reported by:
Pavel Kohout of Aisle Research
Patch developed by:
Daniel Markstedt of the Netatalk team
References
Go back to the Security Policy.