Bug 890528 - df is unable to look at /sys/kernel/config
Summary: df is unable to look at /sys/kernel/config
Keywords:
Status: CLOSED DUPLICATE of bug 887999
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-27 14:43 UTC by Steven Stern
Modified: 2013-01-02 12:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-02 12:05:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steven Stern 2012-12-27 14:43:50 UTC
SELinux is preventing /usr/bin/df from getattr access on the directory /sys/kernel/config.

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

If you want to fix the label. 
/sys/kernel/config default label should be sysfs_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /sys/kernel/config

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

If you believe that df should be allowed getattr access on the config directory 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:
# grep df /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logwatch_t:s0-s0:c0.c1023
Target Context                system_u:object_r:configfs_t:s0
Target Objects                /sys/kernel/config [ dir ]
Source                        df
Source Path                   /usr/bin/df
Port                          <Unknown>
Host                          sds-desk-2.sterndata.local
Source RPM Packages           coreutils-8.15-9.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     sds-desk-2.sterndata.local
Platform                      Linux sds-desk-2.sterndata.local
                              3.6.10-2.fc17.x86_64 #1 SMP Tue Dec 11 18:07:34
                              UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2012-12-27 03:44:03 CST
Last Seen                     2012-12-27 03:44:03 CST
Local ID                      04d7ba6c-835b-4de7-abfc-67d44c38d512

Raw Audit Messages
type=AVC msg=audit(1356601443.927:2751): avc:  denied  { getattr } for  pid=20503 comm="df" path="/sys/kernel/config" dev="configfs" ino=9139 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:configfs_t:s0 tclass=dir


type=SYSCALL msg=audit(1356601443.927:2751): arch=x86_64 syscall=stat success=yes exit=0 a0=150d340 a1=7fff13387320 a2=7fff13387320 a3=3eb5b2f360 items=0 ppid=20502 pid=20503 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=327 comm=df exe=/usr/bin/df subj=system_u:system_r:logwatch_t:s0-s0:c0.c1023 key=(null)

Hash: df,logwatch_t,configfs_t,dir,getattr

audit2allow

#============= logwatch_t ==============
allow logwatch_t configfs_t:dir getattr;

audit2allow -R

#============= logwatch_t ==============
allow logwatch_t configfs_t:dir getattr;

Comment 1 Daniel Walsh 2012-12-27 16:23:10 UTC
This is allowed in F18 policy.

Comment 2 Joel Uckelman 2012-12-29 15:39:54 UTC
This is a dupe of Bug 887999.

Comment 3 Miroslav Grepl 2013-01-02 12:05:43 UTC

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


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