Re: NET_NS: unregister_netdevice: waiting for lo to become free (adding ipv6 address to interface)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Thursday, August 5, 2010 - 1:11 pm

From: ebiederm@xmission.com (Eric W. Biederman)
Date: Thu, 05 Aug 2010 12:57:59 -0700


There was a recent fix to the IGMP snooping code we have in
the bridging layer, if parsing of an ipv6 IGMP packet failed
we'd leak the packet (and thus references to whatever device
it referenced).

commit 6d1d1d398cb7db7a12c5d652d50f85355345234f
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Thu Jul 29 01:12:31 2010 +0000

    bridge: Fix skb leak when multicast parsing fails on TX
    
    On the bridge TX path we're leaking an skb when br_multicast_rcv
    returns an error.
    
    Reported-by: David Lamparter <equinox@diac24.net>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 4cec805..f49bcd9 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -48,8 +48,10 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	rcu_read_lock();
 	if (is_multicast_ether_addr(dest)) {
-		if (br_multicast_rcv(br, NULL, skb))
+		if (br_multicast_rcv(br, NULL, skb)) {
+			kfree_skb(skb);
 			goto out;
+		}
 
 		mdst = br_mdb_get(br, skb);
 		if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sysfs bug when using tun with network namespaces, Michael Leun, (Thu Jul 8, 9:40 am)
Re: sysfs bug when using tun with network namespaces, Michael Leun, (Sat Jul 10, 1:15 am)
Re: sysfs bug when using tun with network namespaces, Michael Leun, (Sat Jul 10, 7:52 am)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Eric W. Biederman, (Thu Aug 5, 12:57 pm)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., David Miller, (Thu Aug 5, 1:11 pm)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Menil Jean-Philippe, (Mon Dec 6, 9:08 am)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Menil Jean-Philippe, (Tue Dec 7, 3:40 am)