Bug 875123 - SELinux is preventing /usr/sbin/sshd from 'search' accesses on the directory /var/ftp.
Summary: SELinux is preventing /usr/sbin/sshd from 'search' accesses on the directory ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c3ec8b36158a341747630f43018...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-09 15:18 UTC by James Heather
Modified: 2012-12-20 16:18 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-20 16:18:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-11-09 15:18 UTC, James Heather
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-11-09 15:18 UTC, James Heather
no flags Details

Description James Heather 2012-11-09 15:18:52 UTC
Description of problem:
I suspect this is the same bug as the one causing problems with mysql and postgresql: something has a home directory of /var/ftp, and when it attempts to log in (as a result of a hack attempt), it triggers an SELinux error.

Additional info:
libreport version: 2.0.18
kernel:         3.6.3-1.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/sshd from 'search' accesses on the directory /var/ftp.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that sshd should be allowed search access on the ftp directory 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 sshd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:public_content_t:s0
:Target Objects                /var/ftp [ dir ]
:Source                        sshd
:Source Path                   /usr/sbin/sshd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           openssh-server-5.9p1-27.fc17.x86_64
:Target RPM Packages           vsftpd-3.0.0-2.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-156.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.3-1.fc17.x86_64 #1 SMP Mon Oct
:                              22 15:32:35 UTC 2012 x86_64 x86_64
:Alert Count                   40
:First Seen                    2012-06-25 20:55:27 BST
:Last Seen                     2012-11-07 21:48:15 GMT
:Local ID                      d614be89-ff1a-4d8c-a636-e4e7424de233
:
:Raw Audit Messages
:type=AVC msg=audit(1352324895.219:8895): avc:  denied  { search } for  pid=21013 comm="sshd" name="ftp" dev="dm-5" ino=3407873 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:public_content_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1352324895.219:8895): arch=x86_64 syscall=stat success=no exit=EACCES a0=7f2468d5f730 a1=7fff85f8e900 a2=7fff85f8e900 a3=65646e692d676e69 items=0 ppid=1635 pid=21013 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: sshd,sshd_t,public_content_t,dir,search
:
:audit2allow
:
:#============= sshd_t ==============
:allow sshd_t public_content_t:dir search;
:
:audit2allow -R
:
:#============= sshd_t ==============
:allow sshd_t public_content_t:dir search;
:

Comment 1 James Heather 2012-11-09 15:18:55 UTC
Created attachment 641616 [details]
File: type

Comment 2 James Heather 2012-11-09 15:18:57 UTC
Created attachment 641617 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-12 12:37:00 UTC
Yes, it will be the same problem.

Comment 4 Daniel Walsh 2012-11-12 18:03:27 UTC
Fixed in selinux-policy-3.11.1-52.el7

Comment 5 Fedora Update System 2012-11-21 11:53:38 UTC
selinux-policy-3.10.0-161.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-161.fc17

Comment 6 Fedora Update System 2012-11-22 03:55:41 UTC
Package selinux-policy-3.10.0-161.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-161.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18787/selinux-policy-3.10.0-161.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-20 16:18:38 UTC
selinux-policy-3.10.0-161.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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