Additional finding (2026-11-10, same host and setup: linux-oracle
7.0.0-1015.16, Ubuntu 26.04 arm64, k3s v1.36.5+k3s1): the problem is not
limited to gosu or Go's per-thread signals. Under the stacked label cri-
containerd.apparmor.d//&unconfined, the kernel denies signals between
ordinary processes in the same container.

Test (one-shot boot into 1015, pods in a scratch namespace):

1. Control: pod running "gosu postgres true" hangs, as before.
2. postgres:16-alpine and postgres:15-alpine started directly as the postgres 
user (securityContext runAsUser: 70, no gosu): initdb completes, then the 
entrypoint fails with
   pg_ctl: could not send stop signal (PID: 28): Permission denied
   and the container exits 1.
3. redis:7-alpine as uid 999: sh -c 'sleep 300 & kill -TERM $!' gives
   sh: can't kill pid 21: Permission denied
   and the child stays alive. Sender and target have the same uid, same 
container, label cri-containerd.apparmor.d//&unconfined (enforce).
4. No apparmor="DENIED" line in dmesg for these signals.

On 7.0.0-1013.13 the same pods start and work.

So any containerized service that signals its own child processes
(database shutdown, reload, worker management) breaks under
k3s/containerd on 1015, and running the container as a non-root user is
not a workaround. The only pod-level workaround we found is
appArmorProfile: Unconfined, which removes confinement. We are pinned to
1013 and therefore cannot take the security fixes in 1015. 7.0.0-1016.18
in -proposed has no AppArmor change in its changelog, so it presumably
has the same problem.

Upstream AppArmor issue:
https://gitlab.com/apparmor/apparmor/-/issues/676

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172531

Title:
  linux-oracle 7.0.0-1015: AppArmor forced stack breaks signals between
  threads in containerd (k3s) containers; Go programs hang in setgid
  (gosu)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-oracle/+bug/2172531/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to