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 1451735 - rngd produces AVC denial about /sys/devices/virtual/misc/hw_random/rng_available
Summary: rngd produces AVC denial about /sys/devices/virtual/misc/hw_random/rng_available
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
: 1452629 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-17 12:07 UTC by Jan Pazdziora
Modified: 2017-08-01 15:26 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.13.1-151.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 15:26:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1861 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-08-01 17:50:24 UTC

Description Jan Pazdziora 2017-05-17 12:07:11 UTC
Description of problem:

New rng-tools causes AVC denial to be logged when rngd -f is run.

Version-Release number of selected component (if applicable):

rng-tools-5-10.el7

How reproducible:

Deterministic.

Steps to Reproduce:
1. yum install -y rng-tools
2. systemctl start rngd
2. Check audit.log.

Actual results:

type=SYSCALL msg=audit(1495020115.415:57): arch=c000003e syscall=4 success=no exit=-13 a0=1b53050 a1=7ffd9ee435c0 a2=7ffd9ee435c0 a3=7ffd9ee432d0 items=0 ppid=1 pid=12726 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rngd" exe="/usr/sbin/rngd" subj=system_u:system_r:rngd_t:s0 key=(null)
type=AVC msg=audit(1495020115.415:57): avc:  denied  { getattr } for  pid=12726 comm="rngd" path="/sys/devices/virtual/misc/hw_random/rng_available" dev="sysfs" ino=10220 scontext=system_u:system_r:rngd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file

Expected results:

No AVC denial.

Additional info:

This is a regression against rng-tools-5-9.el7.

Comment 5 Neil Horman 2017-05-17 13:49:11 UTC
This needs to be addressed in the selinux policy component, as it needs rngd read access to the rng_available sysfs attribute

Comment 6 Milos Malik 2017-05-18 08:03:11 UTC
Following SELinux denials appear in permissive mode:
----
type=PROCTITLE msg=audit(05/18/2017 10:02:08.184:287) : proctitle=/sbin/rngd -f 
type=PATH msg=audit(05/18/2017 10:02:08.184:287) : item=0 name=/sys/devices/virtual/misc/hw_random/rng_available inode=7213 dev=00:12 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL 
type=CWD msg=audit(05/18/2017 10:02:08.184:287) : cwd=/ 
type=SYSCALL msg=audit(05/18/2017 10:02:08.184:287) : arch=x86_64 syscall=stat success=yes exit=0 a0=0xa900e0 a1=0x7ffc739170b0 a2=0x7ffc739170b0 a3=0x7ffc73916dc0 items=1 ppid=1 pid=23401 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rngd exe=/usr/sbin/rngd subj=system_u:system_r:rngd_t:s0 key=(null) 
type=AVC msg=audit(05/18/2017 10:02:08.184:287) : avc:  denied  { getattr } for  pid=23401 comm=rngd path=/sys/devices/virtual/misc/hw_random/rng_available dev="sysfs" ino=7213 scontext=system_u:system_r:rngd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 
----
type=PROCTITLE msg=audit(05/18/2017 10:02:08.184:288) : proctitle=/sbin/rngd -f 
type=PATH msg=audit(05/18/2017 10:02:08.184:288) : item=0 name=/sys/devices/virtual/misc/hw_random/rng_available inode=7213 dev=00:12 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL 
type=CWD msg=audit(05/18/2017 10:02:08.184:288) : cwd=/ 
type=SYSCALL msg=audit(05/18/2017 10:02:08.184:288) : arch=x86_64 syscall=open success=yes exit=4 a0=0xa900e0 a1=O_RDONLY a2=0xa91200 a3=0x7ffc73916e40 items=1 ppid=1 pid=23401 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rngd exe=/usr/sbin/rngd subj=system_u:system_r:rngd_t:s0 key=(null) 
type=AVC msg=audit(05/18/2017 10:02:08.184:288) : avc:  denied  { open } for  pid=23401 comm=rngd path=/sys/devices/virtual/misc/hw_random/rng_available dev="sysfs" ino=7213 scontext=system_u:system_r:rngd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 
type=AVC msg=audit(05/18/2017 10:02:08.184:288) : avc:  denied  { read } for  pid=23401 comm=rngd name=rng_available dev="sysfs" ino=7213 scontext=system_u:system_r:rngd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 
----

Comment 10 Lukas Vrabec 2017-05-23 08:39:25 UTC
*** Bug 1452629 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2017-08-01 15:26:23 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-2017:1861


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