Bug 2270929

Summary: systemd-pcrextend service is not able to create /run/log/systemd/tpm2-measure.log
Product: [Fedora] Fedora Reporter: Vitaly Kuznetsov <vkuznets>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: dwalsh, knazekovan, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vitaly Kuznetsov 2024-03-22 09:32:43 UTC
'systemd-pcrextend' is not able to create '/run/log/systemd/tpm2-measure.log' in initramfs (systemd-pcrphase-initrd.service):

Mar 22 09:26:01 vkuznets-f40.1-cvm audit[663]: AVC avc:  denied  { create } for  pid=663 comm="systemd-pcrexte" name="tpm2-measure.log" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=file permissive=0



Reproducible: Always

Steps to Reproduce:
1. Boot a UKI ('kernel-uki-virt') based Fedora image 
2. Observe AVC denial for systemd-pcrphase-initrd.service (/lib/systemd/systemd-pcrextend binary)
Actual Results:  
AVC denial to create /run/log/systemd/tpm2-measure.log

Expected Results:  
Log creation allowed.

Comment 1 Aoife Moloney 2025-02-26 13:00:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.