lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705090007510.4299@obsidian.arastra.com>
Date:	Wed, 9 May 2007 00:19:11 -0700 (PDT)
From:	James Lingard <jchl@...stra.com>
To:	netdev@...r.kernel.org
Subject: unregister_netdevice of tap interface blocks for up to 30 secs when
 ipv6 module loaded

If the ipv6 module is loaded, then destroying a tap interface that has 
recently been disabled will cause close to block (in unregister_netdevice) 
until precisely 30 seconds have elapsed since the interface was disabled. 
This behavior does not occur if the ipv6 module is not loaded, nor if the 
tap interface is still enabled when calling close, nor if the tap 
interface has never been enabled.

If close is called less than 20 seconds after the interface has been 
disabled (so that it blocks for >10 seconds), then the following message 
is output:

   Message from syslogd@...8 at Tue May  8 19:01:04 2007 ...
   bs18 kernel: unregister_netdevice: waiting for tap0 to become free. Usage count = 3

The attached Python script reliably reproduces this problem.  The 
timestamps in the output show the 30 second delay between running 'ip link 
set tap0 down' and the subsequent call to close returning.

I have tested on two machines, both running Fedora Core 6, one with kernel 
2.6.19 and one with kernel 2.6.20, and both machines exhibit the same 
symptoms.

   $ cat /proc/version
   Linux version 2.6.19-1.2895.fc6 (brewbuilder@...0-bc2-2.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 SMP Wed Jan 10 19:28:18 EST 2007
   Linux version 2.6.20-1.2933.fc6 (brewbuilder@...0-bc2-4.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 SMP Mon Mar 19 11:38:26 EDT 2007

I have also found the same symptoms to occur on a qemu virtual machine 
(running a custom 2.6.20 kernel) with minimal user-space code running 
(just syslogd, klogd, udevd, login and bash), which suggests that this 
isn't related to any badly-behaving user-space code.

Please cc any responses to me, as I'm not on the mailing list.  Thanks.

James.
View attachment "taptest.py" of type "TEXT/PLAIN" (1196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ