Bug 539987 - SELinux is preventing /usr/sbin/abrtd "write" access on abrt.
Summary: SELinux is preventing /usr/sbin/abrtd "write" access on abrt.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Moskovcak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:25472fb419f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-21 20:53 UTC by Jim Tourville
Modified: 2015-02-01 22:49 UTC (History)
120 users (show)

Fixed In Version: abrt-1.1.1-1.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-02 18:06:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jim Tourville 2009-11-21 20:53:33 UTC
Summary:

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

Detailed Description:

[abrtd has a permissive type (abrt_t). This access was not denied.]

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://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:abrt_t:s0
Target Context                system_u:object_r:abrt_etc_t:s0
Target Objects                abrt [ dir ]
Source                        abrtd
Source Path                   /usr/sbin/abrtd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat
                              Nov 7 21:25:57 EST 2009 i686 i686
Alert Count                   3
First Seen                    Fri 20 Nov 2009 02:52:45 PM MST
Last Seen                     Fri 20 Nov 2009 02:52:45 PM MST
Local ID                      3b73bc35-02c7-407c-b0dc-da7ed04883d0
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1258753965.264:22992): avc:  denied  { write } for  pid=1201 comm="abrtd" name="abrt" dev=sda3 ino=185634 scontext=system_u:system_r:abrt_t:s0 tcontext=system_u:object_r:abrt_etc_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1258753965.264:22992): avc:  denied  { add_name } for  pid=1201 comm="abrtd" name="pyhook.conf" scontext=system_u:system_r:abrt_t:s0 tcontext=system_u:object_r:abrt_etc_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1258753965.264:22992): avc:  denied  { create } for  pid=1201 comm="abrtd" name="pyhook.conf" scontext=system_u:system_r:abrt_t:s0 tcontext=system_u:object_r:abrt_etc_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1258753965.264:22992): arch=40000003 syscall=5 success=yes exit=9 a0=5480b9 a1=8241 a2=1b6 a3=41cec9 items=0 ppid=1 pid=1201 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="abrtd" exe="/usr/sbin/abrtd" subj=system_u:system_r:abrt_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-41.fc12,catchall,abrtd,abrt_t,abrt_etc_t,dir,write
audit2allow suggests:

#============= abrt_t ==============
allow abrt_t abrt_etc_t:dir { write add_name };
allow abrt_t abrt_etc_t:file create;

Comment 1 Daniel Walsh 2009-11-23 15:25:01 UTC
Why is the abrt application modifying/creating pyhook.conf?

Comment 2 Jim Tourville 2009-11-24 03:12:48 UTC
I really don't know. I actually tried (after the SELinux alerts) to uninstall all of the abrt applications. But, this one kept coming up. (If you are asking me). When I did "rpm -q abrt" after I uninstalled the abrt apps I could not find a single one of them but abrt continued to try to modifying/create pyhook.conf.

Comment 3 Daniel Walsh 2009-11-24 12:17:53 UTC
I am asking the abrt team.  Sorry for the confusion.

Comment 4 Jiri Moskovcak 2009-11-26 16:29:38 UTC
It's config file for ABRT python hook, is it a problem if abrtd changes a file in /etc/abrt ??

Jirka

Comment 5 Daniel Walsh 2009-11-30 16:17:45 UTC
Well usually we like to stop a tool from changing it configuration.

We can setup policy to allow it to write to /etc/abrt/pyhook.conf, but we would like it to be in a different directory if an admin is also going to edit this file.

The goal of most apps is to think of /etc as a read only partition and if an app needs to write, it should put the content into /var/lib.

Comment 6 Jiri Moskovcak 2009-12-07 10:51:45 UTC
(In reply to comment #5)
> Well usually we like to stop a tool from changing it configuration.
> 
> We can setup policy to allow it to write to /etc/abrt/pyhook.conf, but we would
> like it to be in a different directory if an admin is also going to edit this
> file.
> 
> The goal of most apps is to think of /etc as a read only partition and if an
> app needs to write, it should put the content into /var/lib.  

I can change the behavior of python hook, so it won't need this file, but our idea was to make the daemon configurable via the gui and make the daemon to read/write it's configuration to keep the code on one place(we can probably make it into a library). What would be the right solution for this? Create separate app like system-config-abrt and let the daemon just read the config file?

Comment 7 Daniel Walsh 2009-12-07 14:38:03 UTC
I would separate out the function into two different programs.

Comment 8 Jiri Moskovcak 2009-12-07 16:55:11 UTC
I changed the python hook to not require the /etc/abrt/pyhook.conf and the daemon shouldn't try to write in /etc/abrt anymore.

Jirka

Comment 9 Fedora Update System 2009-12-08 18:49:06 UTC
abrt-1.0.1-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/abrt-1.0.1-1.fc12

Comment 10 Fedora Update System 2009-12-10 04:20:53 UTC
abrt-1.0.1-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update abrt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12994

Comment 11 Fedora Update System 2010-05-28 10:57:22 UTC
abrt-1.1.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/abrt-1.1.1-1.fc13

Comment 12 Fedora Update System 2010-05-28 18:05:36 UTC
abrt-1.1.1-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update abrt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/abrt-1.1.1-1.fc13

Comment 13 Fedora Update System 2010-06-02 18:05:18 UTC
abrt-1.1.1-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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