Bug 465764 - Using Auto-GSM in network manager causes kernel warning and se linux denial + messages
Summary: Using Auto-GSM in network manager causes kernel warning and se linux denial +...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-06 09:58 UTC by Callum Wilson
Modified: 2009-04-19 02:45 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-04-19 02:45:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Snippet of /var/log/messages containing kernel oops information (56.38 KB, text/plain)
2008-10-07 07:24 UTC, Callum Wilson
no flags Details

Description Callum Wilson 2008-10-06 09:58:32 UTC
Description of problem:
After recently updating (see versions below), Network Manager is not able to start an Auto-GSM network connection using a Huawei USB 3G device.  A kernel ooops message and some SELinux messages popup in KDE.  The connection is denied.  As a temporary workaround, disabling SELinux enforcing allows the connection to continue as per normal.  I've been using the Huawei E220 in this manner with Fedora 9 successfully since Fedora 9 came out.

Version-Release number of selected component (if applicable):
Oct 03 18:28:06 Installed: kernel-2.6.26.5-45.fc9.i686
Oct 04 21:17:01 Updated: selinux-policy-3.3.1-95.fc9.noarch
Oct 04 21:17:21 Updated: selinux-policy-devel-3.3.1-95.fc9.noarch
Oct 04 21:17:39 Updated: selinux-policy-targeted-3.3.1-95.fc9.noarch
Oct 04 21:18:25 Updated: 1:NetworkManager-0.7.0-0.11.svn4022.4.fc9.i386

How reproducible:
Network Manager always detects the "GSM" Huawei E220 modem and adds a Auto-GSM option in the popup menu.  Selecting Auto-GSM with SELinux switched on always causes the problem.

Steps to Reproduce:
1. plug in GSM Modem Huawei E220
2. boot up fedora 9
3. log in
4. select Auto GSM network connection in network manager
5. kernel ooops message and SELinux warning dialogs appear
  
Actual results:
running /sbin/ausearch -m avc -ts 06/10/2008 gives me:
----                                                                                                                                            
time->Mon Oct  6 08:08:57 2008                                                                                                                  
type=SYSCALL msg=audit(1223276937.440:33): arch=40000003 syscall=11 success=yes exit=0 a0=9d70c00 a1=9d63340 a2=bf8f2ec0 a3=9d70c00 items=0 ppid=2381 pid=3861 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:NetworkManager_t:s0 key=(null)                                                                                         
type=AVC msg=audit(1223276937.440:33): avc:  denied  { execute_no_trans } for  pid=3861 comm="NetworkManager" path="/usr/sbin/pppd" dev=sda7 ino=133794 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:pppd_exec_t:s0 tclass=file                                    
type=AVC msg=audit(1223276937.440:33): avc:  denied  { read } for  pid=3861 comm="NetworkManager" name="pppd" dev=sda7 ino=133794 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:pppd_exec_t:s0 tclass=file                                                          
type=AVC msg=audit(1223276937.440:33): avc:  denied  { execute } for  pid=3861 comm="NetworkManager" name="pppd" dev=sda7 ino=133794 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:pppd_exec_t:s0 tclass=file                                                       
----                                                                                                                                            
time->Mon Oct  6 08:08:57 2008                                                                                                                  
type=SYSCALL msg=audit(1223276937.541:34): arch=40000003 syscall=5 success=yes exit=4 a0=b7ef20a3 a1=0 a2=1b6 a3=0 items=0 ppid=2381 pid=3861 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:NetworkManager_t:s0 key=(null)                                                                                                          
type=AVC msg=audit(1223276937.541:34): avc:  denied  { read } for  pid=3861 comm="pppd" name="options" dev=sda7 ino=3670470 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:pppd_etc_rw_t:s0 tclass=file                                                              
----                                                                                                                                            
time->Mon Oct  6 08:08:57 2008                                                                                                                  
type=SYSCALL msg=audit(1223276937.563:35): arch=40000003 syscall=197 success=yes exit=0 a0=4 a1=bfdfd5b4 a2=306ff4 a3=b919d080 items=0 ppid=2381 pid=3861 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:NetworkManager_t:s0 key=(null)                                                                                              
type=AVC msg=audit(1223276937.563:35): avc:  denied  { getattr } for  pid=3861 comm="pppd" path="/etc/ppp/options" dev=sda7 ino=3670470 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:pppd_etc_rw_t:s0 tclass=file                                                  
----                                                                                                                                            
time->Mon Oct  6 08:08:57 2008                                                                                                                  
type=SYSCALL msg=audit(1223276937.713:36): arch=40000003 syscall=5 success=yes exit=5 a0=b7ef75c5 a1=2 a2=bfdfdb08 a3=b7f0a6c2 items=0 ppid=2381 pid=3861 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:NetworkManager_t:s0 key=(null)                                                                                              
type=AVC msg=audit(1223276937.713:36): avc:  denied  { read write } for  pid=3861 comm="pppd" name="ppp" dev=tmpfs ino=1915 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ppp_device_t:s0 tclass=chr_file                                                           
----                                                                                                                                            
time->Mon Oct  6 08:08:57 2008                                                                                                                  
type=SYSCALL msg=audit(1223276937.821:37): arch=40000003 syscall=5 success=yes exit=9 a0=b7f092c0 a1=c2 a2=1a4 a3=bfdfce8c items=0 ppid=2381 pid=3861 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:NetworkManager_t:s0 key=(null)                                                                                                  
type=AVC msg=audit(1223276937.821:37): avc:  denied  { read write } for  pid=3861 comm="pppd" name="LCK..ttyUSB0" dev=sda7 ino=6759515 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file                                                      
type=AVC msg=audit(1223276937.821:37): avc:  denied  { create } for  pid=3861 comm="pppd" name="LCK..ttyUSB0" scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file                                                                               
type=AVC msg=audit(1223276937.821:37): avc:  denied  { add_name } for  pid=3861 comm="pppd" name="LCK..ttyUSB0" scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=dir                                                                              
type=AVC msg=audit(1223276937.821:37): avc:  denied  { write } for  pid=3861 comm="pppd" name="lock" dev=sda7 ino=6758408 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=dir                                                                    
type=AVC msg=audit(1223276937.821:37): avc:  denied  { search } for  pid=3861 comm="pppd" name="lock" dev=sda7 ino=6758408 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=dir
----
time->Mon Oct  6 08:08:57 2008
type=SYSCALL msg=audit(1223276937.838:38): arch=40000003 syscall=54 success=yes exit=0 a0=a a1=40047438 a2=b7f0a2e4 a3=a items=0 ppid=2381 pid=3861 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:NetworkManager_t:s0 key=(null)
type=AVC msg=audit(1223276937.838:38): avc:  denied  { ioctl } for  pid=3861 comm="pppd" path="/dev/ppp" dev=tmpfs ino=1915 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ppp_device_t:s0 tclass=chr_file
----


I did notice this in /var/log/messages (not sure if relevent):

Oct  6 08:05:39 c4111m kernel: WARNING: at drivers/usb/serial/usb-serial.c:320 serial_write_room+0x44/0x53 [usbserial]() (Tainted: G        W)


Expected results:
The Huawei E220 3G modem, pppd and Network manager have been working well since Fedora 9 and I have been using the E220 since Fedora 7 successfully (using kppp).  It actually works pretty well.

Additional info:

Comment 1 Daniel Walsh 2008-10-06 19:07:49 UTC
Policy problem is fixed in  is fixed in selinux-policy-3.3.1-99.fc9.noarch

Reassiging kernel opps to kernel

Comment 2 Callum Wilson 2008-10-07 07:24:25 UTC
Created attachment 319621 [details]
Snippet of /var/log/messages containing kernel oops information

Hopefully this will help the kernel folks - this is a copy of /var/log/messages that contains the kernel oops.

Comment 3 Chuck Ebbert 2008-10-08 16:55:07 UTC
/driver/usb/serial/usb-serial.c:serial_write():
        /* open_count is managed under the mutex lock for the tty so cannot
           drop to zero until after the last close completes */
        WARN_ON(!port->open_count);

Comment 4 Chuck Ebbert 2008-10-08 17:44:46 UTC
Possibly some kind of tty locking bug in 2.6.26?

Comment 5 Alan Cox 2008-10-08 18:59:58 UTC
When 2.6.27 appears see if the problem goes away, there has been a lot of reworking of that code to fix various locking bugs. At this point a 2.6.26 report isn't that useful, but if its still there in 2.6.27 then it needs more investigation

Comment 6 Callum Wilson 2008-10-09 07:48:51 UTC
for users reading this; rather than disabling selinux; simply switch just the NetworkManager into selinux permissive mode:

/usr/sbin/semanage permissive -a NetworkManager_t

I'll try reproducing this bug with a 2.6.27 kernel

Comment 7 Callum Wilson 2009-01-28 09:04:24 UTC
quick note to add that Fedora 10 (2.6.27.9-159) work fine with the Huawei E220 3G modem with no problems.

thanks to all who helped.

Comment 8 TK009 2009-04-19 02:45:33 UTC
Based on the comments in this report, I am closing it. If I have done so in error please correct and advise.

TK009

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers


Note You need to log in before you can comment on or make changes to this bug.