From 74e6f48038e64bbdfa5fa265db330f95ce68c182 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 7 Nov 2023 12:28:27 +0100 Subject: selinux: Allow passt to talk over unconfined_t UNIX domain socket for --fd If passt is started with --fd to talk over a pre-opened UNIX domain socket, we don't really know what label might be associated to it, but at least for an unconfined_t socket, this bit of policy wouldn't belong to anywhere else: enable that here. This is rather loose, of course, but on the other hand passt will sandbox itself into an empty filesystem, so we're not really adding much to the attack surface except for what --fd is supposed to do. Reported-by: Matej Hrica Link: https://bugzilla.redhat.com/show_bug.cgi?id=2247221 Signed-off-by: Stefano Brivio --- contrib/selinux/passt.te | 1 + 1 file changed, 1 insertion(+) (limited to 'contrib/selinux/passt.te') diff --git a/contrib/selinux/passt.te b/contrib/selinux/passt.te index ea768d9..401c9c3 100644 --- a/contrib/selinux/passt.te +++ b/contrib/selinux/passt.te @@ -124,3 +124,4 @@ allow passt_t self:icmp_socket { bind create setopt read write }; allow passt_t user_tmp_t:dir { add_name write }; allow passt_t user_tmp_t:file { create open }; allow passt_t user_tmp_t:sock_file { create read write unlink }; +allow passt_t unconfined_t:unix_stream_socket { read write }; -- cgit v1.2.3