netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] skb leakage in inet6_csk_xmit
@ 2006-05-10  9:02 Alexey Kuznetsov
  2006-05-10 20:24 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kuznetsov @ 2006-05-10  9:02 UTC (permalink / raw)
  To: netdev, davem

Hello!

inet6_csk_xit does not free skb when routing fails.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index f8f3a37..eb2865d 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -173,6 +173,7 @@ int inet6_csk_xmit(struct sk_buff *skb, 
 
 		if (err) {
 			sk->sk_err_soft = -err;
+			kfree_skb(skb);
 			return err;
 		}
 
@@ -181,6 +182,7 @@ int inet6_csk_xmit(struct sk_buff *skb, 
 
 		if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
 			sk->sk_route_caps = 0;
+			kfree_skb(skb);
 			return err;
 		}
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] skb leakage in inet6_csk_xmit
  2006-05-10  9:02 [PATCH] skb leakage in inet6_csk_xmit Alexey Kuznetsov
@ 2006-05-10 20:24 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2006-05-10 20:24 UTC (permalink / raw)
  To: kuznet; +Cc: netdev

From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Date: Wed, 10 May 2006 13:02:16 +0400

> inet6_csk_xit does not free skb when routing fails.
> 
> Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

Applied, thanks a lot.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-10 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10  9:02 [PATCH] skb leakage in inet6_csk_xmit Alexey Kuznetsov
2006-05-10 20:24 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).