Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1439442 - NFS crossmnt AVC denied for comm="rpc.mountd" name="/" dev="configfs" ino=7990 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:configfs_t:s0 tclass=dir
NFS crossmnt AVC denied for comm="rpc.mountd" name="/" dev="configfs" ino=799...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Lukas Vrabec
Milos Malik
: Reproducer
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-05 22:30 EDT by Yongcheng Yang
Modified: 2018-04-10 08:32 EDT (History)
8 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-176.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 08:29:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0763 None None None 2018-04-10 08:32 EDT

  None (edit)
Description Yongcheng Yang 2017-04-05 22:30:56 EDT
Description of problem:
There is an "avc denied" log during tests of NFS crossmnt (details please find from manpage exports(5)) with root "/". 

Version-Release number of selected component (if applicable):
RHEL-7.3

How reproducible:
100% easily

Steps to Reproduce:
1. echo '/ *(ro,crossmnt,nohide,no_root_squash)' > /etc/exports
2. systemctl restart nfs
3. Mount the "/" to any mount point
4. Read contents of $mountpoint/boot/

Actual results:
# echo '/ *(ro,crossmnt,nohide,no_root_squash)' >/etc/exports
# systemctl restart nfs
# mount localhost:/ /mnt/mnt_test/
# cat /var/log/audit/audit.log | grep denied
# ls /mnt/mnt_test/boot/ &>/dev/null
# cat /var/log/audit/audit.log | grep denied
type=AVC msg=audit(1491444765.616:197): avc:  denied  { search } for  pid=30483 comm="rpc.mountd" name="/" dev="configfs" ino=7560 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:configfs_t:s0 tclass=dir
# 

Expected results:
No AVC failure.

Additional info:
Rhel6 doesn't have this warning.
Comment 2 Milos Malik 2017-04-06 06:20:32 EDT
# rpm -qa selinux-policy\*
selinux-policy-targeted-3.13.1-132.el7.noarch
selinux-policy-3.13.1-132.el7.noarch
#

SELinux denials caught in enforcing mode:
----
type=SYSCALL msg=audit(04/06/2017 06:15:15.368:282) : arch=x86_64 syscall=lstat success=no exit=EACCES(Permission denied) a0=0x55f139a83ab0 a1=0x7fffe3dda3a0 a2=0x7fffe3dda3a0 a3=0x0 items=0 ppid=1 pid=1309 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rpc.mountd exe=/usr/sbin/rpc.mountd subj=system_u:system_r:nfsd_t:s0 key=(null) 
type=AVC msg=audit(04/06/2017 06:15:15.368:282) : avc:  denied  { search } for  pid=1309 comm=rpc.mountd name=/ dev="configfs" ino=7675 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:configfs_t:s0 tclass=dir 
----

SELinux denials caught in permissive mode:
----
type=SYSCALL msg=audit(04/06/2017 06:17:23.320:303) : arch=x86_64 syscall=lstat success=yes exit=0 a0=0x564d6a1f27d0 a1=0x7ffdb4d18900 a2=0x7ffdb4d18900 a3=0x0 items=0 ppid=1 pid=1538 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rpc.mountd exe=/usr/sbin/rpc.mountd subj=system_u:system_r:nfsd_t:s0 key=(null) 
type=AVC msg=audit(04/06/2017 06:17:23.320:303) : avc:  denied  { search } for  pid=1538 comm=rpc.mountd name=/ dev="configfs" ino=7675 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:configfs_t:s0 tclass=dir 
----
Comment 9 errata-xmlrpc 2018-04-10 08:29:42 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0763

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