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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHA+R7MB4Pf=eF-7=3gGH-j1mmJLtrjxFqv0bBXF1BBd1D=kuQ@mail.gmail.com>
Date:	Mon, 6 Jan 2014 11:11:45 -0800
From:	Cong Wang <cwang@...pensource.com>
To:	Scott Feldman <sfeldma@...ulusnetworks.com>
Cc:	stephen@...workplumber.org, netdev@...r.kernel.org,
	roopa@...ulusnetworks.com, bridge@...ts.linux-foundation.org,
	curt@...ulusnetworks.com, shm@...ulusnetworks.com
Subject: Re: [PATCH net-next 1/2] bridge: use spin_lock_bh() in br_multicast_set_hash_max

On Mon, Jan 6, 2014 at 11:00 AM, Scott Feldman
<sfeldma@...ulusnetworks.com> wrote:
> From: Curt Brune <curt@...ulusnetworks.com>
>
> br_multicast_set_hash_max() is called from process context in
> net/bridge/br_sysfs_br.c by the sysfs store_hash_max() function.
>
> br_multicast_set_hash_max() calls spin_lock(&br->multicast_lock),
> which can deadlock the CPU if a softirq that also tries to take the
> same lock interrupts br_multicast_set_hash_max() while the lock is
> held .  This can happen quite easily when any of the bridge multicast
> timers expire, which try to take the same lock.
>
> The fix here is to use spin_lock_bh(), preventing other softirqs from
> executing on this CPU.
>
> Steps to reproduce:
>
> 1. Create a bridge with several interfaces (I used 4).
> 2. Set the "multicast query interval" to a low number, like 2.
> 3. Enable the bridge as a multicast querier.
> 4. Repeatedly set the bridge hash_max parameter via sysfs.
>
>   # brctl addbr br0
>   # brctl addif br0 eth1 eth2 eth3 eth4
>   # brctl setmcqi br0 2
>   # brctl setmcquerier br0 1
>
>   # while true ; do echo 4096 > /sys/class/net/br0/bridge/hash_max; done
>


I think this should probably go to net instead of net-next,
and -stable too.
--
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