Bug 1542776

Summary: SELinux is preventing abrt-action-sav from 'read' accesses on the file /var/lib/rpm/Packages.
Product: [Fedora] Fedora Reporter: Peter <peter>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmatilai, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:fb97cbce54b0151ab5954e4f6eac80b2a5582393a95a19f952ebcbf2f3f4a5f1;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-07 09:15:54 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 Peter 2018-02-07 00:44:14 UTC
Description of problem:
SELinux is preventing abrt-action-sav from 'read' accesses on the file /var/lib/rpm/Packages.

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

If you want to fix the label. 
/var/lib/rpm/Packages default label should be rpm_var_lib_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/lib/rpm/Packages

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

If you believe that abrt-action-sav should be allowed read access on the Packages file 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:
# ausearch -c 'abrt-action-sav' --raw | audit2allow -M my-abrtactionsav
# semodule -X 300 -i my-abrtactionsav.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /var/lib/rpm/Packages [ file ]
Source                        abrt-action-sav
Source Path                   abrt-action-sav
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           rpm-4.14.0-2.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.21.fc27.noarch selinux-
                              policy-3.13.1-283.24.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.14-300.fc27.x86_64 #1 SMP Fri
                              Jan 19 13:19:54 UTC 2018 x86_64 x86_64
Alert Count                   5
First Seen                    2018-02-06 16:31:22 PST
Last Seen                     2018-02-06 16:31:22 PST
Local ID                      c48b8811-4fdd-4084-a21a-f8b0db229a70

Raw Audit Messages
type=AVC msg=audit(1517963482.805:301): avc:  denied  { read } for  pid=3629 comm="abrt-action-lis" name="Packages" dev="dm-1" ino=153456 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0


Hash: abrt-action-sav,abrt_t,unlabeled_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-283.21.fc27.noarch
selinux-policy-3.13.1-283.24.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.14-300.fc27.x86_64
type:           libreport

Potential duplicate: bug 1466754

Comment 1 Panu Matilainen 2018-02-07 09:15:54 UTC

*** This bug has been marked as a duplicate of bug 1513720 ***