Hide Forgot
Description of problem: sshd does not start as the /etc/init.d/sshd ssh-keygen script is not able to access /dev/random for the host key generation. Note, in the evaluated configuration SSH_USE_STRONG_RNG is 1 which requires /dev/random. ssh-keygen is not able to access /dev/random when run as user either. Version-Release number of selected component (if applicable): RHEL6.1 ISO of Mar 30. Expected results: All OpenSSH applications must be able to access /dev/random. Additional info: A simple cat /dev/random works, so the policy most likely needs updating.
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
+dev_read_rand(ssh_keygen_t) Are you seeing errors about anything other then ssh_keygen_t?
> Are you seeing errors about anything other then ssh_keygen_t? I did not try anything else, but all OpenSSH applications (ssh, sshd, ssh-keygen) which have access to /dev/urandom must also be granted access to /dev/random as a THE central DRNG mechanism which is used by all the OpenSSH applications that need randomness can be switched from /dev/urandom to /dev/random.
I can see problem with ssh also: type=AVC msg=audit(1301987422.876:3827): avc: denied { getattr } for pid=7359 comm="ssh" path="/dev/random" dev=devtmpfs ino=3687 scontext=staff_u:sysadm_r:ssh_t:s0-s15:c0.c1023 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file type=AVC msg=audit(1301987562.162:3829): avc: denied { getattr } for pid=7378 comm="ssh" path="/dev/random" dev=devtmpfs ino=3687 scontext=staff_u:sysadm_r:ssh_t:s0-s15:c0.c1023 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file
Miroslav Grepl, lets also add dev_read_rand(ssh_t) dev_read_rand(ssh_keysign_t)
Yes, I added it.
Fixed in selinux-policy-3.7.19-81.el6
This seems to be fixed in selinux-policy-mls-3.7.19-82.el6 ssh: [root/sysadm_r/SystemLow@ibm-dx360m2-01 ~]# export SSH_USE_STRONG_RNG=1 [root/sysadm_r/SystemLow@ibm-dx360m2-01 ~]# ssh eal@localhost Last login: Thu Apr 7 01:35:00 2011 from freedom.brq.redhat.com [eal/staff_r/SystemLow@ibm-dx360m2-01 ~]$ ssh-keygen: [eal/staff_r/SystemLow@ibm-dx360m2-01 ~]$ export SSH_USE_STRONG_RNG=1 [eal/staff_r/SystemLow@ibm-dx360m2-01 ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/eal/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/eal/.ssh/id_rsa. Your public key has been saved in /home/eal/.ssh/id_rsa.pub. The key fingerprint is: 70:e6:c9:fe:d1:06:22:8d:e0:40:e8:8b:f7:60:24:a9 eal.eng.bos.redhat.com The key's randomart image is: +--[ RSA 2048]----+ | .. | |.. | |... . . o | |o..o . O . | |oo. . o S . | |E.+ o . o | | o o . . o | | . . o | | . | +-----------------+ sshd: [root/sysadm_r/SystemLow@ibm-dx360m2-01 ~]# run_init service sshd restart Authenticating eal. Password: Stopping sshd: [ OK ] Starting sshd: [ OK ]
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0526.html