Bug 657365

Summary: MLS policy: "run_init service cpuspeed start" produces AVC
Product: Red Hat Enterprise Linux 5 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: dwalsh
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-2.4.6-296.el5 Doc Type: Bug Fix
Doc Text:
Due to an error in the SELinux MLS policy, running the "run_init service cpuspeed start" command in single user mode caused an AVC message to appear in the audit log. With this update, the SELinux MLS policy has been corrected, so that the above command works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 21:51:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2010-11-25 15:51:02 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-mls-2.4.6-295.el5
selinux-policy-devel-2.4.6-295.el5
selinux-policy-targeted-2.4.6-295.el5
selinux-policy-2.4.6-295.el5
selinux-policy-strict-2.4.6-295.el5
selinux-policy-minimum-2.4.6-295.el5

How reproducible:
always

Steps to Reproduce:
(machine is in single mode, root is logged in via console)
# id -Z
system_u:system_r:sysadm_t:s0-s15:c0.c1023
# setenforce 1
# run_init service cpuspeed start
Authenticating root.
Password: 
# dmesg
  
Actual results:
(seen on first machine)
type=1400 audit(1290699126.167:48): avc:  denied  { read } for  pid=4051 comm="modinfo" name="powernow-k8.ko" dev=dm-0 ino=12964251 scontext=system_u:system_r:initrc_t:s0-s15:c0.c1023 tcontext=system_u:object_r:modules_object_t:s0 tclass=file
type=1300 audit(1290699126.167:48): arch=c000003e syscall=2 success=no exit=-13 a0=10a15010 a1=0 a2=1b6 a3=0 items=0 ppid=4050 pid=4051 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="modinfo" exe="/sbin/modinfo" subj=system_u:system_r:initrc_t:s0-s15:c0.c1023 key=(null)

(seen on second machine)
type=1400 audit(1290699135.193:52): avc:  denied  { read } for  pid=3551 comm="modinfo" name="speedstep-centrino.ko" dev=dm-0 ino=5435095 scontext=system_u:system_r:initrc_t:s0-s15:c0.c1023 tcontext=system_u:object_r:modules_object_t:s0 tclass=file
type=1300 audit(1290699135.193:52): arch=40000003 syscall=5 success=no exit=-13 a0=83b9008 a1=0 a2=1b6 a3=83bf710 items=0 ppid=3549 pid=3551 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="modinfo" exe="/sbin/modinfo" subj=system_u:system_r:initrc_t:s0-s15:c0.c1023 key=(null)

Expected results:
no AVCs

Comment 2 Miroslav Grepl 2010-11-26 10:48:07 UTC
Milos, try to test it with the following rules in local policy


files_read_kernel_modules(initrc_t)


Will work.

Comment 3 Milos Malik 2010-11-26 13:58:46 UTC
Local policy module fixed the problem. No AVCs appeared.

Comment 4 Miroslav Grepl 2010-11-30 09:32:58 UTC
Fixed in selinux-policy-2.4.6-296.el5

Comment 7 Jaromir Hradilek 2011-01-05 16:29:38 UTC
    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:
Due to an error in the SELinux MLS policy, running the "run_init service cpuspeed start" command in single user mode caused an AVC message to appear in the audit log. With this update, the SELinux MLS policy has been corrected, so that the above command works as expected.

Comment 9 errata-xmlrpc 2011-01-13 21:51:37 UTC
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