aboutgitcodebugslistschat
path: root/doc/platform-requirements
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-12-23 01:59:34 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-12-23 01:59:34 +0100
commitd2c5133990a7758bfa567fc73216393498949e9b (patch)
treef6ffdebbcc2f9a07126ad54eac7aa564b678eaa9 /doc/platform-requirements
parentb40f5cd8c8e16c6eceb1f26eb895527fda84068b (diff)
downloadpasst-d2c5133990a7758bfa567fc73216393498949e9b.tar
passt-d2c5133990a7758bfa567fc73216393498949e9b.tar.gz
passt-d2c5133990a7758bfa567fc73216393498949e9b.tar.bz2
passt-d2c5133990a7758bfa567fc73216393498949e9b.tar.lz
passt-d2c5133990a7758bfa567fc73216393498949e9b.tar.xz
passt-d2c5133990a7758bfa567fc73216393498949e9b.tar.zst
passt-d2c5133990a7758bfa567fc73216393498949e9b.zip
selinux: Enable read and watch permissions on netns directory as well
With commit 7aeda16a7818 ("selinux: Transition to pasta_t in containers"), we need to make sure that pasta can access the target namespace directory passed by Podman, and, in a general case, we have all the permissions we need. But if we now start a container without the Podman changes referenced by commit fd1bcc30af07 ("selinux: add container_var_run_t type transition"), or with them, but with the container being created before those and without a reboot in between, we'll additionally need 'read' and 'watch' permissions on user_tmp_t directory as well, as user_tmp_t is still the (inconsistent) context of the namespace entry. Otherwise, on a container start/restart, we'll get SELinux denials: type=AVC msg=audit(1766451401.296:184): avc: denied { read } for pid=2159 comm="pasta.avx2" name="netns" dev="tmpfs" ino=60 scontext=unconfined_u:unconfined_r:pasta_t:s0-s0:c0.c1023 tcontext=unconfined_u:obje ct_r:user_tmp_t:s0 tclass=dir permissive=1 type=AVC msg=audit(1766451401.298:185): avc: denied { watch } for pid=2159 comm="pasta.avx2" path="/run/user/1001/netns" dev="tmpfs" ino=60 scontext=unconfined_u:unconfined_r:pasta_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir permissive=1 This can be reproduced quite simply: $ podman create -q --name hello hello 6c4eaf15a03edf799673a97d84d0331f3a3f34a11015b58c69318101a3232770 [upgrade passt's SELinux policy to a version including 7aeda16a7818] $ podman start hello Error: unable to start container "6c4eaf15a03edf799673a97d84d0331f3a3f34a11015b58c69318101a3232770": pasta failed with exit code 1: netns dir open: Permission denied, exiting Reported-by: Tuomo Soini <tis@foobar.fi> Fixes: 7aeda16a7818 ("selinux: Transition to pasta_t in containers") Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'doc/platform-requirements')
0 files changed, 0 insertions, 0 deletions