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 1289274 - SELinux prevents dmidecode from reading /dev/urandom
Summary: SELinux prevents dmidecode from reading /dev/urandom
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: All
OS: Linux
medium
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-07 19:43 UTC by Vasu Kulkarni
Modified: 2023-09-14 03:14 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-60.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:25:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Vasu Kulkarni 2015-12-07 19:43:59 UTC
Description of problem:

During Ceph product testing using 7.2GA, there are many denials that show up from dmidecode process in audit log, Is this a dmidecode issue?

 ['type=AVC msg=audit(1449285376.434:1350): avc: denied { read } for pid=6080 comm="dmidecode" path="/dev/urandom" dev="devtmpfs" ino=1033 scontext=system_u:system_r:dmidecode_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file'] 


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

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

uname:
Linux magna036 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

rpn package:
dmidecode-2.12-5.el7.x86_64
python-dmidecode-3.10.13-11.el7.x86_64



How reproducible:


Steps to Reproduce:
7.2 GA build with Selinux enabled


Actual results:

Denials in audit.log from dmidecode


Expected results:



Additional info:

Comment 1 Milos Malik 2015-12-08 07:31:49 UTC
# rpm -qa selinux-policy\*
selinux-policy-sandbox-3.13.1-60.el7.noarch
selinux-policy-mls-3.13.1-60.el7.noarch
selinux-policy-3.13.1-60.el7.noarch
selinux-policy-minimum-3.13.1-60.el7.noarch
selinux-policy-devel-3.13.1-60.el7.noarch
selinux-policy-doc-3.13.1-60.el7.noarch
selinux-policy-targeted-3.13.1-60.el7.noarch
# sesearch -s dmidecode_t -t urandom_device_t -c chr_file -A -C -p read
Found 2 semantic av rules:
   allow domain urandom_device_t : chr_file { ioctl read getattr lock open } ; 
DT allow domain urandom_device_t : chr_file { ioctl read getattr lock open } ; [ global_ssp ]

# 

Which version of selinux-policy was installed on that machine?

Comment 2 Vasu Kulkarni 2015-12-08 19:31:43 UTC
Following version is installed

[ubuntu@magna031 cd]$ rpm -qa selinux-policy\*
selinux-policy-3.13.1-60.el7.noarch
selinux-policy-targeted-3.13.1-60.el7.noarch

Comment 3 Lukas Vrabec 2016-03-17 12:02:42 UTC
#============= dmidecode_t ==============

#!!!! This avc is allowed in the current policy
allow dmidecode_t urandom_device_t:chr_file read;

[root@bkr-hv10-guest16 ~]# rpm -q selinux-policy 
selinux-policy-3.13.1-60.el7_2.3.noarch

[root@bkr-hv10-guest16 ~]# sesearch -s dmidecode_t -t urandom_device_t -c chr_file -A -C -p read
Found 2 semantic av rules:
   allow domain urandom_device_t : chr_file { ioctl read getattr lock open } ; 
DT allow domain urandom_device_t : chr_file { ioctl read getattr lock open } ; [ global_ssp ]


selinux-policy-3.13.1-60.el7.noarch looks fine.

Comment 8 errata-xmlrpc 2016-11-04 02:25:45 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://rhn.redhat.com/errata/RHBA-2016-2283.html

Comment 9 Red Hat Bugzilla 2023-09-14 03:14:29 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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