Bug 1061487 - SELinux is preventing /usr/sbin/iftop from 'create' accesses on the packet_socket .
Summary: SELinux is preventing /usr/sbin/iftop from 'create' accesses on the packet_so...
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:e01757021949ee507577133a1b7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-04 22:35 UTC by Garrett Holmstrom
Modified: 2014-03-12 12:18 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:18:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Garrett Holmstrom 2014-02-04 22:35:23 UTC
Description of problem:
I ran into this problem with ``sudo iftop'' as a user running as staff_t, as well as ``iftop'' after switching to sysadm_t wish ``sudo -s''.  
SELinux is preventing /usr/sbin/iftop from 'create' accesses on the packet_socket .

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

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

Additional Information:
Source Context                staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023
Target Context                staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023
Target Objects                 [ packet_socket ]
Source                        iftop
Source Path                   /usr/sbin/iftop
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iftop-1.0-0.7.pre4.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-119.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.8-300.fc20.x86_64 #1 SMP Thu
                              Jan 16 01:07:50 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-02-04 14:32:22 PST
Last Seen                     2014-02-04 14:32:30 PST
Local ID                      b67450df-a40f-475d-b9f8-cd122d4c32ee

Raw Audit Messages
type=AVC msg=audit(1391553150.85:761): avc:  denied  { create } for  pid=35273 comm="iftop" scontext=staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tclass=packet_socket


type=SYSCALL msg=audit(1391553150.85:761): arch=x86_64 syscall=socket success=no exit=EACCES a0=11 a1=3 a2=300 a3=0 items=0 ppid=35237 pid=35273 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1 tty=pts4 comm=iftop exe=/usr/sbin/iftop subj=staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 key=(null)

Hash: iftop,sysadm_t,sysadm_t,packet_socket,create

Additional info:
reporter:       libreport-2.1.11
hashmarkername: setroubleshoot
kernel:         3.12.8-300.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-02-14 19:13:27 UTC
8a5915736d281439adfa5457871172f00cbd03ed fixes this in git.

Comment 2 Lukas Vrabec 2014-02-15 23:16:23 UTC
back ported.

Comment 3 Fedora Update System 2014-02-18 22:09:41 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 4 Fedora Update System 2014-02-22 00:41:56 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 5 Fedora Update System 2014-02-26 13:49:49 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 6 Fedora Update System 2014-03-12 12:18:06 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.