]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
IPV6: dst_entry leak in ip4ip6_err.
authorDenis V. Lunev <den@openvz.org>
Wed, 5 Mar 2008 22:43:05 +0000 (14:43 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 24 Mar 2008 18:47:07 +0000 (11:47 -0700)
Upstream commit: 9937ded8e44de8865cba1509d24eea9d350cebf0

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/ipv6/ip6_tunnel.c

index 5383b33db8ca606cb23edfed9cdfad018ef9a74d..81941a1e8e4962a06cb964b212b5461e13c5f39f 100644 (file)
@@ -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,