Bug 737443

Summary: SELinux is preventing dmesg from reading a file in /var/spool/abrt/pyhook-*/*/sos_commands/networking/brctl_show
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED INSUFFICIENT_DATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: agk, bmr, dwalsh, gavin, jmoskovc, mnowak, nobody+abrt-devel-list, npajkovs, prc
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 14:26:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2011-09-12 06:47:52 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-109.el6.noarch

How reproducible:
sometimes

Steps to Reproduce:
* it's very likely that the AVC was caused by following automated test:
/CoreOS/sos/Sanity/report-size
  
Actual results (seen on different machines)
----
time->Fri Sep  9 19:24:01 2011
type=SYSCALL msg=audit(1315610641.241:998205): arch=c000003e syscall=59 success=yes exit=0 a0=170f8f0 a1=170eda0 a2=170e880 a3=10 items=0 ppid=1889 pid=2129 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)
type=AVC msg=audit(1315610641.241:998205): avc:  denied  { read } for  pid=2129 comm="dmesg" path="/var/spool/abrt/pyhook-2011-09-09-19:23:55-1842/dell-pe2950-01-2011090919231315610636/sos_commands/networking/brctl_show" dev=dm-0 ino=1183316 scontext=system_u:system_r:dmesg_t:s0-s0:c0.c1023 tcontext=system_u:object_r:abrt_var_cache_t:s0 tclass=file
----

Expected results:
* no AVCs

Comment 1 Miroslav Grepl 2011-09-12 10:54:07 UTC
It looks like ABRT is leaking.

Comment 3 Nikola Pajkovsky 2011-09-21 12:32:06 UTC
sosreport is leaking

abrt executes:

nice sosreport --tmp-dir "$DUMP_DIR" --batch \
               --only=anaconda --only=bootloader --only=devicemapper \
               --only=filesys --only=hardware --only=kernel --only=libraries \
               --only=memory --only=networking --only=nfsserver --only=pam \
               --only=process --only=rpm -k rpm.rpmva=off --only=ssh \
               --only=startup --only=yum --only=general --only=x11 \

where --tmp-dir points to /var/spool/abrt/

Comment 4 Jiri Moskovcak 2011-10-05 13:12:14 UTC
Can we please get some steps to reproduce so we can investigate it? I don't see this with the default set of ABRT tests.

Comment 5 Bryn M. Reeves 2011-12-13 16:51:44 UTC
Were there any python exceptions recorded during the sos run that triggered this AVC?

The only way I can see sos leaking an fd to sos_commands/networking/brctl_show is if there's an unhandled exception while reading from this file.

Comment 6 Bryn M. Reeves 2012-02-13 11:29:31 UTC
I also don't understand why dmesg is attempting to access this file. Anyway, this has never been seen on "normal" sos runs outside abrtd (and probably can't happen as they normally run unconfined in a root session) so I think abrt needs to look at how it's running the command to avoid it.

Comment 7 Jiri Moskovcak 2012-04-05 13:41:51 UTC
Can't find a reliable reproducer so I think it's not so critical - moving to 6.4.

Comment 9 RHEL Program Management 2012-07-10 08:32:17 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 10 RHEL Program Management 2012-07-10 23:02:45 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 11 RHEL Program Management 2012-12-14 08:53:43 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.