RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard: setroubleshoot_trace_hash:c79159320ce...
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:34:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2010-06-18 14:41:48 UTC
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 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 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
inclusion.

Comment 4 Daniel Walsh 2010-06-21 17:59:52 UTC
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 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.