Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1495817 - SELinux is preventing setroubleshootd from read access on the file /var/lib/rpm/Packages.
Summary: SELinux is preventing setroubleshootd from read access on the file /var/lib/r...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 26
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1491610 1491858 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-26 12:05 UTC by Joel Uckelman
Modified: 2018-05-29 12:46 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 12:46:07 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1513720 None None None Never

Internal Links: 1513720

Description Joel Uckelman 2017-09-26 12:05:45 UTC
Description of problem:

SELinux is preventing setroubleshootd from read access on the file /var/lib/rpm/Packages.

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

If you believe that setroubleshootd 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 'setroubleshootd' --raw | audit2allow -M my-setroubleshootd
# semodule -X 300 -i my-setroubleshootd.pp


Additional Information:
Source Context                system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:var_lib_t:s0
Target Objects                /var/lib/rpm/Packages [ file ]
Source                        setroubleshootd
Source Path                   setroubleshootd
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           
Target RPM Packages           rpm-4.13.0.1-7.fc26.x86_64
Policy RPM                    selinux-policy-3.13.1-260.8.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     clio
Platform                      Linux clio 4.12.13-300.fc26.x86_64 #1 SMP Thu Sep
                              14 16:00:38 UTC 2017 x86_64 x86_64
Alert Count                   4963
First Seen                    2017-08-29 22:29:04 BST
Last Seen                     2017-09-21 12:29:19 BST
Local ID                      10104709-4a56-4d8f-8f3e-f909cf624842

Raw Audit Messages
type=AVC msg=audit(1505993359.869:252): avc:  denied  { read } for  pid=16497 comm="rpm" name="Packages" dev="dm-1" ino=230310148 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: setroubleshootd,setroubleshootd_t,var_lib_t,file,read

Comment 1 Lukas Vrabec 2017-09-27 10:51:06 UTC
Hi, 

Your system is mislabeled. 

$ matchpathcon /var/lib/rpm/Packages
/var/lib/rpm/Packages	system_u:object_r:rpm_var_lib_t:s0

Please use:
# restorecon -Rv /var/lib/rpm/ 

To fix your issue.

Comment 2 Joel Uckelman 2017-09-27 12:18:58 UTC
Observe:

[root@clio ~]# restorecon -Rv /var/lib/rpm/
[root@clio ~]# 

restorecon didn't relabel anything, which suggests that my system is _not_ mislabeled.

Reopening.

Comment 3 Lukas Vrabec 2017-09-27 12:23:47 UTC
Are you able to reproduce it?

Comment 4 Joel Uckelman 2017-09-28 14:03:24 UTC
I've looked into this a bit more now. 

The same SELinux denial happens repeatedly on four different F26 systems I admin. On the first system, I'd forgotten that I ran restorecon between when the most recent denial happened and when I discovered that the denial had happened. On the others, I found that many files in /var/lib/rpm were mislabeled---and the denial has recurred since the relabeling, which indicates that something is mislabeling these files, but I don't know what's doing that.

Comment 5 Panu Matilainen 2018-02-07 09:19:22 UTC
*** Bug 1491858 has been marked as a duplicate of this bug. ***

Comment 6 Panu Matilainen 2018-02-07 09:19:28 UTC
*** Bug 1491610 has been marked as a duplicate of this bug. ***

Comment 7 Fedora End Of Life 2018-05-03 08:29:40 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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 8 Fedora End Of Life 2018-05-29 12:46:07 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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.