Bug 1403964

Summary: SELinux is preventing ethtool from 'write' accesses on the file /run/tlp/lock_tlp.
Product: [Fedora] Fedora Reporter: josh
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dominick.grift, dwalsh, fedora.243908, lvrabec, mgrepl, michael, oliver, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ece3b21902fb324d8d2631bd9787e18d688dc7826f49e6f28a68eb7b27a7b8e7;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-225.16.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-19 23:03:36 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 josh 2016-12-12 17:51:13 UTC
Description of problem:
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:tlp_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-225.1.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.12-300.fc25.x86_64 #1 SMP Fri
                              Dec 2 17:52:11 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-12-12 12:49:49 EST
Last Seen                     2016-12-12 12:49:49 EST
Local ID                      2d118a62-9555-4485-a738-3345c1a0fa86

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


Hash: ethtool,ifconfig_t,tlp_var_run_t,file,write

Version-Release number of selected component:
selinux-policy-3.13.1-225.1.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.12-300.fc25.x86_64
type:           libreport

Comment 1 Michael Reiger 2017-01-16 12:59:53 UTC
Description of problem:
This happened with a power state transition (plugging/unplugging power supply.)

Version-Release number of selected component:
selinux-policy-3.13.1-225.6.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.3-200.fc25.x86_64
type:           libreport

Comment 2 Oliver Jan Krylow 2017-04-05 18:22:33 UTC
Description of problem:
Connected laptop to AC.

Version-Release number of selected component:
selinux-policy-3.13.1-225.11.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.10.6-200.fc25.x86_64
type:           libreport

Comment 3 Fedora Update System 2017-05-15 21:20:31 UTC
selinux-policy-3.13.1-225.16.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9a20533d62

Comment 4 Fedora Update System 2017-05-17 01:08:59 UTC
selinux-policy-3.13.1-225.16.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9a20533d62

Comment 5 Fedora Update System 2017-05-19 23:03:36 UTC
selinux-policy-3.13.1-225.16.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.