Bug 695962

Summary: SELinux is preventing /usr/sbin/wpa_supplicant from using the sys_module capability
Product: [Fedora] Fedora Reporter: smysorekar
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: fedora, gansalmon, itamar, jason.michael.nielsen, jonathan, kernel-maint, madhu.chinakonda, rdassen, sjoerd, thib
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-16 12:00: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:

Description smysorekar 2011-04-13 00:01:17 UTC
Description of problem:
Get SELinux Alert after waking up laptop from suspend mode that "the source process: /usr/sbin/wpa_supplicant" attempted this access: sys_module 


Version-Release number of selected component (if applicable): Fedora 14


How reproducible: Wake up laptop from suspend mode.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
New Note 5

SELinux is preventing /usr/sbin/wpa_supplicant from using the sys_module capability.

*****  Plugin sys_module (99.5 confidence) suggests  *************************

If you do not believe that /usr/sbin/wpa_supplicant should be attempting to modify the kernel by loading a kernel module.
Then a process might be attempting to hack into your system.
Do
contact your security administrator and report this issue.

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that wpa_supplicant should have the sys_module capability 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 wpa_supplicant /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0-s0:c0.c1023
Target Context                system_u:system_r:NetworkManager_t:s0-s0:c0.c1023
Target Objects                Unknown [ capability ]
Source                        wpa_supplicant
Source Path                   /usr/sbin/wpa_supplicant
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           wpa_supplicant-0.6.8-10.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-37.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.12-88.fc14.x86_64 #1
                              SMP Thu Mar 31 21:21:57 UTC 2011 x86_64 x86_64
Alert Count                   5
First Seen                    Mon 11 Apr 2011 08:20:36 PM EDT
Last Seen                     Tue 12 Apr 2011 07:40:10 PM EDT
Local ID                      fd00b79a-cb06-45cd-9acc-e458fbbd88af

Raw Audit Messages
type=AVC msg=audit(1302651610.727:32): avc:  denied  { sys_module } for  pid=1406 comm="wpa_supplicant" capability=16  scontext=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 tcontext=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 tclass=capability


type=SYSCALL msg=audit(1302651610.727:32): arch=x86_64 syscall=ioctl success=no exit=ENODEV a0=8 a1=8933 a2=7fff7ec0c8b0 a3=b3f1ebb1950f99a8 items=0 ppid=1 pid=1406 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=wpa_supplicant exe=/usr/sbin/wpa_supplicant subj=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 key=(null)

Hash: wpa_supplicant,NetworkManager_t,NetworkManager_t,capability,sys_module

audit2allow

#============= NetworkManager_t ==============
allow NetworkManager_t self:capability sys_module;

audit2allow -R

#============= NetworkManager_t ==============
allow NetworkManager_t self:capability sys_module;

Comment 1 Sjoerd Mullender 2011-04-13 06:40:26 UTC
I saw the exact same thing.

Comment 2 Jason M. Nielsen 2011-04-15 18:29:55 UTC
Same behaviour. Dell Latitude D830. Used the suggestion in the troubleshooter and it worked. 
grep wpa_supplicant /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp

Comment 3 Chris Smart 2011-04-16 12:00:59 UTC

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