Bug 1416993

Summary: SELinux is preventing iw from 'write' accesses on the file /run/tlp/lock_tlp.
Product: [Fedora] Fedora Reporter: arturpolak1
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dopey, dwalsh, felipeatalaia.s7, jjb, lukaspress, lvrabec, mariemartin1, mgrepl, pawel-jakubowski, pichardo.software, plautrba, pmoore, redhat, ssekidde, xzj8b3
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7bb98eff09db578f92e6b6786d9a3a24547375babba86273a01aedc9f76717e2;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-23 10:31:25 UTC 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 arturpolak1 2017-01-26 23:49:28 UTC
Description of problem:
SELinux is preventing iw from 'write' accesses on the file /run/tlp/lock_tlp.

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

If aby naprawić etykietę. 
domyślna etykieta /run/tlp/lock_tlp powinna wynosić tlp_var_run_t.
Then można wykonać polecenie restorecon.
Do
# /sbin/restorecon -v /run/tlp/lock_tlp

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

If aby iw powinno mieć domyślnie write dostęp do lock_tlp file.
Then proszę to zgłosić jako błąd.
Można utworzyć lokalny moduł polityki, aby umożliwić ten dostęp.
Do
allow this access for now by executing:
# ausearch -c 'iw' --raw | audit2allow -M my-iw
# semodule -X 300 -i my-iw.pp

Additional Information:
Source Context                system_u:system_r:ifconfig_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                /run/tlp/lock_tlp [ file ]
Source                        iw
Source Path                   iw
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.6.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.9.4-201.fc25.x86_64 #1 SMP Tue
                              Jan 17 18:58:54 UTC 2017 x86_64 x86_64
Alert Count                   2
First Seen                    2017-01-24 01:24:10 CET
Last Seen                     2017-01-24 01:24:10 CET
Local ID                      75e49558-6969-4505-aeb3-b00488beebcf

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


Hash: iw,ifconfig_t,var_run_t,file,write

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.0
hashmarkername: setroubleshoot
kernel:         4.10.0-0.rc5.git1.1.fc26.x86_64
type:           libreport

Potential duplicate: bug 1373791

Comment 1 Alexander Bartel 2017-02-18 13:03:47 UTC
SELinux is preventing iw from write access on the file /run/tlp/lock_tlp.

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                        iw
Source Path                   iw
Port                          <Unknown>
Host                          ***
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.6.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     ***
Platform                      Linux *** 4.9.9-200.fc25.x86_64 #1 SMP Thu
                              Feb 9 17:28:13 UTC 2017 x86_64 x86_64
Alert Count                   3
First Seen                    2017-02-18 13:44:27 CET
Last Seen                     2017-02-18 13:44:48 CET
Local ID                      5bfbc5da-0b3e-49bb-bebf-fa355cb21ebf

Raw Audit Messages
type=AVC msg=audit(1487421888.38:433): avc:  denied  { write } for  pid=10305 comm="ethtool" path="/run/tlp/lock_tlp" dev="tmpfs" ino=33436 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: iw,ifconfig_t,tlp_var_run_t,file,write

Comment 2 Fedora End Of Life 2017-02-28 11:06:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Andy Wang 2017-05-28 02:35:41 UTC
I'm seeing this same issue on fedora 25 with:
Policy RPM                    selinux-policy-3.13.1-225.16.fc25.noarch

Comment 4 J. PIchardo 2017-06-19 18:37:54 UTC
Same for me on Fedora 25 on 4.11.5-200.fc25.x86_64

Comment 5 Lukas Vrabec 2017-06-23 10:31:25 UTC
Guys please, check the actual version of selinux-policy package. This issue is already fixed. Update system to fix this issue. 

Thanks.

Comment 6 felipeatalaia.s7 2017-08-11 22:09:01 UTC
*** Bug 1480799 has been marked as a duplicate of this bug. ***

Comment 7 Christopher J Tapp 2017-11-01 09:17:59 UTC
Description of problem:
Install tlp using dnf

Version-Release number of selected component:
selinux-policy-3.13.1-260.13.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.5-200.fc26.x86_64
type:           libreport

Comment 8 Pawel Jakubowski 2017-11-03 11:32:07 UTC
Description of problem:
Unplugged laptop's charger

Version-Release number of selected component:
selinux-policy-3.13.1-260.13.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.9-200.fc26.x86_64
type:           libreport

Comment 9 Marie Martin 2017-12-14 16:46:06 UTC
Description of problem:
Pluggin/Unplugging the power supply.

Version-Release number of selected component:
selinux-policy-3.13.1-260.13.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.14.4-200.fc26.x86_64
type:           libreport