Bug 2270225

Summary: SELinux is preventing rpc-virtqemud from 'relabelfrom' accesses on the diretório tpm2.
Product: [Fedora] Fedora Reporter: Geraldo Simião <geraldo.simiao.kutz>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: agurenko, dwalsh, geraldo.simiao.kutz, knazekovan, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c8d3f9895b1243bd7b709d92dbbf9e3d92c25e06cae39495680d596a5109ccc3;VARIANT_ID=kde;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-04 16:29:12 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 Geraldo Simião 2024-03-19 05:31:35 UTC
Description of problem:
trying to create new VM, with TPM2 enabled
SELinux is preventing rpc-virtqemud from 'relabelfrom' accesses on the diretório tpm2.

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

Se você acredita nisso rpc-virtqemud deve ser permitido relabelfrom acesso no tpm2 directory 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 'rpc-virtqemud' --raw | audit2allow -M my-rpcvirtqemud
# semodule -X 300 -i my-rpcvirtqemud.pp

Additional Information:
Source Context                system_u:system_r:virtqemud_t:s0
Target Context                system_u:object_r:virt_var_lib_t:s0
Target Objects                tpm2 [ dir ]
Source                        rpc-virtqemud
Source Path                   rpc-virtqemud
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                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.0-63.fc40.1.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Tue Mar 12 20:12:53 UTC 2024
                              x86_64
Alert Count                   37
First Seen                    2024-02-21 11:18:55 -03
Last Seen                     2024-03-19 02:14:54 -03
Local ID                      39e3c603-edf4-4984-8110-e94d0a142a60

Raw Audit Messages
type=AVC msg=audit(1710825294.887:263): avc:  denied  { relabelfrom } for  pid=6097 comm="rpc-virtqemud" name="tpm2" dev="sda2" ino=2719379 scontext=system_u:system_r:virtqemud_t:s0 tcontext=system_u:object_r:virt_var_lib_t:s0 tclass=dir permissive=1


Hash: rpc-virtqemud,virtqemud_t,virt_var_lib_t,dir,relabelfrom

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 rpc-virtqemud from 'relabelfrom' accesses on the diretório tpm2.
package:        selinux-policy-targeted-40.15-1.fc40.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.8.0-63.fc40.1.x86_64
comment:        trying to create new VM, with TPM2 enabled
component:      selinux-policy

Comment 1 Geraldo Simião 2024-03-19 05:31:37 UTC
Created attachment 2022432 [details]
File: description

Comment 2 Geraldo Simião 2024-03-19 05:31:39 UTC
Created attachment 2022433 [details]
File: os_info

Comment 3 Zdenek Pytela 2024-05-04 16:29:12 UTC

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