Bug 1405281 - SELinux is preventing cat from 'getattr' accesses on the file /run/tlp/last_pwr.
Summary: SELinux is preventing cat from 'getattr' accesses on the file /run/tlp/last_pwr.
Keywords:
Status: CLOSED DUPLICATE of bug 1405280
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4e02ed7bf1d97580c854ba23351...
: 1421555 1432509 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-16 03:56 UTC by Nate Graham
Modified: 2017-03-15 14:36 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-12-16 18:15:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nate Graham 2016-12-16 03:56:22 UTC
Description of problem:
Install tlp
SELinux is preventing cat from 'getattr' accesses on the file /run/tlp/last_pwr.

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

If you want to fix the label. 
/run/tlp/last_pwr default label should be tlp_var_run_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /run/tlp/last_pwr

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

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

Additional Information:
Source Context                system_u:system_r:tlp_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /run/tlp/last_pwr [ file ]
Source                        cat
Source Path                   cat
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.3.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.13-300.fc25.x86_64 #1 SMP Fri
                              Dec 9 14:52:00 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-12-15 20:53:39 MST
Last Seen                     2016-12-15 20:53:39 MST
Local ID                      73ef8c57-7ae9-4fa2-a929-0db697ae2732

Raw Audit Messages
type=AVC msg=audit(1481860419.39:252): avc:  denied  { getattr } for  pid=2776 comm="cat" path="/run/tlp/last_pwr" dev="tmpfs" ino=13635 scontext=system_u:system_r:tlp_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=1


Hash: cat,tlp_t,var_run_t,file,getattr

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.13-300.fc25.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-12-16 18:15:43 UTC

*** This bug has been marked as a duplicate of bug 1405280 ***

Comment 2 jdeustice 2017-02-13 05:06:33 UTC
*** Bug 1421555 has been marked as a duplicate of this bug. ***

Comment 3 arturpolak1 2017-03-15 14:36:09 UTC
*** Bug 1432509 has been marked as a duplicate of this bug. ***


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