Bug 1583089 - SELinux is preventing /usr/bin/ssh-keygen from map access on the file /usr/bin/ssh-keygen
Summary: SELinux is preventing /usr/bin/ssh-keygen from map access on the file /usr/bi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-28 08:19 UTC by Lukas Slebodnik
Modified: 2018-10-30 10:05 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-202.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:04:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:05:17 UTC

Description Lukas Slebodnik 2018-05-28 08:19:50 UTC
SELinux is preventing /usr/bin/ssh-keygen from map access on the file /usr/bin/ssh-keygen.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that ssh-keygen should be allowed map access on the ssh-keygen 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:
# ausearch -c 'ssh-keygen' --raw | audit2allow -M my-sshkeygen
# semodule -i my-sshkeygen.pp


Additional Information:
Source Context                system_u:system_r:sshd_keygen_t:s0
Target Context                system_u:object_r:ssh_keygen_exec_t:s0
Target Objects                /usr/bin/ssh-keygen [ file ]
Source                        ssh-keygen
Source Path                   /usr/bin/ssh-keygen
Port                          <Unknown>
Host                          bkr-hv01-guest24.example.com
Source RPM Packages           openssh-7.4p1-16.el7.x86_64
Target RPM Packages           openssh-7.4p1-16.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-197.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     bkr-hv01-guest24.example.com
Platform                      Linux bkr-hv01-guest24.example.com
                              3.10.0-893.el7.x86_64 #1 SMP Thu May 24 21:37:14
                              UTC 2018 x86_64 x86_64
Alert Count                   2
First Seen                    2018-05-26 13:12:32 EDT
Last Seen                     2018-05-26 13:12:32 EDT
Local ID                      ab9fa711-4707-41dd-a773-4afdefc248c0

Raw Audit Messages
type=AVC msg=audit(1527354752.785:35): avc:  denied  { map } for  pid=731 comm="ssh-keygen" path="/usr/bin/ssh-keygen" dev="dm-0" ino=132556 scontext=system_u:system_r:sshd_keygen_t:s0 tcontext=system_u:object_r:ssh_keygen_exec_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1527354752.785:35): arch=x86_64 syscall=execve success=yes exit=0 a0=21f9ad0 a1=21fdf50 a2=21f8d40 a3=7ffe7cfe6160 items=0 ppid=639 pid=731 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ssh-keygen exe=/usr/bin/ssh-keygen subj=system_u:system_r:ssh_keygen_t:s0 key=(null)

Hash: ssh-keygen,sshd_keygen_t,ssh_keygen_exec_t,file,map

Comment 3 Milos Malik 2018-06-05 20:37:56 UTC
Following SELinux denial appeared in enforcing mode:
----
type=PROCTITLE msg=audit(06/05/2018 16:32:37.910:466) : proctitle=(null) 
type=PATH msg=audit(06/05/2018 16:32:37.910:466) : item=1 name=/lib64/ld-linux-x86-64.so.2 inode=418713 dev=fd:00 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 objtype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=PATH msg=audit(06/05/2018 16:32:37.910:466) : item=0 name=/usr/bin/ssh-keygen inode=12821437 dev=fd:00 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ssh_keygen_exec_t:s0 objtype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(06/05/2018 16:32:37.910:466) :  cwd=/ 
type=SYSCALL msg=audit(06/05/2018 16:32:37.910:466) : arch=x86_64 syscall=execve success=no exit=EACCES(Permission denied) a0=0x21e7ff0 a1=0x21e7a60 a2=0x21e1c60 a3=0x7ffcb331af20 items=2 ppid=26139 pid=26145 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=ssh-keygen exe=/usr/bin/ssh-keygen subj=system_u:system_r:sshd_keygen_t:s0 key=(null) 
type=AVC msg=audit(06/05/2018 16:32:37.910:466) : avc:  denied  { map } for  pid=26145 comm=ssh-keygen path=/usr/bin/ssh-keygen dev="dm-0" ino=12821437 scontext=system_u:system_r:sshd_keygen_t:s0 tcontext=system_u:object_r:ssh_keygen_exec_t:s0 tclass=file permissive=0 
----

Comment 7 errata-xmlrpc 2018-10-30 10:04:31 UTC
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://access.redhat.com/errata/RHBA-2018:3111


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