Bug 2212731 - [RFE] add rules to make qemu-kvm-ui-dbus work in enforcing mode [NEEDINFO]
Summary: [RFE] add rules to make qemu-kvm-ui-dbus work in enforcing mode
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: RHIVOS 1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 9.3
Assignee: Nikola Knazekova
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 2207940
TreeView+ depends on / blocked
 
Reported: 2023-06-06 07:37 UTC by Sandro Bonazzola
Modified: 2023-07-05 08:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-05 08:37:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:
sbonazzo: needinfo? (nknazeko)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-161562 0 None None None 2023-07-05 08:37:51 UTC

Description Sandro Bonazzola 2023-06-06 07:37:55 UTC
Description of problem:

With bug #2207940 we are introducing a new qemu-kvm feature that requires new selinux rules to work properly in enforcing mode.

selinux denials are available at https://bugzilla.redhat.com/attachment.cgi?id=1967827

For instructions on how to get the test packages and the testing procedure please see bug #2207940

Comment 2 Sandro Bonazzola 2023-06-29 09:01:15 UTC
Tested 20230628 rebase from https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/dui/builds/

on a clean CentOS Stream 9 system as root user and worked flawlessly without any selinux denial.
selinux-policy-targeted-38.1.15-1.el9.noarch

# cat run-script.sh 
#!/usr/bin/bash

/usr/libexec/qemu-kvm \
       --hda /var/lib/libvirt/images/centos.qcow2 \
       -display dbus -device virtio-vga \
       -cpu host -m 4G -smp 2 -enable-kvm \
       --cdrom /var/lib/libvirt/images/CentOS-Stream-9-latest-x86_64-boot.iso

# cat view.sh 
podman run -e DISPLAY \
       -v /run/user/0/:/run/user/0/ \
       -e XDG_RUNTIME_DIR=/run/user/0 --ipc host \
       -e DBUS_SESSION_BUS_ADDRESS \
       --mount "type=bind,$(echo "${DBUS_SESSION_BUS_ADDRESS}" | sed -e 's/unix:path=\(.\+\)/src=\1,dst=\1/')" \
       --security-opt label=disable \
       --privileged --rm -it \
       quay.io/alesgar/libmks

Perhaps we can close this BZ.

Comment 3 Sandro Bonazzola 2023-07-05 08:37:13 UTC
Closing as per comment #2


Note You need to log in before you can comment on or make changes to this bug.