Bug 2226947 - sshd is denied to read prandom
Summary: sshd is denied to read prandom
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.9
Hardware: Unspecified
OS: Linux
low
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-27 05:57 UTC by Karel Srot
Modified: 2023-07-31 08:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-31 08:00:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-163627 0 None None None 2023-07-27 05:59:06 UTC

Description Karel Srot 2023-07-27 05:57:54 UTC
Description of problem:

This AVC gets logged when sshd is configured to use ibmca openssl engine.
It doesn't seem to have impact on the functionality though.

selinux-policy-3.14.3-124.el8.noarch
----
time->Wed Jul 26 15:26:39 2023
type=PROCTITLE msg=audit(1690399599.896:28): proctitle=2F7573722F7362696E2F73736864002D44002D6F436970686572733D6165733235362D67636D406F70656E7373682E636F6D2C63686163686132302D706F6C7931333035406F70656E7373682E636F6D2C6165733235362D6374722C6165733235362D6362632C6165733132382D67636D406F70656E7373682E636F6D2C6165
type=SYSCALL msg=audit(1690399599.896:28): arch=80000016 syscall=288 success=no exit=-13 a0=ffffffffffffff9c a1=3ffb3dab4fa a2=0 a3=0 items=0 ppid=1 pid=1193 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)
type=AVC msg=audit(1690399599.896:28): avc:  denied  { read } for  pid=1193 comm="sshd" name="prandom" dev="devtmpfs" ino=25615 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0
----


Version-Release number of selected component (if applicable):
openssh-8.0p1-19.el8_8.s390x
selinux-policy-3.14.3-124.el8.noarch

How reproducible:
always

Steps to Reproduce:
1. configure sshd to use openssl ibmca engine and restart the service
2.
3.

Actual results:
AVC denial loggged


Expected results:
no AVC denial, sshd is eventually allowed to access prandom

Additional info:

Comment 2 Milos Malik 2023-07-27 07:49:31 UTC
# rpm -qa selinux\*
selinux-policy-3.14.3-124.el8.noarch
selinux-policy-targeted-3.14.3-124.el8.noarch
# matchpathcon /dev/prandom
/dev/prandom	system_u:object_r:random_device_t:s0
#

It seems that the /dev/prandom device was mislabeled.


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