Bug 1282179

Summary: SELinux is preventing /usr/sbin/hostapd from 'getattr' accesses on the netlink_generic_socket Unknown.
Product: [Fedora] Fedora Reporter: Thomas Köller <thomas>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: codonell, dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c681b9656930559cfd2ef51698e01b557805230a56c8042e7f2358aa47c5bd50;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-17 08:18:59 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 Thomas Köller 2015-11-15 10:21:18 UTC
Description of problem:
Happens when hostapd starts up.
SELinux is preventing /usr/sbin/hostapd from 'getattr' accesses on the netlink_generic_socket Unknown.

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

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

Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                system_u:system_r:hostapd_t:s0
Target Objects                Unknown [ netlink_generic_socket ]
Source                        hostapd
Source Path                   /usr/sbin/hostapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           hostapd-2.4-4.fc23.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-154.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.2.5-300.fc23.x86_64 #1 SMP Tue
                              Oct 27 04:29:56 UTC 2015 x86_64 x86_64
Alert Count                   33
First Seen                    2015-10-17 12:09:03 CEST
Last Seen                     2015-11-14 16:29:55 CET
Local ID                      10465415-182a-44b5-a9d6-2b03cffad409

Raw Audit Messages
type=AVC msg=audit(1447514995.968:443): avc:  denied  { getattr } for  pid=4943 comm="hostapd" scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:system_r:hostapd_t:s0 tclass=netlink_generic_socket permissive=1


type=SYSCALL msg=audit(1447514995.968:443): arch=x86_64 syscall=getsockname success=yes exit=0 a0=5 a1=7ffccc24e770 a2=7ffccc24e76c a3=0 items=0 ppid=1 pid=4943 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null)

Hash: hostapd,hostapd_t,hostapd_t,netlink_generic_socket,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-154.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.5-300.fc23.x86_64
type:           libreport

Comment 1 Carlos O'Donell 2015-11-17 08:18:59 UTC

*** This bug has been marked as a duplicate of bug 1266068 ***