Bug 1956141 - SELinux is preventing tlp-readconfs from 'ioctl' accesses on the file /run/tlp/tlp-run.conf_tmpMxC3d6.
Summary: SELinux is preventing tlp-readconfs from 'ioctl' accesses on the file /run/tl...
Keywords:
Status: CLOSED DUPLICATE of bug 1956139
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 34
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:bebcffff4bf83429adbffa0b663...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 00:10 UTC by Alexander Scheel
Modified: 2021-05-03 11:17 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-03 11:17:52 UTC
Type: ---


Attachments (Terms of Use)

Description Alexander Scheel 2021-05-03 00:10:44 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 tlp-readconfs from 'ioctl' accesses on the file /run/tlp/tlp-run.conf_tmpMxC3d6.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/run/tlp/tlp-run.conf_tmpMxC3d6 default label should be tlp_var_run_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /run/tlp/tlp-run.conf_tmpMxC3d6

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that tlp-readconfs should be allowed ioctl access on the tlp-run.conf_tmpMxC3d6 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 'tlp-readconfs' --raw | audit2allow -M my-tlpreadconfs
# semodule -X 300 -i my-tlpreadconfs.pp

Additional Information:
Source Context                system_u:system_r:systemd_sleep_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /run/tlp/tlp-run.conf_tmpMxC3d6 [ file ]
Source                        tlp-readconfs
Source Path                   tlp-readconfs
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
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                      648f657a-9277-421f-8127-2916407af0eb

Raw Audit Messages
type=AVC msg=audit(1620000063.629:1348): avc:  denied  { ioctl } for  pid=9875 comm="tlp-readconfs" path="/run/tlp/tlp-run.conf_tmpMxC3d6" dev="tmpfs" ino=2406 ioctlcmd=0x5401 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=1


Hash: tlp-readconfs,systemd_sleep_t,var_run_t,file,ioctl

Version-Release number of selected component:
selinux-policy-targeted-34.3-1.fc34.noarch

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 11:17:52 UTC

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


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