Bug 2280010 - SELinux is preventing qemu-system-x86 from 'connectto' accesses on the unix_stream_socket /home/username/.config/libvirt/qemu/lib/domain-3-win10-local/fs0-fs.sock.
Summary: SELinux is preventing qemu-system-x86 from 'connectto' accesses on the unix_s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 40
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:2d76873638966560ee675ba4664...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-10 14:03 UTC by Chipeng Li
Modified: 2024-07-30 01:32 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-40.26-1.fc40
Clone Of:
Environment:
Last Closed: 2024-07-30 01:32:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (2.25 KB, text/plain)
2024-05-10 14:03 UTC, Chipeng Li
no flags Details
File: os_info (734 bytes, text/plain)
2024-05-10 14:03 UTC, Chipeng Li
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 2260 0 None open Allow systemd_getty_generator_t to read and write to tty_device_t 2024-07-25 18:44:35 UTC

Description Chipeng Li 2024-05-10 14:03:23 UTC
Description of problem:
1.Create a new VM in user session on Virtual Machine Manager .
2.Add a Filesystem hardware in VM settings
3.Set Filesystem's Driver to `virtiofs`, setup Source and Target path.
4.Startup the VM, reproduce it.
SELinux is preventing qemu-system-x86 from 'connectto' accesses on the unix_stream_socket /home/ml/.config/libvirt/qemu/lib/domain-3-win10-local/fs0-fs.sock.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that qemu-system-x86 should be allowed connectto access on the fs0-fs.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 'qemu-system-x86' --raw | audit2allow -M my-qemusystemx86
# semodule -X 300 -i my-qemusystemx86.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:svirt_t:s0:c46,c109
Target Context                unconfined_u:unconfined_r:unconfined_t:s0:c46,c109
Target Objects                /home/ml/.config/libvirt/qemu/lib/domain-3-win10-
                              local/fs0-fs.sock [ unix_stream_socket ]
Source                        qemu-system-x86
Source Path                   qemu-system-x86
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.18-2.fc40.noarch
Local Policy RPM              selinux-policy-targeted-40.18-2.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.8-300.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Sat Apr 27 17:53:31 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-05-10 22:55:35 JST
Last Seen                     2024-05-10 22:55:35 JST
Local ID                      ead3595a-1021-498f-a1a1-705c550ae464

Raw Audit Messages
type=AVC msg=audit(1715349335.323:333): avc:  denied  { connectto } for  pid=17627 comm="qemu-system-x86" path="/home/ml/.config/libvirt/qemu/lib/domain-3-win10-local/fs0-fs.sock" scontext=unconfined_u:unconfined_r:svirt_t:s0:c46,c109 tcontext=unconfined_u:unconfined_r:unconfined_t:s0:c46,c109 tclass=unix_stream_socket permissive=0


Hash: qemu-system-x86,svirt_t,unconfined_t,unix_stream_socket,connectto

Version-Release number of selected component:
selinux-policy-targeted-40.18-2.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
package:        selinux-policy-targeted-40.18-2.fc40.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.8.8-300.fc40.x86_64
reason:         SELinux is preventing qemu-system-x86 from 'connectto' accesses on the unix_stream_socket /home/username/.config/libvirt/qemu/lib/domain-3-win10-local/fs0-fs.sock.
component:      selinux-policy

Comment 1 Chipeng Li 2024-05-10 14:03:27 UTC
Created attachment 2032539 [details]
File: description

Comment 2 Chipeng Li 2024-05-10 14:03:28 UTC
Created attachment 2032540 [details]
File: os_info

Comment 3 Fedora Update System 2024-07-25 21:54:01 UTC
FEDORA-2024-f6d12d5c36 (selinux-policy-40.26-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-f6d12d5c36

Comment 4 Fedora Update System 2024-07-26 01:58:45 UTC
FEDORA-2024-f6d12d5c36 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-f6d12d5c36`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-f6d12d5c36

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2024-07-30 01:32:29 UTC
FEDORA-2024-f6d12d5c36 (selinux-policy-40.26-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


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