Bug 605681 - SELinux is preventing /bin/dmesg access to a leaked /var/spool/abrt/kerneloops-1276871599-1/springer-2010061816331276871599/sos_logs/sos.log file descriptor.
Summary: SELinux is preventing /bin/dmesg access to a leaked /var/spool/abrt/kerneloop...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: x86_64 Linux
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
Whiteboard: setroubleshoot_trace_hash:c79159320ce...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-18 14:41 UTC by Mark Wielaard
Modified: 2012-10-15 15:02 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-27.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 21:34:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mark Wielaard 2010-06-18 14:41:48 UTC

SELinux is preventing /bin/dmesg access to a leaked
file descriptor.

Detailed Description:

[dmesg has a permissive type (dmesg_t). This access was not denied.]

SELinux denied access requested by the dmesg command. It looks like this is
either a leaked descriptor or dmesg output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
You should generate a bugzilla on selinux-policy, and it will get routed to the
appropriate package. You can safely ignore this avc.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ

Additional Information:

Source Context                system_u:system_r:dmesg_t:s0-s0:c0.c1023
Target Context                system_u:object_r:abrt_var_cache_t:s0
Target Objects                /var/spool/abrt/kerneloops-1276871599-1/springer-2
                              010061816331276871599/sos_logs/sos.log [ file ]
Source                        dmesg
Source Path                   /bin/dmesg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-ng-2.17.2-3.el6
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-25.el6
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32-36.el6.x86_64
                              #1 SMP Wed Jun 16 15:48:48 EDT 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 18 Jun 2010 04:33:25 PM CEST
Last Seen                     Fri 18 Jun 2010 04:33:25 PM CEST
Local ID                      ed2b46aa-60b5-4452-9e2a-82cc3a5f272a
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1276871605.72:917): avc:  denied  { append } for  pid=18626 comm="dmesg" path="/var/spool/abrt/kerneloops-1276871599-1/springer-2010061816331276871599/sos_logs/sos.log" dev=dm-0 ino=4911 scontext=system_u:system_r:dmesg_t:s0-s0:c0.c1023 tcontext=system_u:object_r:abrt_var_cache_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1276871605.72:917): arch=c000003e syscall=59 success=yes exit=0 a0=21586c0 a1=21577a0 a2=2157360 a3=10 items=0 ppid=18625 pid=18626 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dmesg" exe="/bin/dmesg" subj=system_u:system_r:dmesg_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  leaks,dmesg,dmesg_t,abrt_var_cache_t,file,append
audit2allow suggests:

#============= dmesg_t ==============
allow dmesg_t abrt_var_cache_t:file append;

Comment 1 Mark Wielaard 2010-06-18 14:45:42 UTC
This happened because the kernel generated a WARN_ON message. The WARN_ON message plus kernel backtrace is available in the dmesg output, but isn't in the sos.log.

Comment 3 RHEL Product and Program Management 2010-06-18 15:03:30 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 4 Daniel Walsh 2010-06-21 17:59:52 UTC
Miroslav add

## <summary>
##	Append abrt cache
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
		type abrt_var_cache_t;

	append_files_pattern($1, abrt_var_cache_t, abrt_var_cache_t)

Comment 5 Miroslav Grepl 2010-06-22 06:33:50 UTC
Fixed in selinux-policy-3.7.19-27.el6.

Comment 7 releng-rhel@redhat.com 2010-11-10 21:34:46 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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