Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
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.
SELinux is preventing /bin/dmesg access to a leaked /var/spool/abrt/kerneloop...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
6.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
setroubleshoot_trace_hash:c79159320ce...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-18 10:41 EDT by Mark Wielaard
Modified: 2012-10-15 11:02 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Mark Wielaard 2010-06-18 10:41:48 EDT
Summary:

SELinux is preventing /bin/dmesg access to a leaked
/var/spool/abrt/kerneloops-1276871599-1/springer-2010061816331276871599/sos_logs/sos.log
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
the
/var/spool/abrt/kerneloops-1276871599-1/springer-2010061816331276871599/sos_logs/sos.log.
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
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385)

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 10:45:42 EDT
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 11:03:30 EDT
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
inclusion.
Comment 4 Daniel Walsh 2010-06-21 13:59:52 EDT
Miroslav add
	abrt_append_cache_files(dmesg_t)


########################################
## <summary>
##	Append abrt cache
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`abrt_append_cache_files',`
	gen_require(`
		type abrt_var_cache_t;
	')

	append_files_pattern($1, abrt_var_cache_t, abrt_var_cache_t)
')
Comment 5 Miroslav Grepl 2010-06-22 02:33:50 EDT
Fixed in selinux-policy-3.7.19-27.el6.
Comment 7 releng-rhel@redhat.com 2010-11-10 16:34:46 EST
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.