Bug 657271 - MLS policy: semodule -i / -r ... produces AVCs
Summary: MLS policy: semodule -i / -r ... produces AVCs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-25 11:04 UTC by Milos Malik
Modified: 2016-09-09 08:47 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-2.4.6-296.el5
Doc Type: Bug Fix
Doc Text:
With the SELinux MLS policy enabled, running the semodule command could cause various AVC messages to be written to the log. This error has been fixed, and semodule no longer causes such messages to appear.
Clone Of:
Environment:
Last Closed: 2011-01-13 21:51:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0026 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-01-12 16:11:15 UTC

Description Milos Malik 2010-11-25 11:04:54 UTC
Description of problem:


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

How reproducible:
always

Steps to Reproduce:
(machine is in runlevel 1, root is logged in via console)
# id -Z
system_u:system_r:sysadm_t:s0-s15:c0.c1023
# cat mypol.te
policy_module(mypol,1.0)

# make -f /usr/share/selinux/devel/Makefile 
Compiling mls mypol module
/usr/bin/checkmodule:  loading policy configuration from tmp/mypol.tmp
/usr/bin/checkmodule:  policy configuration loaded
/usr/bin/checkmodule:  writing binary representation (version 6) to tmp/mypol.mod
Creating mls mypol.pp policy package
rm tmp/mypol.mod.fc tmp/mypol.mod
# semodule -i mypol.pp
# echo $?
0

  
Actual results:
type=1400 audit(1290682738.139:18): avc:  denied  { use } for  pid=2529 comm="load_policy" path="/dev/console" dev=tmpfs ino=741 scontext=system_u:system_r:load_policy_t:s0-s15:c0.c1023 tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd
type=1400 audit(1290682738.139:19): avc:  denied  { use } for  pid=2529 comm="load_policy" path="/dev/console" dev=tmpfs ino=741 scontext=system_u:system_r:load_policy_t:s0-s15:c0.c1023 tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd
type=1400 audit(1290682738.139:20): avc:  denied  { use } for  pid=2529 comm="load_policy" path="/dev/console" dev=tmpfs ino=741 scontext=system_u:system_r:load_policy_t:s0-s15:c0.c1023 tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd

Expected results:
no AVCs

Comment 1 Milos Malik 2010-11-25 14:15:00 UTC
Seen in permissive mode:

type=1400 audit(1290694405.830:282): avc:  denied  { use } for  pid=9696 comm="load_policy" path="/dev/console" dev=tmpfs ino=741 scontext=system_u:system_r:load_policy_t:s0-s15:c0.c1023 tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd
type=1300 audit(1290694405.830:282): arch=40000003 syscall=11 success=yes exit=0 a0=9509590 a1=ae28150 a2=0 a3=0 items=0 ppid=9695 pid=9696 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm="load_policy" exe="/usr/sbin/load_policy" subj=system_u:system_r:load_policy_t:s0-s15:c0.c1023 key=(null)

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

Comment 9 Jaromir Hradilek 2011-01-05 16:29:20 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:
With the SELinux MLS policy enabled, running the semodule command could cause various AVC messages to be written to the log. This error has been fixed, and semodule no longer causes such messages to appear.

Comment 11 errata-xmlrpc 2011-01-13 21:51:35 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


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