public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: "Bittner, Jan" <Jan.Bittner@kdo.de>
Cc: "passt-dev@passt.top" <passt-dev@passt.top>,
	Paul Holzinger <pholzing@redhat.com>
Subject: Re: [PATCH] apparmor: Fix signaling issues from podman
Date: Mon, 01 Jun 2026 23:08:22 +0200 (CEST)	[thread overview]
Message-ID: <20260601230820.2c4cb7dd@elisabeth> (raw)
In-Reply-To: <be4eef52592341b08433f80995025768@kdo.de>

Jan,

On Thu, 28 May 2026 14:08:40 +0000
"Bittner, Jan" <Jan.Bittner@kdo.de> wrote:

> This fixes a bug that causes a crash in podman. Podman uses signal to
> communicate with pasta. Without this patch apparmor does not allow
> podman to signal pasta and kills pasta instead. Killing pasta causes
> podman to crash. You can reproduce this by starting a rootless podman
> socket and starting a container via the socket using podman remote or
> docker.
> Links: https://bugs.launchpad.net/ubuntu/+source/passt/+bug/2154379
> 
> Signed-off-by: Jan Philipp Bittner <jan.bittner@kdo.de>
> ---
>  contrib/apparmor/usr.bin.pasta | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/contrib/apparmor/usr.bin.pasta b/contrib/apparmor/usr.bin.pasta
> index 56b5024..b0838de 100644
> --- a/contrib/apparmor/usr.bin.pasta
> +++ b/contrib/apparmor/usr.bin.pasta
> @@ -18,6 +18,9 @@ include <tunables/global>
>  profile pasta /usr/bin/pasta{,.avx2} flags=(attach_disconnected) {
>    include <abstractions/pasta>
> 
> +  # Allow podman to signal pasta
> +  signal (receive) peer=podman,

Thanks a lot for investigating this and for the patch.

As we discussed on IRC: a similar issue was reported on Debian:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100135

and there it was "solved" by dropping the stub profile for Podman,
which doesn't seem to be an option for Ubuntu (I'm not sure why):

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100135#12

but, on the other hand, as I was arguing at:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100135#17

according to what seem to be common AppArmor practices, this rule
shouldn't be part of pasta's own profile, rather be in Podman's
profile, which would then include pasta's "abstraction".

That way, pasta would be granted the ability to receive signals from
Podman when started from Podman, but not otherwise. That is, pasta's
abstraction is designed to be the minimum set of rules for all users,
including stand-alone usage or others.

In this case, though, the difference in permissions is minimal, and we
already have plenty of workarounds in place for libvirt's policies, so
it wouldn't really be that bad.

If having this upstream actually helps fixing the issue for Ubuntu
users and it's much more convenient than the alternative, then I think
it should be merged.

But if a proper Podman profile, or at least a starting point, see also:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100135#31

is something that could be introduced relatively soon, then maybe we
should go that way.

And, if not, if shipping a downstream patch in Ubuntu would take a
similar time and effort, I'd rather suggest to go that way, so that we
avoid introducing a slightly wrong rule for others (e.g. Debian).

If it's not the case, though, let me know.

By the way, Paul supplied a minimal reproducer:

  podman unshare --rootless-netns true

-- 
Stefano


      reply	other threads:[~2026-06-01 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 14:08 Bittner, Jan
2026-06-01 21:08 ` Stefano Brivio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260601230820.2c4cb7dd@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=Jan.Bittner@kdo.de \
    --cc=passt-dev@passt.top \
    --cc=pholzing@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).