Bug 1562513 - SELinux is preventing x86_energy_perf from 'getattr' accesses on the chr_file /dev/cpu/2/msr.
Summary: SELinux is preventing x86_energy_perf from 'getattr' accesses on the chr_file...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:43887384d6eb3acf2169e783f2d...
: 1667656 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-31 13:41 UTC by Heiko Adams
Modified: 2019-04-29 09:17 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-04-08 19:00:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Heiko Adams 2018-03-31 13:41:31 UTC
Description of problem:
SELinux is preventing x86_energy_perf from 'getattr' accesses on the chr_file /dev/cpu/2/msr.

*****  Plugin restorecon (90.5 confidence) suggests   ************************

If you want to fix the label. 
/dev/cpu/2/msr default label should be cpu_device_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 /dev/cpu/2/msr

*****  Plugin device (9.50 confidence) suggests   ****************************

Wenn Sie erlauben wollen, dass x86_energy_perf  getattr Zugriff auf msr chr_file
Then sie müssen die Kennzeichnung von /dev/cpu/2/msr auf einen Typ eines ähnlichen Elementes ändern
Do
# semanage fcontext -a -t SIMILAR_TYPE '/dev/cpu/2/msr'
# restorecon -v '/dev/cpu/2/msr'

*****  Plugin catchall (1.40 confidence) suggests   **************************

If you believe that x86_energy_perf should be allowed getattr access on the msr chr_file by default.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
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:device_t:s0
Target Objects                /dev/cpu/2/msr [ chr_file ]
Source                        x86_energy_perf
Source Path                   x86_energy_perf
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-18.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.0-0.rc6.git0.2.fc28.x86_64 #1
                              SMP Mon Mar 19 17:05:43 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-03-31 01:30:51 CEST
Last Seen                     2018-03-31 01:30:51 CEST
Local ID                      479b3b2a-ca92-4ab0-bc60-748a861cc139

Raw Audit Messages
type=AVC msg=audit(1522452651.75:350): avc:  denied  { getattr } for  pid=8556 comm="x86_energy_perf" path="/dev/cpu/2/msr" dev="devtmpfs" ino=185063 scontext=system_u:system_r:tlp_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0


Hash: x86_energy_perf,tlp_t,device_t,chr_file,getattr

Version-Release number of selected component:
selinux-policy-3.14.1-18.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.4
hashmarkername: setroubleshoot
kernel:         4.16.0-0.rc6.git0.2.fc28.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-04-08 19:00:12 UTC
*****  Plugin restorecon (90.5 confidence) suggests   ************************

If you want to fix the label. 
/dev/cpu/2/msr default label should be cpu_device_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 /dev/cpu/2/msr

Comment 2 Lukas Vrabec 2019-01-20 17:58:52 UTC
*** Bug 1667656 has been marked as a duplicate of this bug. ***

Comment 3 Mai Ling 2019-02-10 12:02:38 UTC
Description of problem:
resumed from suspend

Version-Release number of selected component:
selinux-policy-3.14.2-48.fc29.noarch

Additional info:
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         4.20.0-1.fc30.x86_64
type:           libreport

Comment 4 Mai Ling 2019-02-18 09:23:15 UTC
if this is "Status:	CLOSED NOTABUG", then why does it keep popping out every resume from suspend, and what should the user do to keep it from appearing?


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