Public bug reported:

On Ubuntu 26.04, removing the last container attached to a user-created
network in rootless Podman fails with:

  Error: cleaning up container <id>: removing container <id> network:
  1 error occurred:
      * rootless netns: kill network process: permission denied

The kernel log shows AppArmor denying the signal that Podman sends to
pasta when it tears down the shared rootless network namespace:

  apparmor="DENIED" operation="signal" class="signal" profile="pasta"
  comm="podman" requested_mask="receive" denied_mask="receive"
  signal=term peer="podman"

Versions:
  passt:    0.0~git20260120.386b5f5-1
  podman:   5.7.0+ds2-3build1
  apparmor: 5.0.2-0ubuntu1~26.04.1
  Ubuntu:   26.04.1 LTS

Steps to reproduce (as a regular user, with no other rootless
containers running on custom networks):

  podman network create testbr
  podman run -d --name a --network testbr docker.io/library/alpine sleep 
infinity
  podman run -d --name b --network testbr docker.io/library/alpine sleep 
infinity
  podman rm -f a; podman rm -f b
  podman network rm testbr

The error is returned by the last "podman rm". It also happens through
the Podman API service, e.g. with docker-compose and an external
network, where "compose down" fails and leaves one container behind.
Containers on the default network are not affected, since each one gets
its own pasta process, which Podman does not need to signal.

The namespace is cleaned up and pasta exits anyway, but Podman reports
the error, and tools built on top of it (compose, Kathara) abort their
cleanup.

The problem is hidden on systems where long-running containers keep the
shared rootless namespace alive, so it only shows up when the last
container leaves it.

Expected: Podman can terminate the pasta process it started.

Proposed fix: allow pasta to receive termination signals from the
podman profile, in /etc/apparmor.d/usr.bin.pasta:

  signal (receive) set=(term, kill) peer=podman,

With this rule added locally, the error disappears and no denials are
logged. Neither usr.bin.pasta, abstractions/pasta nor the podman
profile currently contain any signal rule for this case.

Note: /etc/apparmor.d/usr.bin.pasta has no "include if exists
<local/usr.bin.pasta>", so users cannot apply a local override without
editing the packaged profile.
The attached /etc/apparmor.d/usr.bin.pasta already contains the
proposed rule (line 31), added locally as a workaround; the packaged
profile has no signal rule.

The same denial and error are reproducible on a second Ubuntu 26.04
machine with the original, unmodified profile. This machine was
upgraded from 24.04 to 26.04.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: passt 0.0~git20260120.386b5f5-1
ProcVersionSignature: Ubuntu 7.0.0-42.42-generic 7.0.14
Uname: Linux 7.0.0-42-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Nov 13 21:26:29 2026
InstallationDate: Installed on 2024-12-20 (693 days ago)
InstallationMedia: Ubuntu 24.04.1 LTS "Noble Numbat" - Release amd64 
(20240827.1)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: passt
UpgradeStatus: Upgraded to resolute on 2026-10-10 (34 days ago)
mtime.conffile..etc.apparmor.d.usr.bin.pasta: 2026-11-13T20:38:42.277423

** Affects: passt (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apparmor apport-bug resolute wayland-session

** Patch added: "Allow pasta to receive term/kill signals from the podman 
profile"
   
https://bugs.launchpad.net/bugs/2174446/+attachment/6017884/+files/pasta-apparmor-signal.patch

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

Title:
  AppArmor profile for pasta denies SIGTERM from podman, rootless
  network namespace teardown fails

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


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

Reply via email to