Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1403103

Summary: SELinux is preventing x86_energy_perf from read, write access on the chr_file msr.
Product: [Fedora] Fedora Reporter: Nate Graham <nate>
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: andrebrait, david, dominick.grift, dwalsh, dxzlabs, elvismogeni, e.misiek, fedora.243908, jylo06g, lvrabec, mgrepl, mrummuka, nate, plautrba, pmoore, redhat, ssekidde, thebeardedhermit
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4ca7ca201a6afe18a266834ecb9f3bf343be1607a0737472e090809d5b2bd616;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-225.6.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 07:23:50 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 Nate Graham 2016-12-09 04:29:40 UTC
Description of problem:
SELinux is preventing x86_energy_perf from read, write access on the chr_file msr.

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

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

Additional Information:
Source Context                system_u:system_r:tlp_t:s0
Target Context                system_u:object_r:cpu_device_t:s0
Target Objects                msr [ chr_file ]
Source                        x86_energy_perf
Source Path                   x86_energy_perf
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.11-300.fc25.x86_64 #1 SMP Mon
                              Nov 28 18:24:51 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-12-08 17:04:29 MST
Last Seen                     2016-12-08 17:04:29 MST
Local ID                      fd42c194-ad6f-41f4-87f2-f4ac12c74838

Raw Audit Messages
type=AVC msg=audit(1481241869.128:730): avc:  denied  { read write } for  pid=3769 comm="x86_energy_perf" name="msr" dev="devtmpfs" ino=1107 scontext=system_u:system_r:tlp_t:s0 tcontext=system_u:object_r:cpu_device_t:s0 tclass=chr_file permissive=1


Hash: x86_energy_perf,tlp_t,cpu_device_t,chr_file,read,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.11-300.fc25.x86_64
type:           libreport

Comment 1 Jia Yuan Lo 2016-12-10 15:36:41 UTC
Description of problem:
Happened after 1st time install BOINC client and 1st time starting BOINC client service

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 2 mrummuka 2016-12-24 14:19:10 UTC
Description of problem:
1st boot after fedora 24->25 upgrade; resuming laptop from suspend

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

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

Comment 3 David Johnston 2017-01-04 12:13:33 UTC
Description of problem:
occurs after waking from hibernation on a Lenovo Ideapad S210

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

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

Comment 4 MichaƂ 2017-01-04 16:31:40 UTC
Description of problem:
Just boot up

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

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

Comment 5 Mogeni 2017-01-08 10:45:54 UTC
Description of problem:
It just crashed.

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

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

Comment 6 Andre Brait 2017-01-08 14:10:25 UTC
Description of problem:
Ussing TLP and changing the battery status (i.e. from charging to discharging) triggers TLP to use x86_energy_perf to change the power policy of the CPU, which is then blocked by SELinux. It shouldn't be, of course. 

Steps to reproduce:
1 - Have a laptop running Fedora
2 - Install and enable TLP (sudo dnf install tlp tlp-rdw; sudo systemctl enable tlp; sudo systemctl enable tlp-sleep)
3 - Start TLP (sudo systemctl start tlp)
4 - Unplug/plug your laptop's charger.
5 - A SELinux alert will come up.

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

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

Comment 7 Fedora Update System 2017-01-08 22:22:18 UTC
selinux-policy-3.13.1-225.6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-66d634473a

Comment 8 Fedora Update System 2017-01-10 03:25:41 UTC
selinux-policy-3.13.1-225.6.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-66d634473a

Comment 9 Fedora Update System 2017-01-11 07:23:50 UTC
selinux-policy-3.13.1-225.6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.