Bug 1451735
| Summary: | rngd produces AVC denial about /sys/devices/virtual/misc/hw_random/rng_available | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Pazdziora (Red Hat) <jpazdziora> |
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | jpazdziora, lvrabec, mgrepl, mmalik, pbunyan, plautrba, pvrabec, ssekidde |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-3.13.1-151.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-01 15:26:23 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: | |||
This needs to be addressed in the selinux policy component, as it needs rngd read access to the rng_available sysfs attribute 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
----
*** Bug 1452629 has been marked as a duplicate of this bug. *** 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 |
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.