Bug 1459097 - SELinux is preventing reader#2 from 'getattr' accesses on the file /etc/lvm/lvm.conf.
SELinux is preventing reader#2 from 'getattr' accesses on the file /etc/lvm/l...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
25
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:d4132f9d9bd319c2355b654f4fa...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-06 05:39 EDT by Kevin Cousin
Modified: 2017-07-01 10:30 EDT (History)
8 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-225.18.fc25
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-14 03:22:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kevin Cousin 2017-06-06 05:39:33 EDT
Description of problem:
I install collectd on my laptop an add LVM plugin. So collectd should be authorized to access to lvm.conf file.
SELinux is preventing reader#2 from 'getattr' accesses on the file /etc/lvm/lvm.conf.

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

If vous pensez que reader#2 devrait être autorisé à accéder getattr sur lvm.conf file par défaut.
Then vous devriez rapporter ceci en tant qu'anomalie.
Vous pouvez générer un module de stratégie local pour autoriser cet accès.
Do
allow this access for now by executing:
# ausearch -c 'reader#2' --raw | audit2allow -M my-reader2
# semodule -X 300 -i my-reader2.pp

Additional Information:
Source Context                system_u:system_r:collectd_t:s0
Target Context                system_u:object_r:lvm_etc_t:s0
Target Objects                /etc/lvm/lvm.conf [ file ]
Source                        reader#2
Source Path                   reader#2
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           lvm2-2.02.167-3.fc25.x86_64
Policy RPM                    selinux-policy-3.13.1-225.16.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.3-200.fc25.x86_64 #1 SMP Thu
                              May 25 19:03:07 UTC 2017 x86_64 x86_64
Alert Count                   17
First Seen                    2017-06-05 15:46:37 CEST
Last Seen                     2017-06-06 10:27:31 CEST
Local ID                      11024569-d848-41ff-a9ef-38e9b0b62885

Raw Audit Messages
type=AVC msg=audit(1496737651.837:303): avc:  denied  { getattr } for  pid=2113 comm="reader#4" path="/etc/lvm/lvm.conf" dev="dm-3" ino=1577315 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:lvm_etc_t:s0 tclass=file permissive=0


Hash: reader#2,collectd_t,lvm_etc_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-225.16.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.11.3-200.fc25.x86_64
type:           libreport
Comment 1 Fedora Update System 2017-06-08 07:28:51 EDT
selinux-policy-3.13.1-225.18.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-45ca9bfcb6
Comment 2 Fedora Update System 2017-06-09 09:39:48 EDT
selinux-policy-3.13.1-225.18.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-45ca9bfcb6
Comment 3 Fedora Update System 2017-06-14 03:22:29 EDT
selinux-policy-3.13.1-225.18.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 4 Evan Tepsic 2017-07-01 10:26:34 EDT
Noting issue seems to persist with selinux-policy-3.13.1-225.18.fc25:

[root@localhost ~]# cat /etc/redhat-release
Fedora release 25 (Twenty Five)

[root@localhost ~]# rpm -qa | grep 'selinux-policy-targeted\|collectd-5'
selinux-policy-targeted-3.13.1-225.18.fc25.noarch
collectd-5.7.2-1.fc25.x86_64

Jul 01 10:23:24 localhost setroubleshoot[8878]: SELinux is preventing reader#3 from getattr access on the file /run/udev/data/b8:51. For complete SELinux messages run: sealert -l edcc47b8-ea4d-49c4-a49a-82fb52132c9c
Jul 01 10:23:24 localhost python3[8878]: SELinux is preventing reader#3 from getattr access on the file /run/udev/data/b8:51.
                                        
                                        *****  Plugin catchall (100. confidence) suggests   **************************
                                        
                                        If you believe that reader#3 should be allowed getattr access on the b8:51 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 'reader#3' --raw | audit2allow -M my-reader3
                                        # semodule -X 300 -i my-reader3.pp
Comment 5 Evan Tepsic 2017-07-01 10:30:45 EDT
(In reply to Evan Tepsic from comment #4)

Apparently different though as this seems to be /run/udev/data/b8:51

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