Bug 1036431

Summary: SELinux is preventing /usr/sbin/rpc.mountd from 'ioctl' accesses on the blk_file /dev/bcache0.
Product: [Fedora] Fedora Reporter: Martin <mholec>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, tpelka
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:14474510a64592d34ff9798b3bb7985368c57efb5c22f9d288bb640b461bd789
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-02 16:35:49 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 Martin 2013-12-02 00:01:40 UTC
Description of problem:
mounting NFS share from another machine
bcache0 is SSD cache, see: http://fedoraproject.org/wiki/Changes/SSD_cache
SELinux is preventing /usr/sbin/rpc.mountd from 'ioctl' accesses on the blk_file /dev/bcache0.

*****  Plugin device (91.4 confidence) suggests   ****************************

If you want to allow rpc.mountd to have ioctl access on the bcache0 blk_file
Then you need to change the label on /dev/bcache0 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE '/dev/bcache0'
# restorecon -v '/dev/bcache0'

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that rpc.mountd should be allowed ioctl access on the bcache0 blk_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 rpc.mountd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:nfsd_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                /dev/bcache0 [ blk_file ]
Source                        rpc.mountd
Source Path                   /usr/sbin/rpc.mountd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nfs-utils-1.2.8-6.0.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-105.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.9-300.fc20.x86_64 #1 SMP Wed
                              Nov 20 22:23:25 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-12-01 22:49:47 CET
Last Seen                     2013-12-02 00:15:28 CET
Local ID                      001d9aa6-db2d-4118-a332-a175e12aad0e

Raw Audit Messages
type=AVC msg=audit(1385939728.209:1576): avc:  denied  { ioctl } for  pid=32246 comm="rpc.mountd" path="/dev/bcache0" dev="devtmpfs" ino=15057 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=blk_file


type=SYSCALL msg=audit(1385939728.209:1576): arch=x86_64 syscall=ioctl success=yes exit=0 a0=c a1=80081272 a2=7f57a639ac20 a3=1 items=0 ppid=1 pid=32246 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=rpc.mountd exe=/usr/sbin/rpc.mountd subj=system_u:system_r:nfsd_t:s0 key=(null)

Hash: rpc.mountd,nfsd_t,device_t,blk_file,ioctl

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.9-300.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-12-02 16:35:49 UTC

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