Bug 2176813

Summary: passt-selinux interfaces need update to allow libvirt to run domain as root, map arbitrary ports
Product: Red Hat Enterprise Linux 9 Reporter: Stefano Brivio <sbrivio>
Component: passtAssignee: Stefano Brivio <sbrivio>
Status: CLOSED ERRATA QA Contact: Lei Yang <leiyang>
Severity: urgent Docs Contact:
Priority: medium    
Version: 9.2CC: chayang, jinzhao, juzhang, laine, leiyang, pvlasin, yalzhang, ymankad
Target Milestone: rcKeywords: Triaged
Target Release: 9.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: passt-0^20230222.g4ddbcb9-2.el9_2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2179034 (view as bug list) Environment:
Last Closed: 2023-05-09 07:43:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2179034    

Description Stefano Brivio 2023-03-09 11:27:32 UTC
The SELinux policy interfaces in the current passt-selinux package for RHEL 9.2 only allow libvirt to run a guest domain as unprivileged user, and to map ports in "http_port_t".

However, libvirt guests can be started as root, and the guest configuration can very reasonably include arbitrary port mappings.

We need these changes from upstream:

  https://passt.top/passt/commit/?id=41bc669866b9e408d8d4966ee06e01784949b98d
  contrib/selinux: Let passt write to stdout and stderr when it starts

  https://passt.top/passt/commit/?id=de9b0cb5fee2ea00ed7e7877ef9be8c446bca134
  contrib/selinux: Allow binding and connecting to all UDP and TCP ports

  https://passt.top/passt/commit/?id=d361fe6e809bdf3539d764cfa5058f46ce51bcbf
  contrib/selinux: Let interface users set paths for log, PID, socket files

to have proper libvirt support with SELinux on RHEL 9.2.

See also bz2172268 for the matching policy update on libvirt's side, which I'm also going to update in a bit.

Comment 30 errata-xmlrpc 2023-05-09 07:43:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (passt bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2292