Bug 561007

Summary: SELinux is preventing /sbin/mount.cifs "read" access on /home/joel/.smbpasswd.
Product: [Fedora] Fedora Reporter: Joel James Adamson <adamsonj>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:32fafc7b2f07a8c1e02a2d6464dd71755410bda8e1b7590b32418b4a1f354a09
Fixed In Version: 3.6.32-84.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-11 14:43:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joel James Adamson 2010-02-02 13:55:50 UTC
Summary:

SELinux is preventing /sbin/mount.cifs "read" access on /home/joel/.smbpasswd.

Detailed Description:

SELinux denied access requested by mount.cifs. It is not expected that this
access is required by mount.cifs 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://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:mount_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/joel/.smbpasswd [ lnk_file ]
Source                        mount.cifs
Source Path                   /sbin/mount.cifs
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-client-3.4.2-47.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-59.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31.9-174.fc12.x86_64 #1 SMP Mon Dec 21
                              05:33:33 UTC 2009 x86_64 x86_64
Alert Count                   3
First Seen                    Thu 31 Dec 2009 10:55:27 AM EST
Last Seen                     Sat 02 Jan 2010 11:06:56 AM EST
Local ID                      1b6aa604-db45-497f-bb55-f8e06b5b740e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1262448416.795:8): avc:  denied  { read } for  pid=1309 comm="mount.cifs" name=".smbpasswd" dev=dm-0 ino=131204 scontext=system_u:system_r:mount_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=lnk_file

node=(removed) type=SYSCALL msg=audit(1262448416.795:8): arch=c000003e syscall=21 success=no exit=-13 a0=7f5d224db068 a1=4 a2=4 a3=7fff546465c0 items=0 ppid=1308 pid=1309 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mount.cifs" exe="/sbin/mount.cifs" subj=system_u:system_r:mount_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-59.fc12,catchall,mount.cifs,mount_t,user_home_t,lnk_file,read
audit2allow suggests:

#============= mount_t ==============
allow mount_t user_home_t:lnk_file read;

Comment 1 Daniel Walsh 2010-02-02 14:44:32 UTC
Where does this link point?  Will mount have to read files in the users homedir to make this work?

Comment 2 Joel James Adamson 2010-02-02 15:25:04 UTC
It points to another file in my home directory (another dot-file), with the  permissions set to 600.

Comment 3 Daniel Walsh 2010-02-02 16:21:14 UTC
Miroslav, lets add

userdom_read_user_home_content_symlinks(mount_t)
userdom_read_user_home_content_files(mount_t)

Comment 4 Miroslav Grepl 2010-02-02 17:43:41 UTC
Fixed in selinux-policy-3.6.32-81.fc12

Comment 5 Fedora Update System 2010-02-03 23:21:35 UTC
selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12

Comment 6 Fedora Update System 2010-02-05 01:46:13 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1492

Comment 7 Fedora Update System 2010-02-11 14:39:21 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.