Description
CUPS is started by cups.service, cups.socket and cups.path; cups-browsed.service
discovers network printers and adds them automatically.
The control passes when each unit is masked or not installed at all.
The socket and path units can start cupsd on their own, so they are masked too.
Rationale
The print stack parses complex documents and network announcements. Flaws in cups-browsed
have allowed remote code execution by announcing a malicious printer. Servers rarely print.
Impact
The system can no longer print, and network printers are no longer discovered. Print servers and desktops that print keep CUPS: the control is only in the server and hardened desktop profiles, and can be excluded in the tailoring file.
Audit
Run systemctl is-enabled cups.service cups.socket cups.path cups-browsed.service. Each must
print masked, or fail because the unit does not exist.
Automated: every check must pass. Scanners report each check by its id.
cups-browsed
Printer discovery daemon.
unit: cups-browsed.service
state: masked
cups-socket
CUPS socket activation.
unit: cups.socket
state: masked
cups-path
CUPS path activation.
unit: cups.path
state: masked
cups
CUPS scheduler.
unit: cups.service
state: masked
Remediation
Run systemctl mask --now cups-browsed.service cups.socket cups.path cups.service, or
apt purge cups cups-daemon cups-browsed if nothing depends on them.
| Restart | none |
| Disruption | low |
Rollback
Run systemctl unmask cups-browsed.service cups.socket cups.path cups.service then
systemctl enable --now cups.service cups-browsed.service.
cups-browsed
Generated from check cups-browsed: the engine writes the fix for every output, it sets the expected value and the check runs again after.
cups-socket
Generated from check cups-socket: the engine writes the fix for every output, it sets the expected value and the check runs again after.
cups-path
Generated from check cups-path: the engine writes the fix for every output, it sets the expected value and the check runs again after.
cups
Generated from check cups: the engine writes the fix for every output, it sets the expected value and the check runs again after.
Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.
References
- cupsd(8), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- cups-browsed(8), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R62) ANSSI, guide, accessed 2026-10-19
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0 | R62 | partial | R62 asks to disable every unneeded service and names CUPS; this control covers it. |
| NIST SP 800-53 Rev. 55.1.1 | CM-7 | partial |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
People and lifecycle
| Authors |
|
| Verified | 2026-10-19 by Sn0wAlice on 20.04, Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic. Stock image passes (units absent); with cups installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 22.04, Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic. Stock image passes (units absent); with cups installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 24.04, Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic. Stock image passes (units absent); with cups installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 26.04, Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic. Stock image passes (units absent); with cups installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-19, 2026-10-19 |
| Translations | fr |