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: <20130104142241.GA17526@seeking.truth.sk>
Date:	Fri, 4 Jan 2013 15:22:41 +0100
From:	Tomas Vasko <vasko@...th.sk>
To:	netdev <netdev@...r.kernel.org>
Subject: Problem with unregister_netdevice

Hi all,

after upgrade from 3.5.7 to 3.6.x I am experiencing problem with
unregistering of network devices like:


  kernel:[ 1523.380066] unregister_netdevice: waiting for XX to become free. Usage count = YY


The XX seems to be an interface used for either ipsec transport or 
ipsec tunnel and YY seems to be number of recently active ipsec peers.
Problem occurs when multiple routing tables are used.

>From bisecting on .../git/torvalds/linux-2.6.git it seems the culprit is
this commit: 81166dd6fa8eb780b2132d32fbc77eb6ac04e44e

Steps to reproduce:

see setup-81166dd.sh script bellow, on two computers (say nodeA and nodeB)
run it with swapped arguments -- 
  on nodeA run: setup-81166dd.sh eth1 A B 
  on nodeB run: setup-81166dd.sh eth1 B A

Script assumes you are using 8139cp driver for your device, please change for
any other. I've used this one for one interface in kvm while cutting my system
down for this reproduction.

Finally on node A run:  ping6 -n fc00:B::1
and on node B run:      ping6 -n fc00:A::1 -f -c 1500 ; modprobe -r 8139cp

This usually triggers the bug immediately, sometimes more pinging or more time
(up to 2 minutes) is needed to trigger it.

Problem is present also in 3.8-rc2 although there is takes longer time to
trigger. I did not hit it on single core computer.

Please let me know if there is anything I can do to help fixing the problem.

thanks,
tomas

-------------- setup-81166dd.sh --------------
#!/bin/bash

#on node A run: $0 eth2 A B
#on node B run: $0 eth2 B A

[ $# -ne 3 ] && { echo usage: $0 dev A B; exit 1; }

dev=$1
A=$2
B=$3

modprobe 8139cp
sleep 1
ip l s $dev up
ip a a fc00:$A::1/128 dev $dev

ip -6 r a fc00::/16 dev $dev  table 2
ip -6 r a fe80::/64 dev $dev  table 2

ip -6 rule  add to fc00::/16 table 2

setkey -c  << __END__
flush;
spdflush;

add fc00:$A::1 fc00:$B::1 ah 0x2$A$B -A hmac-md5 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
add fc00:$B::1 fc00:$A::1 ah 0x2$B$A -A hmac-md5 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

add fc00:$A::1 fc00:$B::1 esp 0x1$A$B -E 3des-cbc 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
add fc00:$B::1 fc00:$A::1 esp 0x1$B$A -E 3des-cbc 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

spdadd fc00:$A::1 fc00:$B::1 any -P out ipsec
              esp/transport//require
              ah/transport//require;

spdadd fc00:$B::1 fc00:$A::1 any -P in ipsec
              esp/transport//require
              ah/transport//require;

__END__

exit 0



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ