Skip to contentSkip to conversation

ipv6-multicast: Fix memory leak in input path.

PATCH Applied [email protected] 3 participants 6 messages Sep 27, 2011 – Feb 4, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6-multicast: Fix memory leak in input path.

From: Ben Greear <[email protected]>

Have to free the skb before returning if we fail
the fib lookup.

---
:100644 100644 e9a8df9... 86e3cc1... M net/ipv6/ip6mr.c

 net/ipv6/ip6mr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/ipv6/ip6mr.c +3 -1
index e9a8df9..86e3cc1 100644
@@ -2053,8 +2053,10 @@ int ip6_mr_input(struct sk_buff *skb)
 	int err;
 
 	err = ip6mr_fib_lookup(net, &fl6, &mrt);
-	if (err < 0)
+	if (err < 0) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	read_lock(&mrt_lock);
 	cache = ip6mr_cache_find(mrt,
Signature · 1 line
1.7.3.4
author
#2 lore raw
Quoted 11 lines · David Miller

From: [email protected]
Date: Tue, 27 Sep 2011 11:58:17 -0700

Quoted 6 lines

From: Ben Greear<[email protected]>

Have to free the skb before returning if we fail
the fib lookup.

Applied, thanks.

Thanks.

This bug was introduced in 2.6.35, I believe, so should probably send this to stable as well.

Thanks,
Ben

Quoted 4 lines

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

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#3 lore raw
Quoted 9 lines · Ben Greear
Quoted 8 lines · David Miller

From: [email protected]
Date: Tue, 27 Sep 2011 11:58:17 -0700

Quoted 5 lines

From: Ben Greear<[email protected]>

Have to free the skb before returning if we fail
the fib lookup.

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

Applied, thanks.

Thanks.

This bug was introduced in 2.6.35, I believe, so should probably send this to stable as well.

A good way to handle this is to include in the changelog of the patch the reference on faulty commit, to ease David and stable teams work.

Commit d1db275dd3f6
(ipv6: ip6mr: support multiple tables)

author
#4 lore raw
In reply to David Miller
Quoted 11 lines · David Miller

From: [email protected]
Date: Tue, 27 Sep 2011 11:58:17 -0700

Quoted 6 lines

From: Ben Greear<[email protected]>

Have to free the skb before returning if we fail
the fib lookup.

Applied, thanks.

From what I can tell, this never made it into the 3.0 stable series.

I know that normally you feed things to stable, but please let me know if you'd like me to send it to the stable guys instead...

Thanks,
Ben

Quoted 4 lines

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

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
maintainer
#5 lore raw

From: Ben Greear <[email protected]>
Date: Thu, 02 Feb 2012 09:26:33 -0800

Quoted 11 lines · David Miller
Quoted 10 lines

From: [email protected]
Date: Tue, 27 Sep 2011 11:58:17 -0700

Quoted 6 lines

From: Ben Greear<[email protected]>

Have to free the skb before returning if we fail
the fib lookup.

Quoted 7 lines
Quoted 1 line

Applied, thanks.

From what I can tell, this never made it into the 3.0 stable series.

I know that normally you feed things to stable, but please let me know if you'd like me to send it to the stable guys instead...

I'll queue this and the other one up for -stable, thanks.