Bug 653107

Summary: SELinux is preventing /bin/mount from read access on the file /proc/<pid>/mounts.
Product: [Fedora] Fedora Reporter: Tom <thomasbelvin>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, mgrepl, olivares14031
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:93665e903809aa6ad3aef3027ce529ae67219231b19d5aceae77e2315dd7b9a6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-09 11:49:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tom 2010-11-14 15:39:23 UTC
SELinux is preventing /bin/mount from read access on the file /proc/<pid>/mounts.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you want to allow mount to have read access on the mounts 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 /bin/mount /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:mount_t:s0
Target Context                system_u:system_r:hald_t:s0
Target Objects                /proc/<pid>/mounts [ file ]
Source                        mount
Source Path                   /bin/mount
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-ng-2.18-5.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.8-4.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.36-1.fc15.i686.PAE #1 SMP Thu
                              Oct 21 04:31:09 UTC 2010 i686 i686
Alert Count                   45
First Seen                    Sat 13 Nov 2010 05:06:41 PM EST
Last Seen                     Sun 14 Nov 2010 09:54:50 AM EST
Local ID                      ddb46446-382a-4f2a-a95b-cbc6bbbd3aa9

Raw Audit Messages
type=AVC msg=audit(1289746490.946:69): avc:  denied  { read } for  pid=1636 comm="mount" path="/proc/1633/mounts" dev=proc ino=17184 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:system_r:hald_t:s0 tclass=file

mount,mount_t,hald_t,file,read
type=SYSCALL msg=audit(1289746490.946:69): arch=i386 syscall=execve success=yes exit=0 a0=9e6cbd0 a1=9e61258 a2=9e62418 a3=9e61258 items=0 ppid=1633 pid=1636 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=mount exe=/bin/mount subj=system_u:system_r:mount_t:s0 key=(null)
mount,mount_t,hald_t,file,read

#============= mount_t ==============
allow mount_t hald_t:file read;

Comment 1 Daniel Walsh 2010-11-15 16:08:24 UTC
Miroslav, could you add

	ps_process_pattern(mount_t, $1)


To mount_domtrans.

Should take care of this.

Comment 2 Miroslav Grepl 2010-11-15 16:16:49 UTC
Fixed in selinux-policy-3.9.7-13.fc14