Bug 1097775
Summary: | ftp_home_dir set to off allows FTP login to user home directory | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dalibor Pospíšil <dapospis> | |
Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> | |
Status: | CLOSED ERRATA | QA Contact: | Dalibor Pospíšil <dapospis> | |
Severity: | high | Docs Contact: | Mirek Jahoda <mjahoda> | |
Priority: | medium | |||
Version: | 7.0 | CC: | bnater, ekanter, jkejda, lee, lmiksik, lvrabec, mgrepl, mmalik, ssekidde | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | selinux-policy-3.13.1-100.el7 | Doc Type: | Bug Fix | |
Doc Text: |
The `ftp_home_dir` SELinux boolean was removed
Previously, the user was able to login to the home directory despite the `ftp_home_dir` SELinux boolean set to `off`. With this update, the `ftp_home_dir` boolean was removed.
|
Story Points: | --- | |
Clone Of: | 1066124 | |||
: | 1389256 (view as bug list) | Environment: | ||
Last Closed: | 2016-11-04 02:17:20 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1066124 | |||
Bug Blocks: | 1205796, 1389256 |
Description
Dalibor Pospíšil
2014-05-14 13:48:15 UTC
Patch sent to Lukas Problem here is this rule: [root@rhel7-virt ~]# sesearch -A -s ftpd_t -t user_home_t -C -c dir | grep -v DT Found 8 semantic av rules: allow userdom_filetrans_type user_home_t : dir { ioctl read write getattr lock add_name remove_name search open } ; This rule is part of following macro: userdom_filetrans_home_content(ftpd_t) Unfortunately, userdom_filetrans_home_content() cannot be part of any boolean block and filename transition rule cannot be part of any conditional block. This is caused by limiting m4 macro language. I incline to comment4, to remove this boolean. I'm not really sure if removing that boolean is proper solution. If we cannot fix it properly using m4 will we be able to do it using CIL? ftp access to home dir is disabled by default. To enable it "semanage boolean -m ftpd_full_access --on" instead of "setsebool ftp_home_dir on" have to be run. Please make sure that this is documented. ---- time->Wed Jul 20 15:41:02 2016 type=SYSCALL msg=audit(1469022062.310:232): arch=c000003e syscall=2 success=no exit=-13 a0=7f68b980f720 a1=800 a2=7f68b9805ff0 a3=578f7f6e items=0 ppid=5648 pid=5653 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 tty=(none) ses=4294967295 comm="vsftpd" exe="/usr/sbin/vsftpd" subj=system_u:system_r:ftpd_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(1469022062.310:232): avc: denied { read } for pid=5653 comm="vsftpd" name="file.txt" dev="dm-2" ino=81 scontext=system_u:system_r:ftpd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:user_home_t:s0 tclass=file ---- I have the same issue with tests for basics ftp scenarios in wget test suite. Not sure if enabling ftpd_full_access is not too "strong" way how to handle it. selinux-policy-3.13.1-89.el7 I'm also getting similar AVC regarding this issue in vsftpd smoke test. time->Thu Jul 21 04:36:18 2016 type=PROCTITLE msg=audit(1469090178.835:975): proctitle=2F7573722F7362696E2F767366747064002F6574632F7673667470642F7673667470642E636F6E66 type=SYSCALL msg=audit(1469090178.835:975): arch=c00000b7 syscall=56 success=no exit=-13 a0=ffffffffffffff9c a1=2aaf163c420 a2=841 a3=1b6 items=0 ppid=15028 pid=15033 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 tty=(none) ses=4294967295 comm="vsftpd" exe="/usr/sbin/vsftpd" subj=system_u:system_r:ftpd_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(1469090178.835:975): avc: denied { create } for pid=15033 comm="vsftpd" name="testfile.txt" scontext=system_u:system_r:ftpd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:user_home_t:s0 tclass=file permissive=0 Hello, we should describe this bug fix in 7.3 Release Notes - could you please provide CCFR (Doc Text)? (I will also update Security Guide.) 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-2016-2283.html |