Bug 2277041 - SELinux is preventing swtpm from 'open' accesses on the file /var/log/swtpm/libvirt/qemu/win10-swtpm.log.
Summary: SELinux is preventing swtpm from 'open' accesses on the file /var/log/swtpm/l...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: swtpm
Version: 40
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stefan Berger
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:14681099d35e98e5d44244bf0e0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-25 03:48 UTC by btFedoraUser
Modified: 2024-05-03 01:44 UTC (History)
4 users (show)

Fixed In Version: swtpm-0.8.1-7.fc40
Clone Of:
Environment:
Last Closed: 2024-05-03 01:44:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (1.95 KB, text/plain)
2024-04-25 03:48 UTC, btFedoraUser
no flags Details
File: os_info (682 bytes, text/plain)
2024-04-25 03:48 UTC, btFedoraUser
no flags Details

Description btFedoraUser 2024-04-25 03:48:35 UTC
Description of problem:
tried to create new VM using Virtual machine manager, went through the settings configuration and this error occured
SELinux is preventing swtpm from 'open' accesses on the file /var/log/swtpm/libvirt/qemu/win10-swtpm.log.

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

If you believe that swtpm should be allowed open access on the win10-swtpm.log file 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 'swtpm' --raw | audit2allow -M my-swtpm
# semodule -X 300 -i my-swtpm.pp

Additional Information:
Source Context                system_u:system_r:swtpm_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log/swtpm/libvirt/qemu/win10-swtpm.log [ file
                              ]
Source                        swtpm
Source Path                   swtpm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.16-1.fc40.noarch
Local Policy RPM              swtpm-selinux-0.8.1-5.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.7-300.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Apr 17 19:21:08 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-04-25 11:40:44 +08
Last Seen                     2024-04-25 11:40:44 +08
Local ID                      cc99cfd7-278b-4ed0-925d-19cc7bb0d1d8

Raw Audit Messages
type=AVC msg=audit(1714016444.474:357): avc:  denied  { open } for  pid=3349 comm="swtpm" path="/var/log/swtpm/libvirt/qemu/win10-swtpm.log" dev="sda3" ino=340415 scontext=system_u:system_r:swtpm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0


Hash: swtpm,swtpm_t,var_log_t,file,open

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

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing swtpm from 'open' accesses on the file /var/log/swtpm/libvirt/qemu/win10-swtpm.log.
package:        selinux-policy-targeted-40.16-1.fc40.noarch
component:      swtpm
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.8.7-300.fc40.x86_64
comment:        tried to create new VM using Virtual machine manager, went through the settings configuration and this error occured
component:      swtpm

Comment 1 btFedoraUser 2024-04-25 03:48:38 UTC
Created attachment 2028988 [details]
File: description

Comment 2 btFedoraUser 2024-04-25 03:48:40 UTC
Created attachment 2028989 [details]
File: os_info

Comment 3 Fedora Update System 2024-05-01 18:02:50 UTC
FEDORA-2024-f53eab6892 (swtpm-0.8.1-7.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-f53eab6892

Comment 4 Fedora Update System 2024-05-01 18:38:23 UTC
FEDORA-2024-f53eab6892 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-f53eab6892`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-f53eab6892

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

Comment 5 Fedora Update System 2024-05-03 01:44:15 UTC
FEDORA-2024-f53eab6892 (swtpm-0.8.1-7.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.