Bug 1261309 - SELinux is preventing /usr/bin/abrt-action-save-package-data from 'write' accesses on the file /var/lib/rpm/.dbenv.lock.
SELinux is preventing /usr/bin/abrt-action-save-package-data from 'write' acc...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Miroslav Grepl
BaseOS QE Security Team
: 1261311 1261317 1261320 1261364 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2015-09-09 03:34 EDT by Jakub Filak
Modified: 2016-11-30 19:50 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-18 05:48:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jakub Filak 2015-09-09 03:34:08 EDT
Description of problem:
will_segfault shipped in will-crash package from EPEL7 crashed with SEGFAULT. ABRT tried to get the package information from rpm database.
SELinux is preventing /usr/bin/abrt-action-save-package-data from 'write' accesses on the file /var/lib/rpm/.dbenv.lock.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that abrt-action-save-package-data should be allowed write access on the .dbenv.lock file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep abrt-action-sav /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:etc_runtime_t:s0
Target Objects                /var/lib/rpm/.dbenv.lock [ file ]
Source                        abrt-action-sav
Source Path                   /usr/bin/abrt-action-save-package-data
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.5-31.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-46.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-314.el7.x86_64 #1 SMP Thu
                              Sep 3 21:58:32 EDT 2015 x86_64 x86_64
Alert Count                   27
First Seen                    2015-09-08 13:54:38 CEST
Last Seen                     2015-09-09 09:17:51 CEST
Local ID                      10f1d3b1-f7c5-4a42-add7-92e7422d8559

Raw Audit Messages
type=AVC msg=audit(1441783071.77:417): avc:  denied  { write } for  pid=3902 comm="abrt-action-lis" name=".dbenv.lock" dev="dm-0" ino=136 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file

type=SYSCALL msg=audit(1441783071.77:417): arch=x86_64 syscall=open success=no exit=EACCES a0=1708630 a1=42 a2=1a4 a3=3 items=0 ppid=3886 pid=3902 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=abrt-action-lis exe=/usr/bin/python2.7 subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Hash: abrt-action-sav,abrt_t,etc_runtime_t,file,write

Version-Release number of selected component:

Additional info:
reporter:       libreport-
hashmarkername: setroubleshoot
kernel:         3.10.0-314.el7.x86_64
type:           libreport
uid:            0
Comment 2 Milos Malik 2015-09-09 04:40:25 EDT
*** Bug 1261311 has been marked as a duplicate of this bug. ***
Comment 3 Milos Malik 2015-09-09 04:40:50 EDT
*** Bug 1261317 has been marked as a duplicate of this bug. ***
Comment 4 Milos Malik 2015-09-09 04:41:07 EDT
*** Bug 1261364 has been marked as a duplicate of this bug. ***
Comment 5 Milos Malik 2015-09-09 04:41:28 EDT
*** Bug 1261320 has been marked as a duplicate of this bug. ***
Comment 7 Milos Malik 2015-09-09 05:13:24 EDT
Does following command help?

# restorecon -Rv /var/lib/rpm

The lock file should not be labeled etc_runtime_t:

# matchpathcon /var/lib/rpm/.dbenv.lock
/var/lib/rpm/.dbenv.lock	system_u:object_r:rpm_var_lib_t:s0
Comment 8 Miroslav Grepl 2015-09-10 11:10:06 EDT
Yes, how did you get it? Is this a fresh install? Or did you update?

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