Bug 572706 - udev is creating /dev/snd with the wrong label on MLS
udev is creating /dev/snd with the wrong label on MLS
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 572707
  Show dependency treegraph
 
Reported: 2010-03-11 16:03 EST by Daniel Walsh
Modified: 2010-09-26 00:37 EDT (History)
3 users (show)

See Also:
Fixed In Version: udev-153-4.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 572707 (view as bug list)
Environment:
Last Closed: 2010-09-26 00:37:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
I added this patch and I am not seeing /dev/snd go through this code path. (656 bytes, text/plain)
2010-03-17 10:14 EDT, Daniel Walsh
no flags Details

  None (edit)
Description Daniel Walsh 2010-03-11 16:03:11 EST
Description of problem:

It is creating it with SystemHigh.  (s15:c0.c1023)
system_u:object_r:device_t:s15:c0.c1023

Matchpatcon says it should be s0
system_u:object_r:device_t:s0

This is causing problem on MLS machines.
Comment 1 Harald Hoyer 2010-03-16 06:02:47 EDT
(In reply to comment #0)
> Description of problem:
> 
> It is creating it with SystemHigh.  (s15:c0.c1023)
> system_u:object_r:device_t:s15:c0.c1023
> 
> Matchpatcon says it should be s0
> system_u:object_r:device_t:s0
> 
> This is causing problem on MLS machines.    

udev does not treat any devices with special rules, so it's all in your hand!

Where should udev get the info on how to label the device, if not from selinux itsself?
Comment 2 Daniel Walsh 2010-03-16 10:40:22 EDT
This directory is created as a side effect I believe.

Kernel tells udev to create /dev/snd/seq  and udev creates /dev/snd first.  Does udev ask SELinux what to label this directory or does it just create the directory and then ask how to label the device?  Where in the code is this done?
Comment 3 Harald Hoyer 2010-03-16 12:13:40 EDT
libudev/libudev-util-private.c

util_create_path(..)
        udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755);
        ret = mkdir(p, 0755);
        udev_selinux_resetfscreatecon(udev);
Comment 4 Daniel Walsh 2010-03-17 10:14:13 EDT
Created attachment 400776 [details]
I added this patch and I am not seeing /dev/snd go through this code path.

I am not even sure udev is creating the directory.
Comment 5 Harald Hoyer 2010-03-17 11:10:15 EDT
better change "err" to "info" and set the debuglevel to "info"... err is only compiled, if udev is compiled in debug mode.
Comment 6 Harald Hoyer 2010-04-13 11:50:25 EDT
ping?
Comment 7 Daniel Walsh 2010-04-13 11:56:15 EDT
This is still there although I have no idea why.  I have been working on other stuff but qa is getting around to testing it.
Comment 8 Fedora Update System 2010-09-22 08:09:43 EDT
udev-153-4.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/udev-153-4.fc13
Comment 9 Fedora Update System 2010-09-23 00:58:33 EDT
udev-153-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update udev'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/udev-153-4.fc13
Comment 10 Fedora Update System 2010-09-26 00:36:39 EDT
udev-153-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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