Bug 957386

Summary: SELinux is preventing /usr/sbin/iw from 'create' accesses on the netlink_socket .
Product: [Fedora] Fedora Reporter: Timur Kristóf <timur.kristof>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:d36fe30152ae707fe6f7979e4b0cf1e2a8ab72c608779ab56f0b84784a5ecec8
Fixed In Version: selinux-policy-3.11.1-95.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-21 08:41:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Timur Kristóf 2013-04-27 21:13:59 UTC
Description of problem:
SELinux is preventing /usr/sbin/iw from 'create' accesses on the netlink_socket .

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

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

Additional Information:
Source Context                system_u:system_r:tuned_t:s0
Target Context                system_u:system_r:tuned_t:s0
Target Objects                 [ netlink_socket ]
Source                        iw
Source Path                   /usr/sbin/iw
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iw-3.7-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-91.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.8-202.fc18.x86_64 #1 SMP Wed
                              Apr 17 23:25:17 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-04-27 11:58:34 CEST
Last Seen                     2013-04-27 11:58:34 CEST
Local ID                      4d18d002-e573-4d77-8559-8e26f91d5868

Raw Audit Messages
type=AVC msg=audit(1367056714.913:148): avc:  denied  { create } for  pid=889 comm="iw" scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=netlink_socket


type=SYSCALL msg=audit(1367056714.913:148): arch=x86_64 syscall=socket success=no exit=EACCES a0=10 a1=3 a2=10 a3=38 items=0 ppid=876 pid=889 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=iw exe=/usr/sbin/iw subj=system_u:system_r:tuned_t:s0 key=(null)

Hash: iw,tuned_t,tuned_t,netlink_socket,create

audit2allow

#============= tuned_t ==============
allow tuned_t self:netlink_socket create;

audit2allow -R
require {
	type tuned_t;
	class netlink_socket create;
}

#============= tuned_t ==============
allow tuned_t self:netlink_socket create;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.8-202.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-04-29 07:12:42 UTC
Timur,
could you run

# semanage permissive -a tuned_t

re-test it and execute

# ausearch -m avc -ts recent

to catch all AVC msgs. Thank you.

Comment 2 Miroslav Grepl 2013-04-29 07:14:41 UTC
commit 35613e667ea7cefbb79f2650ee2ace2a2e00ccc5
Author: Miroslav Grepl <mgrepl>
Date:   Mon Apr 29 09:14:24 2013 +0200

    Back port tuned policy from F19

Comment 3 Fedora Update System 2013-05-07 21:29:36 UTC
selinux-policy-3.11.1-94.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-94.fc18

Comment 4 Fedora Update System 2013-05-09 10:12:19 UTC
Package selinux-policy-3.11.1-94.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-94.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7743/selinux-policy-3.11.1-94.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-05-17 11:01:17 UTC
selinux-policy-3.11.1-95.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-95.fc18

Comment 6 Fedora Update System 2013-05-21 08:41:08 UTC
selinux-policy-3.11.1-95.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.