Bug 915072 - SELinux is preventing /usr/sbin/lspci from 'read' accesses on the directory pci.
Summary: SELinux is preventing /usr/sbin/lspci from 'read' accesses on the directory pci.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:041ed0c66fde6e707039276541b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-24 15:44 UTC by Jared Smith
Modified: 2013-03-03 22:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-03 22:42:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jared Smith 2013-02-24 15:44:49 UTC
Description of problem:
SELinux is preventing /usr/sbin/lspci from 'read' accesses on the directory pci.

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

If you believe that lspci should be allowed read access on the pci directory 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 lspci /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                pci [ dir ]
Source                        lspci
Source Path                   /usr/sbin/lspci
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           pciutils-3.1.10-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-79.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.5-201.fc18.x86_64 #1 SMP Mon
                              Jan 28 19:54:41 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-02-24 08:44:01 MST
Last Seen                     2013-02-24 08:44:01 MST
Local ID                      6d382a5a-8d25-4a51-8e5a-2e8fedf77b58

Raw Audit Messages
type=AVC msg=audit(1361720641.294:389): avc:  denied  { read } for  pid=3986 comm="lspci" name="pci" dev="sysfs" ino=93 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir


type=SYSCALL msg=audit(1361720641.294:389): arch=x86_64 syscall=access success=no exit=EACCES a0=32ebe09203 a1=4 a2=a a3=28 items=0 ppid=3985 pid=3986 auid=0 uid=991 gid=990 euid=991 suid=991 fsuid=991 egid=990 sgid=990 fsgid=990 ses=5 tty=(none) comm=lspci exe=/usr/sbin/lspci subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)

Hash: lspci,logrotate_t,sysfs_t,dir,read

audit2allow

#============= logrotate_t ==============
allow logrotate_t sysfs_t:dir read;

audit2allow -R

#============= logrotate_t ==============
allow logrotate_t sysfs_t:dir read;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.5-201.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-02-25 14:07:25 UTC
commit 75e1b00b44b3f788aa30e16ced68a4b2efdf3b2f
Author: Miroslav Grepl <mgrepl>
Date:   Mon Feb 25 15:06:22 2013 +0100

    Allow logrotate to read /sys

Comment 2 Fedora Update System 2013-03-01 13:04:53 UTC
selinux-policy-3.11.1-82.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-82.fc18

Comment 3 Fedora Update System 2013-03-02 20:15:26 UTC
Package selinux-policy-3.11.1-82.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-82.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3309/selinux-policy-3.11.1-82.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-03-03 22:42:41 UTC
selinux-policy-3.11.1-82.fc18 has been pushed to the Fedora 18 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.