netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [IPV6]: dst_entry leak in ip4ip6_err.
@ 2008-02-08 17:01 Denis V. Lunev
  0 siblings, 0 replies; only message in thread
From: Denis V. Lunev @ 2008-02-08 17:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, devel, yoshfuji, kaber, Denis V. Lunev

The result of the ip_route_output is not assigned to skb. This means that
- it is leaked
- possible OOPS below dereferrencing skb->dst
- no ICMP message for this case

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 net/ipv6/ip6_tunnel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 9031e52..cd94064 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -550,6 +550,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 			ip_rt_put(rt);
 			goto out;
 		}
+		skb2->dst = (struct dst_entry *)rt;
 	} else {
 		ip_rt_put(rt);
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos,
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-08 17:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 17:01 [PATCH] [IPV6]: dst_entry leak in ip4ip6_err Denis V. Lunev

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).