public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: "Jörg Sonnenberger" <joerg@bec.de>,
	"Danish Prakash" <danish.prakash@suse.com>,
	"Christian Boltz" <suse-beta@cboltz.de>,
	"Paul Holzinger" <pholzing@redhat.com>
Subject: [PATCH 1/3] apparmor: Add mount rule with explicit, empty source in passt abstraction
Date: Wed,  3 Apr 2024 21:04:19 +0200	[thread overview]
Message-ID: <20240403190425.2848764-2-sbrivio@redhat.com> (raw)
In-Reply-To: <20240403190425.2848764-1-sbrivio@redhat.com>

For the policy to work as expected across either AppArmor commit
9d3f8c6cc05d ("parser: fix parsing of source as mount point for
propagation type flags") and commit 300889c3a4b7 ("parser: fix option
flag processing for single conditional rules"), we need one mount
rule with matching mount options as "source" (that is, without
source), and one without mount options and an explicit, empty source.

Link: https://github.com/containers/buildah/issues/5440
Link: https://bugzilla.suse.com/show_bug.cgi?id=1221840
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 contrib/apparmor/abstractions/passt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/apparmor/abstractions/passt b/contrib/apparmor/abstractions/passt
index 6bb25e0..61ec32c 100644
--- a/contrib/apparmor/abstractions/passt
+++ b/contrib/apparmor/abstractions/passt
@@ -27,6 +27,7 @@
 
   /					r,	# isolate_prefork(), isolation.c
   mount options=(rw, runbindable) /,
+  mount		""	-> "/",
   mount		""	-> "/tmp/",
   pivot_root	"/tmp/" -> "/tmp/",
   umount	"/",
-- 
@@ -27,6 +27,7 @@
 
   /					r,	# isolate_prefork(), isolation.c
   mount options=(rw, runbindable) /,
+  mount		""	-> "/",
   mount		""	-> "/tmp/",
   pivot_root	"/tmp/" -> "/tmp/",
   umount	"/",
-- 
2.43.0


  reply	other threads:[~2024-04-03 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 19:04 [PATCH 0/3] Assorted AppArmor policy fixes for passt and pasta Stefano Brivio
2024-04-03 19:04 ` Stefano Brivio [this message]
2024-04-03 19:04 ` [PATCH 2/3] apparmor: Expand scope of @{run}/user access, allow writing PID files too Stefano Brivio
2024-04-03 19:04 ` [PATCH 3/3] apparmor: Fix access to procfs namespace entries in pasta's abstraction Stefano Brivio

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=20240403190425.2848764-2-sbrivio@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=danish.prakash@suse.com \
    --cc=joerg@bec.de \
    --cc=passt-dev@passt.top \
    --cc=pholzing@redhat.com \
    --cc=suse-beta@cboltz.de \
    /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).