Bug 1389836 - SELinux is preventing abrt-action-sav from 'write' accesses on the file /var/lib/rpm/Sha1header.
Summary: SELinux is preventing abrt-action-sav from 'write' accesses on the file /var/...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:53b69c22b90dfec56a10860d72a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-28 19:57 UTC by mrummuka
Modified: 2017-08-08 19:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 19:02:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description mrummuka 2016-10-28 19:57:32 UTC
Description of problem:
SELinux is preventing abrt-action-sav from 'write' accesses on the file /var/lib/rpm/Sha1header.

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/var/lib/rpm/Sha1header default label should be rpm_var_lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/lib/rpm/Sha1header

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow abrt-action-sav to have write access on the Sha1header file
Then you need to change the label on /var/lib/rpm/Sha1header
Do
# semanage fcontext -a -t FILE_TYPE '/var/lib/rpm/Sha1header'
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, mock_var_lib_t, postfix_postdrop_t, puppet_tmp_t, rpm_log_t, rpm_var_cache_t, rpm_var_run_t, sysfs_t, user_cron_spool_t, user_tmp_t.
Then execute:
restorecon -v '/var/lib/rpm/Sha1header'


*****  Plugin catchall (1.44 confidence) suggests   **************************

If you believe that abrt-action-sav should be allowed write access on the Sha1header 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                unconfined_u:object_r:var_lib_t:s0
Target Objects                /var/lib/rpm/Sha1header [ file ]
Source                        abrt-action-sav
Source Path                   abrt-action-sav
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           rpm-4.13.0-0.rc1.27.fc24.x86_64
Policy RPM                    selinux-policy-3.13.1-191.19.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.7.9-200.fc24.x86_64 #1 SMP Thu
                              Oct 20 14:26:16 UTC 2016 x86_64 x86_64
Alert Count                   3
First Seen                    2016-08-23 21:14:42 EEST
Last Seen                     2016-10-28 20:30:21 EEST
Local ID                      86ee0c8c-52f2-4b38-b1e5-30a0340c8580

Raw Audit Messages
type=AVC msg=audit(1477675821.796:341): avc:  denied  { write } for  pid=5914 comm="abrt-action-sav" name="Sha1header" dev="dm-1" ino=2894869 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file permissive=1


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

Version-Release number of selected component:
selinux-policy-3.13.1-191.19.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.7.9-200.fc24.x86_64
type:           libreport

Potential duplicate: bug 1209244

Comment 1 Lukas Slebodnik 2017-07-04 07:26:04 UTC
target context var_lib_t instead of rpm_var_lib_t

I would say it is a duplicate of BZ1461313.

Workaround is to restore SELinux context after rebuilding rpm db.
https://bugzilla.redhat.com/show_bug.cgi?id=1461313#c1

Comment 2 Fedora End Of Life 2017-07-25 23:39:31 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2017-08-08 19:02:35 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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