From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id ADE055A0277; Tue, 7 Nov 2023 13:28:50 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] selinux: Allow passt to talk over unconfined_t UNIX domain socket for --fd Date: Tue, 7 Nov 2023 13:28:50 +0100 Message-Id: <20231107122850.1673680-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: IRBHFCM26DN6PI6ARIJHCAKQ3DN7X6CC X-Message-ID-Hash: IRBHFCM26DN6PI6ARIJHCAKQ3DN7X6CC X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Matej Hrica X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- Same with this one: I'm posting this to ease reviews, but I just applied it as I don't actually expect reviews on SELinux rules. :) contrib/selinux/passt.te | 1 + 1 file changed, 1 insertion(+) 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 }; -- 2.39.2