Image

/etc/apparmor.d/usr.bin.pasta is missing in Ubuntu's package

Bug #2077158 reported by Akihiro Suda
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
Invalid
Undecided
Unassigned
passt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu's apparmor package contains `/etc/apparmor.d/usr.bin.passt`, but accidentally lacks `/etc/apparmor.d/usr.bin.pasta` which is needed for `/usr/bin/pasta` (included in `passt` package).

Ubuntu has to cherry-pick <https://salsa.debian.org/sbrivio/passt/-/commit/4a77ef55c34c579d4845aa2dfd003abf2195ea9b>.

ref: Comment from Stefano Brivio (sbrivio-rh) <https://github.com/moby/moby/issues/48257#issuecomment-2293176303>

> ### About the AppArmor issue
>
> I finally had the chance to check this on Ubuntu 23.10, 24.04, a current snapshot of the upcoming 24.10, a current openSUSE Tumbleweed version, and a current Debian unstable (sid) installation.
>
> The issue occurs on Ubuntu 23.10 (`passt-0.0~git20230627.289301b-1`) and 24.04 (`passt-0.0~git20240220.1e6f92b-1`) only (not on 24.10, not on openSUSE, not on Debian) because, together with the change outlined in [Ubuntu's SE045 specification](https://discourse.ubuntu.com/t/spec-unprivileged-user-namespace-restrictions-via-apparmor-in-ubuntu-23-10/37626) and AppArmor's [wiki](https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction), a Debian package [commit](https://salsa.debian.org/sbrivio/passt/-/commit/4a77ef55c34c579d4845aa2dfd003abf2195ea9b) is also missing from those versions.
>
> That commit actually includes the AppArmor profile for `pasta(1)` in the package. The AppArmor ABI of the profile is `3.0`, so it doesn't contain an explicit `allow userns create`, but the mere fact that there's a profile with ABI 3.0 allows pasta to create its sandboxing user namespace.
>
> Quoting from Ubuntu's SE045 specification, one step for that change should have been:
>
> > identify all packages within the Ubuntu archive that make use of unprivileged user namespaces
>
> but this was somehow missed, I guess (I'm the maintainer of the Debian package, but I didn't get any notification).
>
> Now, while Ubuntu 24.10 and openSUSE Tumbleweed ship AppArmor packages with support for the `4.0` ABI, Debian unstable still ships 3.1.17, so, to keep things simple and still ship a single AppArmor profile (developed upstream), I won't update the profile to ABI 4.0 yet. Updating the profile wouldn't solve the issue anyway.
>
> So, how do we solve this? We would need to backport that Debian commit to Ubuntu 24.04 (and possibly 23.10), but I can't seem to register a Launchpad account to even start the [process](https://wiki.ubuntu.com/UbuntuBackports#Procedure) (wrong email address? :smile: ). If somebody could do that, or at least **file an Ubuntu issue**, that would be great. Thanks.

Revision history for this message Image
Georgia Garcia (georgiag) wrote :

Since the profile is not shipped by the apparmor package, I'm marking it as invalid and adding the correct package passt

Changed in apparmor (Ubuntu):
status: New → Invalid
summary: - /etc/apparmor.d/usr.bin.pasta is missing in Ubuntu's apparmor package
+ /etc/apparmor.d/usr.bin.pasta is missing in Ubuntu's package
Revision history for this message Image
intrigeri (intrigeri) wrote :

I understand the fix is in 0.0~git20250217.a1e48a0-1 which is in Plucky. Could someone please verify and adjust metadata accordingly?

Revision history for this message Image
Akihiro Suda (suda-kyoto) wrote :

The fix still has to be cherry-picked to Ubuntu 24.04

https://github.com/moby/moby/issues/48257#issuecomment-2293176303

Revision history for this message Image
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in passt (Ubuntu):
status: New → Confirmed
Revision history for this message Image
Taylor Raack (track16) wrote (last edit ):

Running Ubuntu 26.04 with passt version 0.0~git20250217.a1e48a0-1. The profile /etc/apparmor.d/usr.bin.pasta is now present (so the original issue is fixed), but rootless podman-compose stacks still fail with:

Error: rootless netns: kill network process: permission denied

dmesg shows:

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

The profile does not permit pasta to receive signals from podman. The fix is to add to the profile:

signal receive set=(term hup kill int quit) peer=podman,
signal send set=(term hup kill int quit) peer=podman,

Both passt and podman are Ubuntu-packaged. A standard rootless podman-compose setup should work without manual AppArmor overrides.

Revision history for this message Image
Jan Philipp Bittner (uzr623) wrote :

@Taylor Raack (track16) I created a separate bug for this issue and provided a patch there: https://bugs.launchpad.net/ubuntu/+source/podman/+bug/2154379

Changed in passt (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.