Bug 744044 - SELinux is preventing /bin/ps from 'read' accesses on the file online.
Summary: SELinux is preventing /bin/ps from 'read' accesses on the file online.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6066befaedc8838ddf4a1dbe94a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-06 20:00 UTC by Dimitar Dimitrov
Modified: 2011-10-19 04:31 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.10.0-40.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-19 04:31:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dimitar Dimitrov 2011-10-06 20:00:34 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-0.rc8.git0.1.fc16.i686
reason:         SELinux is preventing /bin/ps from 'read' accesses on the file online.
time:           Thu Oct  6 21:54:37 2011

description:
:SELinux is preventing /bin/ps from 'read' accesses on the file online.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that ps should be allowed read access on the online 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:
:# grep ps /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:system_r:ipsec_mgmt_t:s0
:Target Context                system_u:object_r:sysfs_t:s0
:Target Objects                online [ file ]
:Source                        ps
:Source Path                   /bin/ps
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           procps-3.2.8-23.20110302git.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-36.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.1.0-0.rc8.git0.1.fc16.i686 #1 SMP Tue Oct 4
:                              04:11:07 UTC 2011 i686 i686
:Alert Count                   1
:First Seen                    Thu 06 Oct 2011 09:53:02 PM CEST
:Last Seen                     Thu 06 Oct 2011 09:53:02 PM CEST
:Local ID                      b76fc4aa-1c3a-48a9-9d92-5b8bc9765dc7
:
:Raw Audit Messages
:type=AVC msg=audit(1317930782.834:318): avc:  denied  { read } for  pid=17121 comm="ps" name="online" dev=sysfs ino=33 scontext=unconfined_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1317930782.834:318): arch=i386 syscall=open success=no exit=EACCES a0=431f5484 a1=80000 a2=0 a3=54 items=0 ppid=17117 pid=17121 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm=ps exe=/bin/ps subj=unconfined_u:system_r:ipsec_mgmt_t:s0 key=(null)
:
:Hash: ps,ipsec_mgmt_t,sysfs_t,file,read
:
:audit2allow
:
:#============= ipsec_mgmt_t ==============
:allow ipsec_mgmt_t sysfs_t:file read;
:
:audit2allow -R
:
:#============= ipsec_mgmt_t ==============
:allow ipsec_mgmt_t sysfs_t:file read;
:

Comment 1 Dimitar Dimitrov 2011-10-06 20:03:18 UTC
Alert appears when executing 'service --status-all' as root user

Comment 2 Miroslav Grepl 2011-10-07 07:30:56 UTC
Does an output look as you expect?

Comment 3 Daniel Walsh 2011-10-07 14:00:39 UTC
Should allow it.

Comment 4 Dimitar Dimitrov 2011-10-07 20:01:42 UTC
This is the present output:
~]# service --status-all
httpd.service - The Apache HTTP Server (prefork MPM)
	  Loaded: loaded (/lib/systemd/system/httpd.service; disabled)
	  Active: inactive (dead)
	  CGroup: name=systemd:/system/httpd.service
IPsec stopped
netconsole module not loaded
Configured devices:
lo p2p1
Currently active devices:
lo p2p1
sandbox is running


it is working again after executing:
# grep ps /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

and the SELinux alert appears no more. 

So it is resolved after following the suggestion of the SELinux troubleshooter. Guess it is an intended behaviour.

Comment 5 Miroslav Grepl 2011-10-10 10:23:13 UTC
Fixed in selinux-policy-3.10.0-39.fc16

Comment 6 Dimitar Dimitrov 2011-10-10 11:20:43 UTC
Thank you.

Comment 7 Daniel Walsh 2011-10-11 17:38:25 UTC
Every domain that executes ps will need this access.

Comment 8 Fedora Update System 2011-10-14 16:17:55 UTC
selinux-policy-3.10.0-40.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-40.fc16

Comment 9 Fedora Update System 2011-10-15 14:31:38 UTC
Package selinux-policy-3.10.0-40.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-40.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14363
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-10-19 04:31:04 UTC
selinux-policy-3.10.0-40.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


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