Bug 2282974

Summary: SELinux is preventing virtiofsd from 'unmount' accesses on the filesystem .
Product: [Fedora] Fedora Reporter: Frank Bures <buresf>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: buresf, dwalsh, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a066a0d5a4ffdba0cc57c381ebfcd99226e8d9694918655ebc24c4de7e117aa9;VARIANT_ID=kde;
Fixed In Version: selinux-policy-40.26-1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-30 01:32:33 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: description
none
File: os_info none

Description Frank Bures 2024-05-23 13:20:11 UTC
Description of problem:
When starting QEMU/KVM Windows 11 guest in F40, this error is generated.  However, the VM starts normally.
SELinux is preventing virtiofsd from 'unmount' accesses on the filesystem .

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

If you believe that virtiofsd should be allowed unmount access on the  filesystem 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 'virtiofsd' --raw | audit2allow -M my-virtiofsd
# semodule -X 300 -i my-virtiofsd.pp

Additional Information:
Source Context                system_u:system_r:virtqemud_t:s0
Target Context                system_u:object_r:fs_t:s0
Target Objects                 [ filesystem ]
Source                        virtiofsd
Source Path                   virtiofsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.20-1.fc40.noarch
Local Policy RPM              selinux-policy-targeted-40.20-1.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.10-300.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri May 17 21:20:54 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-05-23 09:14:03 EDT
Last Seen                     2024-05-23 09:14:03 EDT
Local ID                      aa00afd2-7161-45fa-bf59-fb689620514d

Raw Audit Messages
type=AVC msg=audit(1716470043.566:868): avc:  denied  { unmount } for  pid=7597 comm="virtiofsd" scontext=system_u:system_r:virtqemud_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem permissive=1


Hash: virtiofsd,virtqemud_t,fs_t,filesystem,unmount

Version-Release number of selected component:
selinux-policy-targeted-40.20-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing virtiofsd from 'unmount' accesses on the filesystem .
package:        selinux-policy-targeted-40.20-1.fc40.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.8.10-300.fc40.x86_64
event_log:      2024-05-23-09:17:09> Looking for similar problems in bugzilla
comment:        When starting QEMU/KVM Windows 11 guest in F40, this error is generated.  However, the VM starts normally.
component:      selinux-policy

Comment 1 Frank Bures 2024-05-23 13:20:13 UTC
Created attachment 2034797 [details]
File: description

Comment 2 Frank Bures 2024-05-23 13:20:15 UTC
Created attachment 2034798 [details]
File: os_info

Comment 3 Fedora Update System 2024-07-25 21:54:05 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:48 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:33 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.