We independently reproduced this on Ubuntu 26.04.1 LTS (amd64), using
RKE2 v1.35.10+rke2r1 and containerd 2.2.10-k3s1.

  Environment:

  • Affected kernel package: 7.0.0-43.43, running 7.0.0-43-generic.
  • Comparison kernel package: 7.0.0-38.38, running 7.0.0-38-generic.
  • AppArmor and libapparmor1: 5.0.2-0ubuntu1~26.04.1.
  • Both kernel.apparmor_restrict_unprivileged_unconfined and 
kernel.apparmor_restrict_unprivileged_userns were 1.
  • The loaded containerd AppArmor profile had an identical raw_sha256 on all 
three comparison nodes.

  We used the same container image, UID/GID 1010, dropped capabilities,
and RuntimeDefault AppArmor/seccomp profiles. The probe installed a
SIGUSR1 handler and called os.kill(os.getpid(), signal.SIGUSR1).

   Execution path                           7.0.0-38-generic    7.0.0-43-generic
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  ━━━━━━━━━━━━━━━━━━  
━━━━━━━━━━━━━━━━━━
   Container entrypoint, PID 1              Signal delivered    EACCES
  ───────────────────────────────────────  ──────────────────  
──────────────────
   Process launched through kubectl exec    EACCES              EACCES

  Successful processes had the label cri-containerd.apparmor.d (enforce). 
Failing processes had cri-containerd.apparmor.d//&unconfined (enforce). 
Matching kernel audit records explicitly showed AppArmor denying signal sends 
to that stacked peer. We also observed change_onexec records stating 
“change_profile
  unprivileged unconfined converted to stacking”, and ptrace denials involving 
the same peer.

  We subsequently rebooted both affected nodes back into -38, without changing 
AppArmor userspace, the containerd profile, or either sysctl. On both nodes, 
fresh container-entrypoint probes then passed self-signal and parent-to-child 
signal tests. The same application SDK test binary also passed all 84 test 
cases and
  1,774 assertions on both nodes.

  Our temporary mitigation was to pin the GRUB default to -38, protect
its versioned kernel packages from automatic removal, and temporarily
hold the kernel metapackages. AppArmor and seccomp remain enabled; we
did not use Unconfined profiles or change the host restriction settings.

  Importantly, rollback mitigates the regression affecting ordinary
container entrypoints, but does not resolve the exec-path failure
already reproducible on -38. We therefore consider this a mitigation
rather than a complete fix. We have not bisected the responsible kernel
commit.

  Related upstream reports and proposed fix:

  • containerd #14485 (https://github.com/containerd/containerd/issues/14485)
  • containerd #12886 — earlier exec-path issue 
(https://github.com/containerd/containerd/issues/12886)
  • containerd PR #14487 — proposed stacked-peer rule correction 
(https://github.com/containerd/containerd/pull/14487), still open and unmerged 
when checked.

  Could maintainers confirm the intended profile-transition behavior and
the supported fix or backport? Regression coverage should include both
container entrypoints and CRI exec processes, rather than testing only
one execution path.

** Bug watch added: github.com/containerd/containerd/issues #14485
   https://github.com/containerd/containerd/issues/14485

** Bug watch added: github.com/containerd/containerd/issues #12886
   https://github.com/containerd/containerd/issues/12886

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

Title:
  Regression in 7.0.0-42: AppArmor forced "//&unconfined" stack on
  container processes blocks signals between them (PostgreSQL hangs)

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


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

Reply via email to