Bug 606114 - SELinux is preventing /usr/bin/pgrep "getattr" access on /proc/<pid>.
Summary: SELinux is preventing /usr/bin/pgrep "getattr" access on /proc/<pid>.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:60cbcdc5a9a...
: 606119 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-20 18:14 UTC by alan
Modified: 2010-07-09 00:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-09 00:29:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description alan 2010-06-20 18:14:31 UTC
Summary:

SELinux is preventing /usr/bin/pgrep "getattr" access on /proc/.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by pgrep. It is not expected that this access is
required by pgrep and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:ksmtuned_t:s0-s15:c0.c1023
Target Context                system_u:system_r:kernel_t:s15:c0.c1023
Target Objects                /proc/<pid> [ dir ]
Source                        pgrep
Source Path                   /usr/bin/pgrep
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           procps-3.2.8-3.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-116.fc12
Selinux Enabled               True
Policy Type                   mls
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.12-115.fc12.x86_64 #1 SMP Fri
                              Apr 30 19:46:25 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Dydd Sul 20 mis Mehefin 2010 19:17:17 BST
Last Seen                     Dydd Sul 20 mis Mehefin 2010 19:17:17 BST
Local ID                      06fc96c0-eef2-4b3a-8389-f9cfd4c7f56b
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1277057837.39:5126): avc:  denied  { getattr } for  pid=27457 comm="pgrep" path="/proc/2" dev=proc ino=9128 scontext=system_u:system_r:ksmtuned_t:s0-s15:c0.c1023 tcontext=system_u:system_r:kernel_t:s15:c0.c1023 tclass=dir

node=(removed) type=SYSCALL msg=audit(1277057837.39:5126): arch=c000003e syscall=4 success=yes exit=0 a0=104e070 a1=35fc411ca0 a2=35fc411ca0 a3=104e076 items=0 ppid=27456 pid=27457 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pgrep" exe="/usr/bin/pgrep" subj=system_u:system_r:ksmtuned_t:s0-s15:c0.c1023 key=(null)



Hash String generated from  catchall,pgrep,ksmtuned_t,kernel_t,dir,getattr
audit2allow suggests:

#============= ksmtuned_t ==============
#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
#Contraint rule: 
allow ksmtuned_t kernel_t:dir getattr;

Comment 1 Daniel Walsh 2010-06-21 15:40:02 UTC
Miroslav can you add

mls_file_read_to_clearance(ksmtuned_t)

to F12/F13 and RHEL6

Comment 2 Daniel Walsh 2010-06-21 15:41:28 UTC
*** Bug 606119 has been marked as a duplicate of this bug. ***

Comment 3 alan 2010-06-21 17:01:29 UTC
I'm using MLS merely because it looked like something interesting to turn on and test the effect of.

Comment 4 Daniel Walsh 2010-06-21 18:11:31 UTC
Ok, any chance you can move to F13?

Comment 5 Miroslav Grepl 2010-06-21 19:12:01 UTC
Added to F13/RHEL6 policy.

Comment 6 Miroslav Grepl 2010-06-23 07:39:49 UTC
Fixed in selinux-policy-3.6.32-119.fc12


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