Bug 1277779 - SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /usr/sbin/dmsetup.
Summary: SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /usr/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:68c1251196d623635be421f4eae...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 03:39 UTC by Kazuo Moriwaka
Modified: 2016-05-10 17:57 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-128.22.fc22 selinux-policy-3.13.1-128.28.fc22
Clone Of:
Environment:
Last Closed: 2016-05-10 17:57:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kazuo Moriwaka 2015-11-04 03:39:51 UTC
Description of problem:
reproduce:

1. install  pcp-pmda-dm-3.10.7-1.fc22.x86_64 
2. cd /var/lib/pcp/pmdas/dm ; ./Install
3. systemctl start pmcd.service

Related info:

$(pcp)/src/pmdas/dm/dmthin.c calls "dmsetup status " with popen.  

Thank you,

SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /usr/sbin/dmsetup.

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

If you believe that bash should be allowed getattr access on the dmsetup 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:
# grep sh /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:pcp_pmcd_t:s0
Target Context                system_u:object_r:lvm_exec_t:s0
Target Objects                /usr/sbin/dmsetup [ file ]
Source                        sh
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.3.42-1.fc22.x86_64
Target RPM Packages           device-mapper-1.02.93-3.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-128.18.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.3-200.fc22.x86_64 #1 SMP Thu
                              Oct 8 03:23:55 UTC 2015 x86_64 x86_64
Alert Count                   297
First Seen                    2015-09-28 09:37:14 JST
Last Seen                     2015-11-04 12:25:03 JST
Local ID                      8e2ccc64-800f-4115-a4d3-07357432b0e3

Raw Audit Messages
type=AVC msg=audit(1446607503.360:2718): avc:  denied  { getattr } for  pid=18008 comm="sh" path="/usr/sbin/dmsetup" dev="dm-1" ino=82494 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:lvm_exec_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1446607503.360:2718): arch=x86_64 syscall=stat success=no exit=EACCES a0=564c3866fb80 a1=7ffd20e6e2c0 a2=7ffd20e6e2c0 a3=0 items=0 ppid=1197 pid=18008 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sh exe=/usr/bin/bash subj=system_u:system_r:pcp_pmcd_t:s0 key=(null)

Hash: sh,pcp_pmcd_t,lvm_exec_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-128.18.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.3-200.fc22.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-11-20 15:33:54 UTC
commit 32c66a72dbe29e1f6840f793f6313112dc0efbaa
Author: Lukas Vrabec <lvrabec>
Date:   Fri Nov 20 16:32:00 2015 +0100

    Allow pcp_pmcd_t domain transition to lvm_t. BZ(1277779)

Comment 2 Fedora Update System 2015-12-09 13:56:24 UTC
selinux-policy-3.13.1-128.22.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8083abc683

Comment 3 Fedora Update System 2015-12-09 23:23:00 UTC
selinux-policy-3.13.1-128.22.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update selinux-policy'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8083abc683

Comment 4 Fedora Update System 2016-01-18 13:21:01 UTC
selinux-policy-3.13.1-128.25.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-825869e1a4

Comment 5 Fedora Update System 2016-01-20 03:54:05 UTC
selinux-policy-3.13.1-128.25.fc22 has been pushed to the Fedora 22 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-2016-825869e1a4

Comment 6 Fedora Update System 2016-02-15 17:48:04 UTC
selinux-policy-3.13.1-128.27.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab

Comment 7 Fedora Update System 2016-02-17 06:26:51 UTC
selinux-policy-3.13.1-128.27.fc22 has been pushed to the Fedora 22 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-2016-ce419c9cab

Comment 8 Fedora Update System 2016-02-18 12:29:07 UTC
selinux-policy-3.13.1-128.28.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab

Comment 9 Fedora Update System 2016-02-21 18:29:43 UTC
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 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-2016-ce419c9cab

Comment 10 Fedora Update System 2016-05-10 17:56:29 UTC
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


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