Bug 967644

Summary: SELinux is preventing /usr/bin/bash from 'read' accesses on the directory /sys/fs/pstore.
Product: [Fedora] Fedora Reporter: Moez Roy <moez.roy>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: abrt-devel-list, dominick.grift, dvlasenk, dwalsh, iprikryl, jfilak, jmoskovc, mgrepl, mmilata, mtoman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:e34a835a44f5f5b833d429aca0ca9daed24e517f9e75bbba4af66d46d001a412
Fixed In Version: gnome-abrt-0.3.1-1.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-15 00:54:42 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 Moez Roy 2013-05-27 18:44:54 UTC
Description of problem:
SELinux is preventing /usr/bin/bash from 'read' accesses on the directory /sys/fs/pstore.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/sys/fs/pstore default label should be sysfs_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /sys/fs/pstore

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that bash should be allowed read access on the pstore directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep abrt-harvest-ue /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:initrc_t:s0
Target Context                system_u:object_r:pstorefs_t:s0
Target Objects                /sys/fs/pstore [ dir ]
Source                        abrt-harvest-ue
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.45-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-44.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-300.fc19.x86_64 #1 SMP Fri
                              May 24 22:17:06 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-05-27 14:43:06 EDT
Last Seen                     2013-05-27 14:43:06 EDT
Local ID                      ae138292-7751-45f3-8092-3bd3c3c8e357

Raw Audit Messages
type=AVC msg=audit(1369680186.335:29): avc:  denied  { read } for  pid=321 comm="abrt-harvest-ue" name="/" dev="pstore" ino=7239 scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:object_r:pstorefs_t:s0 tclass=dir


type=SYSCALL msg=audit(1369680186.335:29): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=4a7ef7 a2=90800 a3=0 items=0 ppid=1 pid=321 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=abrt-harvest-ue exe=/usr/bin/bash subj=system_u:system_r:initrc_t:s0 key=(null)

Hash: abrt-harvest-ue,initrc_t,pstorefs_t,dir,read

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-300.fc19.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-05-29 10:04:38 UTC
What does

# ps -efZ |grep initrc

Comment 2 Moez Roy 2013-05-30 00:44:03 UTC
[user@localhost ~]$ ps -efZ |grep initrc
system_u:system_r:initrc_t:s0   root       467     1  0 20:39 ?        00:00:00 /usr/sbin/VBoxService
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 user 2145 2117  0 20:42 pts/0 00:00:00 grep --color=auto initrc
[user@localhost ~]$

Comment 3 Daniel Walsh 2013-06-04 20:32:48 UTC
 ls -lZ /usr/sbin/abrt-harvest-*
-rwxr-xr-x. root root system_u:object_r:abrt_exec_t:s0 /usr/sbin/abrt-harvest-uefioops
-rwxr-xr-x. root root system_u:object_r:abrt_exec_t:s0 /usr/sbin/abrt-harvest-vmcore


Fixed in selinux-policy-3.12.1-48.fc19.noarch

Comment 4 Fedora Update System 2013-09-13 13:09:46 UTC
gnome-abrt-0.3.1-1.fc19,abrt-2.1.7-1.fc19,libreport-2.1.7-1.fc19,satyr-0.9-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/gnome-abrt-0.3.1-1.fc19,abrt-2.1.7-1.fc19,libreport-2.1.7-1.fc19,satyr-0.9-1.fc19

Comment 5 Fedora Update System 2013-09-14 02:39:40 UTC
Package gnome-abrt-0.3.1-1.fc19, abrt-2.1.7-1.fc19, libreport-2.1.7-1.fc19, satyr-0.9-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gnome-abrt-0.3.1-1.fc19 abrt-2.1.7-1.fc19 libreport-2.1.7-1.fc19 satyr-0.9-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-16707/gnome-abrt-0.3.1-1.fc19,abrt-2.1.7-1.fc19,libreport-2.1.7-1.fc19,satyr-0.9-1.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-09-15 00:54:42 UTC
gnome-abrt-0.3.1-1.fc19, abrt-2.1.7-1.fc19, libreport-2.1.7-1.fc19, satyr-0.9-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.