1
linux/drivers/net
tom.leiming@gmail.com 0956a8c20b usbnet: increase URB reference count before usb_unlink_urb
Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
recursive locking in usbnet_stop()) fixes the recursive locking
problem by releasing the skb queue lock, but it makes usb_unlink_urb
racing with defer_bh, and the URB to being unlinked may be freed before
or during calling usb_unlink_urb, so use-after-free problem may be
triggerd inside usb_unlink_urb.

The patch fixes the use-after-free problem by increasing URB
reference count with skb queue lock held before calling
usb_unlink_urb, so the URB won't be freed until return from
usb_unlink_urb.

Cc: stable@kernel.org
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Oliver Neukum <oliver@neukum.org>
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-22 19:32:34 -04:00
..
appletalk
arcnet
bonding bonding: send igmp report for its master 2012-03-19 18:02:05 -04:00
caif Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-09 14:34:20 -08:00
can
cris
dsa
ethernet cnic: Fix parity error code conflict 2012-03-21 21:57:36 -04:00
fddi
hamradio
hippi
hyperv net/hyperv: Fix the code handling tx busy 2012-03-19 17:27:06 -04:00
irda net/irda: add clk_prepare/clk_unprepare to pxaficp_ir 2012-03-16 23:11:14 -07:00
phy Generialize powerpc's irq_host as irq_domain 2012-03-21 10:27:19 -07:00
plip
ppp
slip
team
tokenring
usb usbnet: increase URB reference count before usb_unlink_urb 2012-03-22 19:32:34 -04:00
vmxnet3
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-03-20 21:04:47 -07:00
wimax wimax/i2400m: fix erroneous NETDEV_TX_BUSY use 2012-03-16 02:01:41 -07:00
wireless Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
xen-netback
dummy.c
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
veth.c
virtio_net.c
xen-netfront.c