Bug 1310077 - vsftpd can access nfs even if allow_ftpd_use_nfs is off under specific conditions
Summary: vsftpd can access nfs even if allow_ftpd_use_nfs is off under specific condit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.8
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-19 12:05 UTC by Dalibor Pospíšil
Modified: 2017-03-21 09:45 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.7.19-296.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 09:45:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0627 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-03-21 12:29:23 UTC

Description Dalibor Pospíšil 2016-02-19 12:05:48 UTC
Description of problem:
In case ftp_home_dir and use_nfs_home_dirs are ON and allow_ftpd_use_nfs is OFF vsftpd can access any nfs resource. I would say that allow_ftpd_use_nfs should have priority.

Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-279.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. # sesearch -A -s ftpd_t -t nfs_t -C -c file

Actual results:
Found 4 semantic av rules:
DT allow ftpd_t nfs_t : file { ioctl read getattr lock open } ; [ allow_ftpd_use_nfs ]
DT allow ftpd_t nfs_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; [ allow_ftpd_use_nfs allow_ftpd_anon_write && ]
DT allow ftpd_t nfs_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; [ allow_ftpd_full_access ]
DT allow ftpd_t nfs_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; [ ftp_home_dir use_nfs_home_dirs && ]


Expected results:
Found 4 semantic av rules:
DT allow ftpd_t nfs_t : file { ioctl read getattr lock open } ; [ allow_ftpd_use_nfs ]
DT allow ftpd_t nfs_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; [ allow_ftpd_use_nfs allow_ftpd_anon_write && ]
DT allow ftpd_t nfs_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; [ allow_ftpd_full_access ]
DT allow ftpd_t nfs_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; [ allow_ftpd_use_nfs ftp_home_dir use_nfs_home_dirs && ]


Additional info:
This behavior can be observed also on selinux-policy-3.13.1-60.el7.noarch

Comment 7 errata-xmlrpc 2017-03-21 09:45:07 UTC
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://rhn.redhat.com/errata/RHBA-2017-0627.html


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