Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2226947

Summary: sshd is denied to read prandom
Product: Red Hat Enterprise Linux 8 Reporter: Karel Srot <ksrot>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED NOTABUG QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: low    
Version: 8.9CC: lvrabec, mmalik, nknazeko
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-31 08:00:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.