Bug 1066090 - SELinux is preventing /usr/bin/lscpu from 'read' accesses on the chr_file mem.
Summary: SELinux is preventing /usr/bin/lscpu from 'read' accesses on the chr_file mem.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:14bce57ba9904e2e4a39932ae21...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-17 16:33 UTC by Peter Schiffer
Modified: 2014-03-12 12:19 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-127.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-12 12:19:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Schiffer 2014-02-17 16:33:01 UTC
Description of problem:
OpenLMI HW provider needs access to the lscpu program.
Also, /usr/libexec/pegasus/cmpiLMI_Hardware-cimprovagt is still incorrectly labeled, it should have the pegasus_openlmi_hardware_exec_t context:

$ ll -Z /usr/libexec/pegasus/cmpiLMI_Hardware-cimprovagt 
-rwxr-xr-x. root root system_u:object_r:pegasus_openlmi_storage_exec_t:s0 /usr/libexec/pegasus/cmpiLMI_Hardware-cimprovagt
SELinux is preventing /usr/bin/lscpu from 'read' accesses on the chr_file mem.

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

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

Additional Information:
Source Context                system_u:system_r:pegasus_openlmi_storage_t:s0
Target Context                system_u:object_r:memory_device_t:s0
Target Objects                mem [ chr_file ]
Source                        lscpu
Source Path                   /usr/bin/lscpu
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-2.24.1-1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-124.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.12.10-300.fc20.x86_64 #1 SMP Thu
                              Feb 6 22:11:48 UTC 2014 x86_64 x86_64
Alert Count                   60
First Seen                    2014-01-28 17:03:35 CET
Last Seen                     2014-02-17 17:24:57 CET
Local ID                      26e1a4ff-c252-4cdf-a2f3-44b6a5ed8d27

Raw Audit Messages
type=AVC msg=audit(1392654297.955:891): avc:  denied  { read } for  pid=18685 comm="lscpu" name="mem" dev="devtmpfs" ino=1027 scontext=system_u:system_r:pegasus_openlmi_storage_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file


type=AVC msg=audit(1392654297.955:891): avc:  denied  { open } for  pid=18685 comm="lscpu" path="/dev/mem" dev="devtmpfs" ino=1027 scontext=system_u:system_r:pegasus_openlmi_storage_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1392654297.955:891): arch=x86_64 syscall=open success=yes exit=ENXIO a0=40b944 a1=0 a2=347e1b87b8 a3=3 items=0 ppid=18677 pid=18685 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=lscpu exe=/usr/bin/lscpu subj=system_u:system_r:pegasus_openlmi_storage_t:s0 key=(null)

Hash: lscpu,pegasus_openlmi_storage_t,memory_device_t,chr_file,read

Additional info:
reporter:       libreport-2.1.12
hashmarkername: setroubleshoot
kernel:         3.12.10-300.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-02-18 13:17:21 UTC
commit 1e81111b90360514142705278fd33ccb852a110a
Author: Miroslav Grepl <mgrepl>
Date:   Tue Feb 18 14:16:42 2014 +0100

    Allow lscpu running in pegasus_openlmi_storage_t to read /dev/mem

Comment 2 Fedora Update System 2014-02-18 22:10:33 UTC
selinux-policy-3.12.1-126.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-126.fc20

Comment 3 Fedora Update System 2014-02-22 00:42:46 UTC
Package selinux-policy-3.12.1-126.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-126.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2801/selinux-policy-3.12.1-126.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-02-26 13:51:01 UTC
Package selinux-policy-3.12.1-127.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-127.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2801/selinux-policy-3.12.1-127.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-03-12 12:19:37 UTC
selinux-policy-3.12.1-127.fc20 has been pushed to the Fedora 20 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.