Bug 594688

Summary: SELinux is preventing /usr/sbin/abrtd "write" access on /var/spool.
Product: Red Hat Enterprise Linux 6 Reporter: Jay Turner <jturner>
Component: abrtAssignee: Jiri Moskovcak <jmoskovc>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: ahecox, dfediuck, dvlasenk, dwalsh, gavin, kklic, npajkovs, srevivo, syeghiay
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: abrt-1.1.3-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-03 14:18:37 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 Jay Turner 2010-05-21 10:52:56 UTC
Description of problem:

Summary:

SELinux is preventing /usr/sbin/abrtd "write" access on /var/spool.

Detailed Description:

SELinux denied access requested by abrtd. It is not expected that this access is
required by abrtd and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_spool_t:s0
Target Objects                /var/spool [ dir ]
Source                        abrtd
Source Path                   /usr/sbin/abrtd
Port                          <Unknown>
Host                          dyno.devel.redhat.com
Source RPM Packages           abrt-1.1.2-3.el6
Target RPM Packages           filesystem-2.4.30-2.1.el6
Policy RPM                    selinux-policy-3.7.19-19.el6
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     dyno.devel.redhat.com
Platform                      Linux dyno.devel.redhat.com 2.6.32-27.el6.x86_64
                              #1 SMP Tue May 18 12:25:26 EDT 2010 x86_64 x86_64
Alert Count                   5
First Seen                    Fri 21 May 2010 06:32:42 AM EDT
Last Seen                     Fri 21 May 2010 06:50:14 AM EDT
Local ID                      c4a562fd-d5a2-4a4c-b7f7-d4901ea1b71b
Line Numbers                  

Raw Audit Messages            

node=dyno.devel.redhat.com type=AVC msg=audit(1274439014.970:78508): avc:  denied  { write } for  pid=8136 comm="abrtd" name="spool" dev=dm-3 ino=98312 scontext=unconfined_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_spool_t:s0 tclass=dir

node=dyno.devel.redhat.com type=SYSCALL msg=audit(1274439014.970:78508): arch=c000003e syscall=82 success=no exit=-13 a0=41e913 a1=41e771 a2=0 a3=7ffffafec1f0 items=0 ppid=8135 pid=8136 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="abrtd" exe="/usr/sbin/abrtd" subj=unconfined_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2010-05-21 11:46:10 UTC
abrt should include /var/spool/abrt in its rpm payload.  I will add a fix to allow abrt to create this directory in selinux-policy-3.7.19-20.el6.noarch

But this is really an abrt bug.

Comment 3 Denys Vlasenko 2010-05-21 12:45:21 UTC
(In reply to comment #1)
> abrt should include /var/spool/abrt in its rpm payload.  I will add a fix to
> allow abrt to create this directory in selinux-policy-3.7.19-20.el6.noarch
> 
> But this is really an abrt bug.    

Dan, we fixed abrt, the build is at https://brewweb.devel.redhat.com/buildinfo?buildID=132768

Comment 4 Jay Turner 2010-05-21 13:40:47 UTC
Knocking this back to Assigned.  The root of the problem is that for compatibility, the abrtd daemon attempts to rename "/var/cache/abrt" to "/var/spool/abrt" which is causing the SELinux denial.  Looks like we need to cleanup this code in Daemon.cpp.  I'm not sure what the best solution is (copy the files as oppose to renaming the directories?) but something needs to be fixed in abrt.

Comment 7 Denys Vlasenko 2010-05-25 11:30:59 UTC
(In reply to comment #4)
> Knocking this back to Assigned.  The root of the problem is that for
> compatibility, the abrtd daemon attempts to rename "/var/cache/abrt" to
> "/var/spool/abrt" which is causing the SELinux denial.  Looks like we need to
> cleanup this code in Daemon.cpp.  I'm not sure what the best solution is (copy
> the files as oppose to renaming the directories?) but something needs to be
> fixed in abrt.    

The code which tries to preserve old crash data by renaming was removed. Here is the new build:

https://brewweb.devel.redhat.com/buildinfo?buildID=132957