Bug 890744 - SELinux is preventing /usr/bin/python2.7 from 'read' accesses on the chr_file mem.
Summary: SELinux is preventing /usr/bin/python2.7 from 'read' accesses on the chr_file...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e7aaa616dc675c3090c70b84c70...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-29 14:16 UTC by Lanny Bland
Modified: 2013-01-07 03:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-07 03:58:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lanny Bland 2012-12-29 14:16:25 UTC
Description of problem:
SELinux is preventing /usr/bin/python2.7 from 'read' accesses on the chr_file mem.

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

If you believe that python2.7 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 rhsmcertd-worke /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:object_r:memory_device_t:s0
Target Objects                mem [ chr_file ]
Source                        rhsmcertd-worke
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.3-7.2.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-165.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.6.11-1.fc17.x86_64 #1 SMP Mon
                              Dec 17 22:16:35 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2012-12-29 07:53:15 CST
Last Seen                     2012-12-29 07:53:15 CST
Local ID                      aa71464e-b168-40e5-9fe2-ed5cf6719052

Raw Audit Messages
type=AVC msg=audit(1356789195.555:67): avc:  denied  { read } for  pid=1777 comm="rhsmcertd-worke" name="mem" dev="devtmpfs" ino=1030 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file


type=AVC msg=audit(1356789195.555:67): avc:  denied  { open } for  pid=1777 comm="rhsmcertd-worke" path="/dev/mem" dev="devtmpfs" ino=1030 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file


type=AVC msg=audit(1356789195.555:67): avc:  denied  { sys_rawio } for  pid=1777 comm="rhsmcertd-worke" capability=17  scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=capability


type=SYSCALL msg=audit(1356789195.555:67): arch=x86_64 syscall=open success=yes exit=E2BIG a0=7f6832a9b560 a1=0 a2=10000 a3=238 items=0 ppid=811 pid=1777 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rhsmcertd-worke exe=/usr/bin/python2.7 subj=system_u:system_r:rhsmcertd_t:s0 key=(null)

Hash: rhsmcertd-worke,rhsmcertd_t,memory_device_t,chr_file,read

audit2allow

#============= rhsmcertd_t ==============
allow rhsmcertd_t memory_device_t:chr_file { read open };
allow rhsmcertd_t self:capability sys_rawio;

audit2allow -R

#============= rhsmcertd_t ==============
allow rhsmcertd_t memory_device_t:chr_file { read open };
allow rhsmcertd_t self:capability sys_rawio;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.11-1.fc17.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-01-02 11:41:48 UTC
Added to F17,

commit d2ea57bcf163ec22839cd3ed56bbcbe47a6f42a4
Author: Miroslav Grepl <mgrepl>
Date:   Wed Jan 2 12:40:14 2013 +0100

    Back rhsmcertd policy from F18

Comment 2 Fedora Update System 2013-01-03 13:06:51 UTC
selinux-policy-3.10.0-166.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17

Comment 3 Fedora Update System 2013-01-05 06:39:03 UTC
Package selinux-policy-3.10.0-166.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-166.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-01-07 03:58:53 UTC
selinux-policy-3.10.0-166.fc17 has been pushed to the Fedora 17 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.