Bug 856488 - AVCs when running udevd test with disabled unconfined and unlabelednet
AVCs when running udevd test with disabled unconfined and unlabelednet
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Michal Trunecka
Depends On:
  Show dependency treegraph
Reported: 2012-09-12 02:58 EDT by Michal Trunecka
Modified: 2014-09-30 19:33 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-04 02:59:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Trunecka 2012-09-12 02:58:59 EDT
Description of problem:
Selinux blocks running udevd (start_udev) and reported AVCs when unconfined and unlabelednet selinux modules are disabled. The pest passes without any AVC when both modules are enabled.

AVCs in permissive mode:

time->Wed Sep 12 08:34:44 2012
type=PATH msg=audit(1347431684.203:5228): item=2 name=(null) inode=327047 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0
type=PATH msg=audit(1347431684.203:5228): item=1 name=(null) inode=156823 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:shell_exec_t:s0
type=PATH msg=audit(1347431684.203:5228): item=0 name="/sbin/start_udev" inode=6076 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:udev_exec_t:s0
type=CWD msg=audit(1347431684.203:5228):  cwd="/"
type=EXECVE msg=audit(1347431684.203:5228): argc=3 a0="/bin/bash" a1="/sbin/start_udev"
type=EXECVE msg=audit(1347431684.203:5228): argc=4 a0="/bin/bash" a1="/sbin/start_udev"
type=SYSCALL msg=audit(1347431684.203:5228): arch=c000003e syscall=59 success=yes exit=0 a0=7fffa993018a a1=7fffa9930360 a2=7fffa9930380 a3=7fffa992ffc0 items=3 ppid=20131 pid=20132 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts6 ses=3 comm="start_udev" exe="/bin/bash" subj=system_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1347431684.203:5228): avc:  denied  { entrypoint } for  pid=20132 comm="run_init" path="/sbin/start_udev" dev=sda3 ino=6076 scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:object_r:udev_exec_t:s0 tclass=file
time->Wed Sep 12 08:34:44 2012
type=PATH msg=audit(1347431684.251:5229): item=0 name="/proc/kcore" inode=4026532037 dev=00:03 mode=0100400 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:proc_kcore_t:s0
type=CWD msg=audit(1347431684.251:5229):  cwd="/"
type=SYSCALL msg=audit(1347431684.251:5229): arch=c000003e syscall=4 success=yes exit=0 a0=7fff8dd4c608 a1=7fff8dd4bb40 a2=7fff8dd4bb40 a3=a items=1 ppid=20132 pid=20153 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts6 ses=3 comm="ln" exe="/bin/ln" subj=system_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1347431684.251:5229): avc:  denied  { getattr } for  pid=20153 comm="ln" path="/proc/kcore" dev=proc ino=4026532037 scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:object_r:proc_kcore_t:s0 tclass=file

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

How reproducible:

Steps to Reproduce:
1. semodule -d unconfined; semoudle -d unlabelednet
2. killall udevd
3. run_init start_udev

Actual results:
execvp: Permission denied
and AVCs are reported

Expected results:
udevd is started without AVCs
Comment 2 Miroslav Grepl 2012-10-15 14:06:00 EDT
could you ping me to discuss this issue.
Comment 3 Daniel Walsh 2012-10-16 08:17:15 EDT
What service is using run_init?
Comment 4 Daniel Walsh 2012-10-16 08:17:56 EDT
Maybe change it to run_init sh -c start_udev, or we don't need run_init.
Comment 5 Miroslav Grepl 2012-10-16 08:21:16 EDT
Exactly. I believe we don't need run_init.
Comment 6 Miroslav Grepl 2013-01-04 02:59:57 EST
please reopen if you don't agree.

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