Bug 1540820

Summary: SELinux is preventing sealert from 'getattr' accesses on the file /var/lib/rpm/Name.
Product: [Fedora] Fedora Reporter: Garrett Figueroa <garrett.figueroa>
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: dimapunk80, dwalsh, lvrabec, mgrepl, plautrba, pmatilai, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:68ecb1e9e17b394e10a77c22de4e0da1bde17338858ea0795893c6dcd19280fc;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:46 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 Garrett Figueroa 2018-02-01 05:26:56 UTC
Description of problem:
SELinux is preventing sealert from 'getattr' accesses on the file /var/lib/rpm/Name.

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

If you want to fix the label. 
/var/lib/rpm/Name 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/Name

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

If you believe that sealert should be allowed getattr access on the Name 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 'sealert' --raw | audit2allow -M my-sealert
# semodule -X 300 -i my-sealert.pp

Additional Information:
Source Context                system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.
                              c1023
Target Context                unconfined_u:object_r:var_lib_t:s0
Target Objects                /var/lib/rpm/Name [ file ]
Source                        sealert
Source Path                   sealert
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           rpm-4.14.0-2.fc27.x86_64
Policy RPM                    <Unknown>
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                   6
First Seen                    2018-01-31 22:25:47 MST
Last Seen                     2018-01-31 22:25:54 MST
Local ID                      fff63b7d-2d13-4054-b2fb-79c8ec90f48e

Raw Audit Messages
type=AVC msg=audit(1517462754.988:10494): avc:  denied  { getattr } for  pid=30852 comm="sealert" path="/var/lib/rpm/Name" dev="dm-0" ino=1087338 scontext=system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: sealert,setroubleshoot_fixit_t,var_lib_t,file,getattr


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 1401370

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

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

Comment 2 Lukas Vrabec 2018-10-12 14:47:53 UTC
*** Bug 1578066 has been marked as a duplicate of this bug. ***