Bug 669656 - enforcing MLS -- avc: denied { syslog_read } for ... comm="dmesg" scontext=user_u:user_r:user_t:s0 tcontext=system_u:system_r:kernel_t:s15:c0.c1023 tclass=system
Summary: enforcing MLS -- avc: denied { syslog_read } for ... comm="dmesg" scontext=us...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.1
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: 2011-01-14 10:30 UTC by Milos Malik
Modified: 2012-10-15 14:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-14 14:20:02 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Milos Malik 2011-01-14 10:30:07 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-mls-3.7.19-63.el6.noarch
selinux-policy-3.7.19-63.el6.noarch
selinux-policy-minimum-3.7.19-63.el6.noarch
selinux-policy-targeted-3.7.19-63.el6.noarch
selinux-policy-doc-3.7.19-63.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. set up a RHEL-6 machine with MLS policy installed in permissive mode
2. go to runlevel 3
3. create an user
4. set up a password for the user
5. log in as the user
$ id -Z
user_u:user_r:user_t:s0
$ dmesg
klogctl: Permission denied
$ echo $?
1

Actual results:
----
time->Fri Jan 14 05:02:37 2011
type=SYSCALL msg=audit(1294999357.430:72): arch=80000015 syscall=103 success=no exit=-13 a0=3 a1=10017071030 a2=4008 a3=fefefefefefefeff items=0 ppid=1686 pid=1718 auid=501 uid=501 gid=502 euid=501 suid=501 fsuid=501 egid=502 sgid=502 fsgid=502 tty=pts0 ses=4 comm="dmesg" exe="/bin/dmesg" subj=user_u:user_r:user_t:s0 key=(null)
type=AVC msg=audit(1294999357.430:72): avc:  denied  { syslog_read } for  pid=1718 comm="dmesg" scontext=user_u:user_r:user_t:s0 tcontext=system_u:system_r:kernel_t:s15:c0.c1023 tclass=system
----

Expected results:
no AVC

Comment 2 Milos Malik 2011-01-14 10:40:22 UTC
The second step should look this way:
2. go to runlevel 3 and switch SELinux to enforcing mode

Comment 3 Miroslav Grepl 2011-01-14 12:53:39 UTC
We allow it for staff and admin SELinux users. I believe we don't want to allow it for guest_u and xguest_u users.

But we could consider to allow it for user_u SELinux user.

Comment 4 Daniel Walsh 2011-01-14 14:20:02 UTC
user_t should not be allowed to look at the dmesg output.

Comment 5 Miroslav Grepl 2011-01-14 14:28:10 UTC
Ok, I agree. But I should dontaudit it.

Comment 6 Daniel Walsh 2011-01-14 14:30:36 UTC
No, I want to know if my users are trying to read the syslog content.  They should be told not to do this.

Dmesg output could be considered an information leak.

Comment 7 Miroslav Grepl 2011-01-14 14:37:11 UTC
ok, i understand. I just thought 

$ dmesg
klogctl: Permission denied

is enough. But of course we want to know about that.


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