This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 656290 - udevmonitor cannot create socket if MLS policy is in enforcing mode
udevmonitor cannot create socket if MLS policy is in enforcing mode
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.6
All Linux
low Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-23 07:44 EST by Milos Malik
Modified: 2012-10-15 10:26 EDT (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-294.el5
Doc Type: Bug Fix
Doc Text:
When SELinux was running in the enforcing mode, an SELinux MLS policy did not allow the udevmonitor to create a socket. As a result, an attempt to run this command in single user mode failed with the following error message: error getting socket: Permission denied With this update, the SELinux policy has been fixed to permit the creation of such socket, and udevmonitor can now be run as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 16:51:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2010-11-23 07:44:13 EST
Description of problem:
root cannot run udevmonitor on MLS machine in enforcing mode

Version-Release number of selected component (if applicable):
RHEL5.6-Server-20101119.0
selinux-policy-2.4.6-293.el5
selinux-policy-devel-2.4.6-293.el5
selinux-policy-mls-2.4.6-293.el5
selinux-policy-targeted-2.4.6-293.el5

How reproducible:
always

Steps to Reproduce
==================
(root is logged in via console)
sh-3.2# id -Z
system_u:system_r:sysadm_t:s0-s15:c0.c1023
sh-3.2# setenforce 1
sh-3.2# udevmonitor 
error getting socket: Permission denied
sh-3.2# setenforce 0
sh-3.2# udevmonitor 
udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]

^C

Actual results:
type=1400 audit(1290515858.409:49): avc:  denied  { create } for  pid=3826 comm="udevmonitor" scontext=system_u:system_r:sysadm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:sysadm_t:s0-s15:c0.c1023 tclass=netlink_kobject_uevent_socket
type=1404 audit(1290515864.241:50): enforcing=0 old_enforcing=1 auid=4294967295 ses=4294967295
type=1400 audit(1290515867.913:51): avc:  denied  { create } for  pid=3828 comm="udevmonitor" scontext=system_u:system_r:sysadm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:sysadm_t:s0-s15:c0.c1023 tclass=netlink_kobject_uevent_socket
type=1400 audit(1290515867.913:52): avc:  denied  { bind } for  pid=3828 comm="udevmonitor" scontext=system_u:system_r:sysadm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:sysadm_t:s0-s15:c0.c1023 tclass=netlink_kobject_uevent_socket

Expected results:
no AVCs
Comment 1 Milos Malik 2010-11-23 07:52:52 EST
I forgot to mention that the machine is in single mode.
Comment 2 Miroslav Grepl 2010-11-23 08:02:36 EST
We allow it in RHEL6.
Comment 3 Daniel Walsh 2010-11-23 09:34:00 EST
Yes we should allow it.
Comment 4 Miroslav Grepl 2010-11-23 11:36:30 EST
Fixed in selinux-policy-2.4.6-294.el5.noarch
Comment 7 Jaromir Hradilek 2011-01-05 11:28:03 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When SELinux was running in the enforcing mode, an SELinux MLS policy did not allow the udevmonitor to create a socket. As a result, an attempt to run this command in single user mode failed with the following error message:

  error getting socket: Permission denied

With this update, the SELinux policy has been fixed to permit the creation of such socket, and udevmonitor can now be run as expected.
Comment 9 errata-xmlrpc 2011-01-13 16:51:25 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0026.html

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