Bug 2271075 - SELinux is preventing swtpm from 'getattr' accesses on the unix_stream_socket unix_stream_socket.
Summary: SELinux is preventing swtpm from 'getattr' accesses on the unix_stream_socket...
Keywords:
Status: CLOSED EOL
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:38ebd8fe2ee858435138d15e9a5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-22 15:13 UTC by Geraldo Simião
Modified: 2025-05-16 08:00 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-16 08:00:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (1.98 KB, text/plain)
2024-03-22 15:13 UTC, Geraldo Simião
no flags Details
File: os_info (721 bytes, text/plain)
2024-03-22 15:13 UTC, Geraldo Simião
no flags Details

Description Geraldo Simião 2024-03-22 15:13:19 UTC
Description of problem:
Creating a TMP2 VM
SELinux is preventing swtpm from 'getattr' accesses on the unix_stream_socket unix_stream_socket.

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

Se você acredita nisso swtpm deve ser permitido getattr acesso no unix_stream_socket unix_stream_socket por padrão.
Then você deve informar que este é um erro.
Você pode gerar um módulo de política local para permitir este acesso.
Do
permitir este acesso por agora executando:
# 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:system_r:virtqemud_t:s0
Target Objects                unix_stream_socket [ unix_stream_socket ]
Source                        swtpm
Source Path                   swtpm
Port                          <Desconhecido>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.15-1.fc40.noarch
Local Policy RPM              selinux-policy-targeted-40.15-1.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.8.1-300.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Mar 20 04:39:30 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-03-22 10:23:37 -03
Last Seen                     2024-03-22 10:23:37 -03
Local ID                      493ed4d1-adf1-4dde-9985-8d956a0eee43

Raw Audit Messages
type=AVC msg=audit(1711113817.188:802): avc:  denied  { getattr } for  pid=1225793 comm="swtpm" path="socket:[1017453]" dev="sockfs" ino=1017453 scontext=system_u:system_r:swtpm_t:s0 tcontext=system_u:system_r:virtqemud_t:s0 tclass=unix_stream_socket permissive=1


Hash: swtpm,swtpm_t,virtqemud_t,unix_stream_socket,getattr

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

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing swtpm from 'getattr' accesses on the unix_stream_socket unix_stream_socket.
package:        selinux-policy-targeted-40.15-1.fc40.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.8.1-300.fc40.x86_64
comment:        Creating a TMP2 VM
component:      selinux-policy

Comment 1 Geraldo Simião 2024-03-22 15:13:22 UTC
Created attachment 2023062 [details]
File: description

Comment 2 Geraldo Simião 2024-03-22 15:13:24 UTC
Created attachment 2023063 [details]
File: os_info

Comment 3 Stefan Berger 2024-09-30 19:49:07 UTC
The policy used for FC40 does already have this rule here:

swtpm.te:allow swtpm_t virtqemud_t:unix_stream_socket { read write getattr };

The denial should not occur anymore. We should be able to close this issue.

Comment 4 Aoife Moloney 2025-04-25 10:22:00 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Aoife Moloney 2025-05-16 08:00:20 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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