Bug 1956136

Summary: SELinux is preventing (direxec) from 'execute' accesses on the file /usr/lib/systemd/system-sleep/tlp.
Product: [Fedora] Fedora Reporter: Alexander Scheel <alexander.m.scheel>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:afd98139b6d3bbf6565e250b7acd7942f9d9883a6fe91a41b15f887b048430c2;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-03 17:14:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Alexander Scheel 2021-05-03 00:06:25 UTC
Description of problem:
Same as https://bugzilla.redhat.com/show_bug.cgi?id=1941445: 

Upgraded from F33->F34, touch /.autorelabel, closed laptop lid, came back, opened it back up and got a ton new alerts (~28 before, now at ~114!).
SELinux is preventing (direxec) from 'execute' accesses on the file /usr/lib/systemd/system-sleep/tlp.

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

If you believe that (direxec) should be allowed execute access on the tlp file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c '(direxec)' --raw | audit2allow -M my-direxec
# semodule -X 300 -i my-direxec.pp

Additional Information:
Source Context                system_u:system_r:systemd_sleep_t:s0
Target Context                system_u:object_r:tlp_exec_t:s0
Target Objects                /usr/lib/systemd/system-sleep/tlp [ file ]
Source                        (direxec)
Source Path                   (direxec)
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           tlp-1.3.1-3.fc34.noarch
SELinux Policy RPM            selinux-policy-targeted-34.3-1.fc34.noarch
Local Policy RPM              selinux-policy-targeted-34.3-1.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.11.16-300.fc34.x86_64 #1 SMP Wed
                              Apr 21 13:18:33 UTC 2021 x86_64 x86_64
Alert Count                   1
First Seen                    2021-05-02 20:01:03 EDT
Last Seen                     2021-05-02 20:01:03 EDT
Local ID                      c41572b3-55ff-457d-bf16-51b54bb28c77

Raw Audit Messages
type=AVC msg=audit(1620000063.96:1333): avc:  denied  { execute } for  pid=9800 comm="(direxec)" name="tlp" dev="dm-1" ino=2244177 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:tlp_exec_t:s0 tclass=file permissive=1

Hash: (direxec),systemd_sleep_t,tlp_exec_t,file,execute

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.16-300.fc34.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2021-05-03 17:14:18 UTC

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