Bug 1376211

Summary: SELinux is preventing ethtool from 'write' accesses on the file /run/tlp/lock_tlp.
Product: [Fedora] Fedora Reporter: Fernando <fmuro>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: charles-henri, dominick.grift, dwalsh, hno, lvrabec, marcvanwageningen, mgrepl, penguin01210, plautrba, sahin508, thaeronline, thebeardedhermit, zhelezov
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f25f8bb1b997805501f0ba7d8e7f216a34763b967ebdef7ef1599171ce31e9a5;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:47:30 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 Fernando 2016-09-14 21:27:45 UTC
Description of problem:
Suspend, resume, and the alert pops up.
SELinux is preventing ethtool from 'write' accesses on the file /run/tlp/lock_tlp.

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

If you believe that ethtool should be allowed write access on the lock_tlp 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 'ethtool' --raw | audit2allow -M my-ethtool
# semodule -X 300 -i my-ethtool.pp

Additional Information:
Source Context                system_u:system_r:ifconfig_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /run/tlp/lock_tlp [ file ]
Source                        ethtool
Source Path                   ethtool
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.14.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.7.2-201.fc24.x86_64 #1 SMP Fri
                              Aug 26 15:58:40 UTC 2016 x86_64 x86_64
Alert Count                   4
First Seen                    2016-09-12 22:57:23 CEST
Last Seen                     2016-09-14 23:22:12 CEST
Local ID                      97ba48b8-a55c-4e20-bb32-f34a1094a29d

Raw Audit Messages
type=AVC msg=audit(1473888132.602:585): avc:  denied  { write } for  pid=10399 comm="ethtool" path="/run/tlp/lock_tlp" dev="tmpfs" ino=12063 scontext=system_u:system_r:ifconfig_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0


Hash: ethtool,ifconfig_t,var_run_t,file,write

Version-Release number of selected component:
selinux-policy-3.13.1-191.14.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.7.2-201.fc24.x86_64
type:           libreport

Potential duplicate: bug 1374835

Comment 1 Thaer Maddah 2016-09-24 07:40:27 UTC
Description of problem:
this happens after wakeup my Lenovo laptop

Version-Release number of selected component:
selinux-policy-3.13.1-191.16.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.7.4-200.fc24.x86_64
type:           libreport

Comment 2 Fedora Admin XMLRPC Client 2016-09-27 15:07:11 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Henrik Nordstrom 2016-10-14 10:49:38 UTC
Description of problem:
I think the warning came up when I connected power to my laptop while connected to wired network.

Version-Release number of selected component:
selinux-policy-3.13.1-191.18.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.7.6-200.fc24.x86_64
type:           libreport

Comment 4 Fernando 2016-10-14 13:00:21 UTC
Henrik, I've recently noticed it when just pluging in the power, with wifi.

Comment 5 Vladimir Zhelezov 2016-10-24 19:15:05 UTC
Got the audit event every time I switched between AC and battery. Seems to be cured after changing the label of /var/run/tlp/lock_tlp to ifconfig_var_run_t.

# semanage fcontext -a -t ifconfig_var_run_t /var/run/tlp/lock_tlp
# restorecon -R -v /var/run/tlp/lock_tlp

Comment 6 Shaun Assam 2016-11-14 00:10:17 UTC
Description of problem:
- Resumed from Hibernation, logged in, SELinux notification appeared.

Version-Release number of selected component:
selinux-policy-3.13.1-191.21.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.8.7-200.fc24.x86_64
type:           libreport

Comment 7 Lukas Vrabec 2016-11-16 13:58:08 UTC
Fixed in fedora rawhide by adding new tlp policy. AFter some testing will be also added to F25 and F24

Comment 8 Fernando 2017-07-07 15:52:50 UTC
Hi Lukas, did the testing go wrong?

Comment 9 Fedora End Of Life 2017-07-25 23:02:30 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 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, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 10 Fernando 2017-07-29 14:25:44 UTC
Hi Lukas, sorry to disturb you again. This was fixed in rawhide last november, as you reported, but it was never backported to 24 or 25, and it's actually also happening in 26. Will the fix come soon?

Comment 11 Fedora End Of Life 2018-05-03 08:01:52 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 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, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2018-05-29 11:47:30 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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