Control: tags -1 + patch
Control: found -1 2.4.10-3+deb13u2

Hi,

I can confirm this on trixie with cups-daemon 2.4.10-3+deb13u2, and on
such a kernel it is more than log noise: cupsd never finishes starting.

System: Proxmox VE 9.2 on Debian 13, kernel 7.0.14-16-pve, apparmor
4.1.1-pmx1. /etc/apparmor/parser.conf pins policy-features to
/usr/share/apparmor-features/features, whose network_v8 af_mask lists
unix, and the profile has no abi stanza, so it is compiled against that.

cups.service is Type=notify. cupsd is denied creating AF_UNIX stream and
dgram sockets (the same "failed protocol match" lines as in the original
report), so it cannot notify systemd, the start job times out after 90 s,
systemd restarts it, and this repeats indefinitely. On this host cups has
not started once since the first boot of a Proxmox 7.0 kernel; on the
Debian 6.12 kernel before that it started normally.

Tested on the same host, each time reloading the profile and starting
cups.service:

  1. Package profile unchanged: stays "activating", 7 denials in 20 s.
  2. "unix," in /etc/apparmor.d/local/usr.sbin.cupsd: still denied.
  3. "network unix," in the local file: still denied.
  4. "network," in the local file: still denied.
  5. "abi <abi/3.0>," at the top of the profile: active (running) within
     10 s, no AppArmor denials, "lpstat -r" reports the scheduler running.

So it cannot be worked around in the local include; the stanza has to be
in the shipped profile. The patch below, against debian/main, adds it
with a comment. It also applies unchanged to debian/trixie, and both
patched profiles compile with apparmor_parser 4.1.1. I have only tested
with AppArmor 4.1.1 userspace; it is independent of the AppArmor 5
notify-socket change in #1142057.

The trixie profile additionally denies /etc/paperspecs and
CAP_NET_ADMIN at every start; both are already fixed in sid (#1096002,
#1132961). Since cups on trixie does not start at all on kernels that
mediate AF_UNIX, a stable update carrying all three would be welcome.

Note the bug is filed against cups while the profile ships in
cups-daemon.

Thanks,
Michael Neuffer

From b247cb0292e4072a558c46a394c933f15683b674 Mon Sep 17 00:00:00 2001
From: Michael Neuffer <[email protected]>
Date: Mon, 14 Sep 2026 10:26:40 +0200
Subject: [PATCH] AppArmor profile: declare abi 3.0 so cupsd can start on
 kernels mediating AF_UNIX (Closes: #1110135)

---
 debian/local/apparmor-profile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/local/apparmor-profile b/debian/local/apparmor-profile
index 693b550..20cd8e7 100644
--- a/debian/local/apparmor-profile
+++ b/debian/local/apparmor-profile
@@ -2,6 +2,12 @@
 # Last Modified: Thu Aug  2 12:54:46 2007
 # Author: Martin Pitt <[email protected]>

+# Without an abi stanza the parser compiles this policy against the pinned
+# feature set, which mediates AF_UNIX. On kernels that enforce that (e.g. the +# Ubuntu-derived Proxmox VE kernels) cupsd cannot create the socket it needs
+# for sd_notify and the Type=notify unit never starts. Closes: #1110135
+abi <abi/3.0>,
+
 #include <tunables/global>

 /usr/sbin/cupsd flags=(attach_disconnected) {
--
2.53.0

Reply via email to