Bug 840241 - SELinux is preventing /usr/sbin/sshd from read, open access on the file /usr/bin/login.
SELinux is preventing /usr/sbin/sshd from read, open access on the file /usr/...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-07-14 13:36 EDT by Sam Markel
Modified: 2012-12-20 11:04 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-20 11:04:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Sam Markel 2012-07-14 13:36:22 EDT
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

: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.
:# 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.
: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 05:08:38 EDT
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 16:17:24 EDT
Created attachment 598521 [details]
My sshd_config file
Comment 3 Daniel Walsh 2012-07-17 13:59:48 EDT
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 04:43:35 EDT

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

    Allow sshd_t to execute login program
Comment 5 Fedora Update System 2012-10-17 08:33:40 EDT
selinux-policy-3.10.0-156.fc17 has been submitted as an update for Fedora 17.
Comment 6 Fedora Update System 2012-10-17 20:24:28 EDT
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:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2012-12-20 11:04:20 EST
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.