Bug 735849 - SELinux is preventing /bin/grep from 'ioctl' accesses on the unix_stream_socket unix_stream_socket.
Summary: SELinux is preventing /bin/grep from 'ioctl' accesses on the unix_stream_sock...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f60fa7d410a611b8eac3e7477c6...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-05 17:16 UTC by Mads Kiilerich
Modified: 2011-09-13 06:08 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.10.0-25.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-13 06:08:29 UTC


Attachments (Terms of Use)

Description Mads Kiilerich 2011-09-05 17:16:08 UTC
abrt version: 2.0.5
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-0.rc4.git0.0.fc16.x86_64
reason:         SELinux is preventing /bin/grep from 'ioctl' accesses on the unix_stream_socket unix_stream_socket.
time:           Mon Sep  5 19:15:57 2011

description:
:SELinux is preventing /bin/grep from 'ioctl' accesses on the unix_stream_socket unix_stream_socket.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that grep should be allowed ioctl access on the unix_stream_socket unix_stream_socket 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 grep /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:devicekit_power_t:s0-s0:c0.c1023
:Target Context                system_u:system_r:init_t:s0
:Target Objects                unix_stream_socket [ unix_stream_socket ]
:Source                        grep
:Source Path                   /bin/grep
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           grep-2.9-3.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-21.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.1.0-0.rc4.git0.0.fc16.x86_64 #1 SMP
:                              Tue Aug 30 00:00:26 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Mon 05 Sep 2011 07:14:07 PM CEST
:Last Seen                     Mon 05 Sep 2011 07:14:07 PM CEST
:Local ID                      bb796a93-e6d7-4dac-b4ab-6b1d62e1b093
:
:Raw Audit Messages
:type=AVC msg=audit(1315242847.501:64): avc:  denied  { ioctl } for  pid=1207 comm="grep" path="socket:[15651]" dev=sockfs ino=15651 scontext=system_u:system_r:devicekit_power_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=unix_stream_socket
:
:
:type=SYSCALL msg=audit(1315242847.501:64): arch=x86_64 syscall=ioctl success=no exit=ENOTTY a0=1 a1=5401 a2=7fffe70dce48 a3=190 items=0 ppid=1204 pid=1207 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=grep exe=/bin/grep subj=system_u:system_r:devicekit_power_t:s0-s0:c0.c1023 key=(null)
:
:Hash: grep,devicekit_power_t,init_t,unix_stream_socket,ioctl
:
:audit2allow
:
:#============= devicekit_power_t ==============
:allow devicekit_power_t init_t:unix_stream_socket ioctl;
:
:audit2allow -R
:
:#============= devicekit_power_t ==============
:allow devicekit_power_t init_t:unix_stream_socket ioctl;
:

Comment 1 Mads Kiilerich 2011-09-05 17:25:59 UTC
It is probably not very helpful to blame grep for this ...

Looking at the process numbers 1202 is
  /sbin/dhclient -d -4 -sf /usr/libexec/nm-dhcp-client.action
/usr/lib64/pm-utils/sleep.d/56dhclient ...

so I guess the failing grep is in 56dhclient:
  /sbin/ip link show ${DEVICE} | /bin/grep -qE "state (UP|UNKNOWN)"

Comment 2 Miroslav Grepl 2011-09-06 06:35:58 UTC
Fixed in selinux-policy-3.10.0-24.fc16

Comment 3 Fedora Update System 2011-09-08 08:05:14 UTC
selinux-policy-3.10.0-25.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-25.fc16

Comment 4 Fedora Update System 2011-09-08 20:51:32 UTC
Package selinux-policy-3.10.0-25.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-25.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-25.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-09-13 06:07:55 UTC
selinux-policy-3.10.0-25.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.