Bug 1893276

Summary: SELinux is preventing abrt-action-lis from 'write' accesses on the file /var/lib/rpm/rpmdb.sqlite-wal.
Product: [Fedora] Fedora Reporter: wizor2
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: dwalsh, grepl.miroslav, lvrabec, mmalik, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:0674250efc8619f2643c5990ae0564c0cf117b85c9fe899b024a8671e7220316;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-30 17:20:02 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 wizor2 2020-10-30 16:07:34 UTC
Description of problem:
The problem began to appear after upgrade Fedora from version 32 to 33. The issue occures after Fedora start without any other action.
SELinux is preventing abrt-action-lis from 'write' accesses on the file /var/lib/rpm/rpmdb.sqlite-wal.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow abrt-action-lis to have write access on the rpmdb.sqlite-wal file
Then you need to change the label on /var/lib/rpm/rpmdb.sqlite-wal
Do
# semanage fcontext -a -t FILE_TYPE '/var/lib/rpm/rpmdb.sqlite-wal'
where FILE_TYPE is one of the following: abrt_etc_t, abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_log_t, abrt_var_run_t, afs_cache_t, initrc_tmp_t, kdump_crash_t, mail_home_rw_t, mock_var_lib_t, postfix_postdrop_t, puppet_tmp_t, rhsmcertd_var_run_t, rpm_log_t, rpm_var_cache_t, rpm_var_run_t, sysfs_t, user_cron_spool_t, user_tmp_t, usr_t.
Then execute:
restorecon -v '/var/lib/rpm/rpmdb.sqlite-wal'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that abrt-action-lis should be allowed write access on the rpmdb.sqlite-wal 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-lis' --raw | audit2allow -M my-abrtactionlis
# semodule -X 300 -i my-abrtactionlis.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                /var/lib/rpm/rpmdb.sqlite-wal [ file ]
Source                        abrt-action-lis
Source Path                   abrt-action-lis
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            <Unknown>
Local Policy RPM              selinux-policy-targeted-3.14.6-29.fc33.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.8.16-300.fc33.x86_64 #1 SMP Mon
                              Oct 19 13:18:33 UTC 2020 x86_64 x86_64
Alert Count                   173
First Seen                    2020-10-29 19:28:03 CET
Last Seen                     2020-10-30 17:01:55 CET
Local ID                      a7e6e6a0-f94f-44f2-a02a-16f22760bc8a

Raw Audit Messages
type=AVC msg=audit(1604073715.543:446): avc:  denied  { write } for  pid=2480 comm="abrt-action-lis" name="rpmdb.sqlite-wal" dev="dm-0" ino=788748 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: abrt-action-lis,abrt_t,var_lib_t,file,write


Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.8.16-300.fc33.x86_64
type:           libreport

Potential duplicate: bug 1539605

Comment 1 Zdenek Pytela 2020-10-30 17:20:02 UTC

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