Bug 741285 - SELinux is preventing /usr/sbin/acpid from 'ioctl' accesses on the chr_file /dev/input/event10.
Summary: SELinux is preventing /usr/sbin/acpid from 'ioctl' accesses on the chr_file /...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:10f5fc7d36db180c04c425fc1df...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-09-26 13:47 UTC by James Cape
Modified: 2011-10-09 19:36 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.10.0-38.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-10-09 19:36:33 UTC

Attachments (Terms of Use)

Description James Cape 2011-09-26 13:47:46 UTC
abrt version: 2.0.5
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-0.rc6.git0.3.fc16.x86_64
reason:         SELinux is preventing /usr/sbin/acpid from 'ioctl' accesses on the chr_file /dev/input/event10.
time:           Mon Sep 26 08:47:38 2011

:SELinux is preventing /usr/sbin/acpid from 'ioctl' accesses on the chr_file /dev/input/event10.
:*****  Plugin restorecon (90.5 confidence) suggests  *************************
:If you want to fix the label. 
:/dev/input/event10 default label should be event_device_t.
:Then you can run restorecon.
:# /sbin/restorecon -v /dev/input/event10
:*****  Plugin device (9.50 confidence) suggests  *****************************
:If you want to allow acpid to have ioctl access on the event10 chr_file
:Then you need to change the label on /dev/input/event10 to a type of a similar device.
:# semanage fcontext -a -t SIMILAR_TYPE '/dev/input/event10'
:# restorecon -v '/dev/input/event10'
:*****  Plugin catchall (1.40 confidence) suggests  ***************************
:If you believe that acpid should be allowed ioctl access on the event10 chr_file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep acpid /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:apmd_t:s0
:Target Context                system_u:object_r:device_t:s0
:Target Objects                /dev/input/event10 [ chr_file ]
:Source                        acpid
:Source Path                   /usr/sbin/acpid
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           acpid-2.0.11-1.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-32.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux orwell.ignore-your.tv
:                              3.1.0-0.rc6.git0.3.fc16.x86_64 #1 SMP Fri Sep 16
:                              12:26:22 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Mon 26 Sep 2011 08:47:18 AM CDT
:Last Seen                     Mon 26 Sep 2011 08:47:18 AM CDT
:Local ID                      12bb2ce6-0721-414a-b86f-544497cbd14c
:Raw Audit Messages
:type=AVC msg=audit(1317044838.510:64): avc:  denied  { ioctl } for  pid=1161 comm="acpid" path="/dev/input/event10" dev=devtmpfs ino=24923 scontext=system_u:system_r:apmd_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=chr_file
:type=SYSCALL msg=audit(1317044838.510:64): arch=x86_64 syscall=ioctl success=yes exit=ENOEXEC a0=d a1=80604520 a2=7fffa5e26e20 a3=f4 items=0 ppid=1 pid=1161 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=acpid exe=/usr/sbin/acpid subj=system_u:system_r:apmd_t:s0 key=(null)
:Hash: acpid,apmd_t,device_t,chr_file,ioctl
:#============= apmd_t ==============
:allow apmd_t device_t:chr_file ioctl;
:audit2allow -R
:#============= apmd_t ==============
:allow apmd_t device_t:chr_file ioctl;

Comment 1 Daniel Walsh 2011-09-26 18:15:15 UTC
Strange that you would this.  I added 10 more automatic labels.  This is caused by a race condition in the kernel. We will now label the first 20 devices correctly on creation.

Fixed in selinux-policy-3.10.0-35.fc17

Comment 2 Fedora Update System 2011-10-04 11:17:31 UTC
selinux-policy-3.10.0-36.fc16 has been submitted as an update for Fedora 16.

Comment 3 Fedora Update System 2011-10-04 20:50:22 UTC
Package selinux-policy-3.10.0-36.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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-36.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-10-09 19:36:33 UTC
selinux-policy-3.10.0-38.fc16 has been pushed to the Fedora 16 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.