Bug 840241 - SELinux is preventing /usr/sbin/sshd from read, open access on the file /usr/bin/login.
Summary: SELinux is preventing /usr/sbin/sshd from read, open access on the file /usr/...
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:8b75b94a01232dc85bb643fa62e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-14 17:36 UTC by Sam Markel
Modified: 2012-12-20 16:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 16:04:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
My sshd_config file (4.03 KB, text/plain)
2012-07-16 20:17 UTC, Sam Markel
no flags Details

Description Sam Markel 2012-07-14 17:36:22 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.4-5.fc17.x86_64
time:           Sat 14 Jul 2012 10:34:34 AM MST

description:
:SELinux is preventing /usr/sbin/sshd from read, open access on the file /usr/bin/login.
:
:*****  Plugin leaks (86.2 confidence) suggests  ******************************
:
:If you want to ignore sshd trying to read open access the login file, because you believe it should not need this access.
:Then you should report this as a bug.  
:You can generate a local policy module to dontaudit this access.
:Do
:# grep /usr/sbin/sshd /var/log/audit/audit.log | audit2allow -D -M mypol
:# semodule -i mypol.pp
:
:*****  Plugin catchall (14.7 confidence) suggests  ***************************
:
:If you believe that sshd should be allowed read open access on the login 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 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:login_exec_t:s0
:Target Objects                /usr/bin/login [ file ]
:Source                        sshd
:Source Path                   /usr/sbin/sshd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           openssh-server-5.9p1-22.fc17.x86_64
:Target RPM Packages           util-linux-2.21.1-1.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-121.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.4-5.fc17.x86_64 #1 SMP Mon
:                              May 7 17:29:34 UTC 2012 x86_64 x86_64
:Alert Count                   4
:First Seen                    Sat 14 Jul 2012 10:29:50 AM MST
:Last Seen                     Sat 14 Jul 2012 10:32:46 AM MST
:Local ID                      a0af3f1b-baae-427f-94bd-d93c473587a8
:
:Raw Audit Messages
:type=AVC msg=audit(1342287166.325:279): avc:  denied  { read open } for  pid=4455 comm="sshd" name="login" dev="dm-1" ino=164413 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:login_exec_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1342287166.325:279): arch=x86_64 syscall=execve success=no exit=EACCES a0=7f22e6f88af6 a1=7fffebfd3ad0 a2=7f22e77a67e0 a3=8 items=0 ppid=4450 pid=4455 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts2 ses=22 comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: sshd,sshd_t,login_exec_t,file,read,open
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Petr Lautrbach 2012-07-16 09:08:38 UTC
Do you use 'UseLogin yes' in sshd_config? Do you need this option enabled? Can you attach your sshd.config?

However, sshd should be probably enabled to run login.

Comment 2 Sam Markel 2012-07-16 20:17:24 UTC
Created attachment 598521 [details]
My sshd_config file

Comment 3 Daniel Walsh 2012-07-17 17:59:48 UTC
We should allow this, although I am not sure if their are going to be other AVC's,  just added allow rules to Fedora 18.

Comment 4 Miroslav Grepl 2012-10-17 08:43:35 UTC
Added.

commit 310a9d9a1bcfec35b49c2cb7d32965458331c04e
Author: Miroslav Grepl <mgrepl>
Date:   Wed Oct 17 10:43:03 2012 +0200

    Allow sshd_t to execute login program

Comment 5 Fedora Update System 2012-10-17 12:33:40 UTC
selinux-policy-3.10.0-156.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-156.fc17

Comment 6 Fedora Update System 2012-10-18 00:24:28 UTC
Package selinux-policy-3.10.0-156.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-156.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16347/selinux-policy-3.10.0-156.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-20 16:04:20 UTC
selinux-policy-3.10.0-156.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.