Bug 2295268

Summary: SELinux is preventing /usr/sbin/libvirt-dbus from 'connectto' accesses on the unix_stream_socket /run/libvirt/virtqemud-sock.
Product: [Fedora] Fedora Reporter: Steve <y9t7sypezp>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, y9t7sypezp, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:cb18bff51f0aba9df6e1df5ad8b9f77ec0db7ff7b7fd954050036b0c4ba752aa;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-02 19:19:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: description none

Description Steve 2024-07-02 19:15:12 UTC
Description of problem:
Use "cockpit" to list virtual machines. Must be in administrator mode.
SELinux is preventing /usr/sbin/libvirt-dbus from 'connectto' accesses on the unix_stream_socket /run/libvirt/virtqemud-sock.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow daemons to enable cluster mode
Then you must tell SELinux about this by enabling the 'daemons_enable_cluster_mode' boolean.

Do
setsebool -P daemons_enable_cluster_mode 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that libvirt-dbus should be allowed connectto access on the virtqemud-sock unix_stream_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'pool-libvirt-db' --raw | audit2allow -M my-poollibvirtdb
# semodule -X 300 -i my-poollibvirtdb.pp

Additional Information:
Source Context                system_u:system_r:virt_dbus_t:s0
Target Context                system_u:system_r:virtqemud_t:s0
Target Objects                /run/libvirt/virtqemud-sock [ unix_stream_socket ]
Source                        pool-libvirt-db
Source Path                   /usr/sbin/libvirt-dbus
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           libvirt-dbus-1.4.1-4.fc40.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-41.7-1.fc41.noarch
Local Policy RPM              selinux-policy-targeted-41.7-1.fc41.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.10.0-0.rc6.50.fc41.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Mon Jul 1 16:16:00 UTC 2024 x86_64
Alert Count                   3
First Seen                    2024-07-02 12:05:14 PDT
Last Seen                     2024-07-02 12:07:16 PDT
Local ID                      95771ed4-0d6d-4694-a77a-06af7a229928

Raw Audit Messages
type=AVC msg=audit(1719947236.835:470): avc:  denied  { connectto } for  pid=3231 comm="pool-libvirt-db" path="/run/libvirt/virtqemud-sock" scontext=system_u:system_r:virt_dbus_t:s0 tcontext=system_u:system_r:virtqemud_t:s0 tclass=unix_stream_socket permissive=0


type=SYSCALL msg=audit(1719947236.835:470): arch=x86_64 syscall=connect success=no exit=EACCES a0=7 a1=7fba057ff4d0 a2=6e a3=7fb9f400b250 items=0 ppid=1 pid=3231 auid=4294967295 uid=968 gid=968 euid=968 suid=968 fsuid=968 egid=968 sgid=968 fsgid=968 tty=(none) ses=4294967295 comm=pool-libvirt-db exe=/usr/sbin/libvirt-dbus subj=system_u:system_r:virt_dbus_t:s0 key=(null)

Hash: pool-libvirt-db,virt_dbus_t,virtqemud_t,unix_stream_socket,connectto

Version-Release number of selected component:
selinux-policy-targeted-41.7-1.fc41.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing /usr/sbin/libvirt-dbus from 'connectto' accesses on the unix_stream_socket /run/libvirt/virtqemud-sock.
type:           libreport
kernel:         6.10.0-0.rc6.50.fc41.x86_64
package:        selinux-policy-targeted-41.7-1.fc41.noarch
component:      selinux-policy
comment:        Use "cockpit" to list virtual machines. Must be in administrator mode.
hashmarkername: setroubleshoot
component:      selinux-policy

Comment 1 Steve 2024-07-02 19:15:14 UTC
Created attachment 2038721 [details]
File: os_info

Comment 2 Steve 2024-07-02 19:15:16 UTC
Created attachment 2038722 [details]
File: description

Comment 3 Zdenek Pytela 2024-07-02 19:19:13 UTC

*** This bug has been marked as a duplicate of bug 2295200 ***

Comment 4 Steve 2024-07-02 19:22:58 UTC
Contrary to what I said in Bug 2293199, Comment 6, this does indeed occur with F41 Workstation. You need to log in as an administrator. Hence the duplicate.