[PATCH] ipv6-multicast: Fix memory leak in input path.

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE5366d

6 messages, 3 authors, 2012-02-04 · open the first message on its own page

[PATCH] ipv6-multicast: Fix memory leak in input path.

From: <hidden>
Date: 2011-09-27 19:06:41

From: Ben Greear <redacted>

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

Signed-off-by: Ben Greear <redacted>
---
:100644 100644 e9a8df9... 86e3cc1... M	net/ipv6/ip6mr.c
 net/ipv6/ip6mr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index e9a8df9..86e3cc1 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -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,
-- 
1.7.3.4

Re: [PATCH] ipv6-multicast: Fix memory leak in input path.

From: David Miller <davem@davemloft.net>
Date: 2011-09-27 19:16:19

From: greearb@candelatech.com
Date: Tue, 27 Sep 2011 11:58:17 -0700
From: Ben Greear <redacted>

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

Signed-off-by: Ben Greear <redacted>
Applied, thanks.

Re: [PATCH] ipv6-multicast: Fix memory leak in input path.

From: Ben Greear <hidden>
Date: 2011-09-27 19:34:43

On 09/27/2011 12:16 PM, David Miller wrote:
From: greearb@candelatech.com
Date: Tue, 27 Sep 2011 11:58:17 -0700
quoted
From: Ben Greear<redacted>

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

Signed-off-by: Ben Greear<redacted>
Applied, thanks.
Thanks.

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

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

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Re: [PATCH] ipv6-multicast: Fix memory leak in input path.

From: Eric Dumazet <hidden>
Date: 2011-09-27 20:08:52

Le mardi 27 septembre 2011 à 12:34 -0700, Ben Greear a écrit :
On 09/27/2011 12:16 PM, David Miller wrote:
quoted
From: greearb@candelatech.com
Date: Tue, 27 Sep 2011 11:58:17 -0700
quoted
From: Ben Greear<redacted>

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

Signed-off-by: Ben Greear<redacted>
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)

Re: [PATCH] ipv6-multicast: Fix memory leak in input path.

From: Ben Greear <hidden>
Date: 2012-02-02 17:26:36

On 09/27/2011 12:16 PM, David Miller wrote:
From: greearb@candelatech.com
Date: Tue, 27 Sep 2011 11:58:17 -0700
quoted
From: Ben Greear<redacted>

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

Signed-off-by: Ben Greear<redacted>
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

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

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Re: [PATCH] ipv6-multicast: Fix memory leak in input path.

From: David Miller <davem@davemloft.net>
Date: 2012-02-04 21:50:00

From: Ben Greear <redacted>
Date: Thu, 02 Feb 2012 09:26:33 -0800
On 09/27/2011 12:16 PM, David Miller wrote:
quoted
From: greearb@candelatech.com
Date: Tue, 27 Sep 2011 11:58:17 -0700
quoted
From: Ben Greear<redacted>

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

Signed-off-by: Ben Greear<redacted>
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help