lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Dec 2013 06:16:46 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	roy.qing.li@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: release dst properly in ipip6_tunnel_xmit

On Fri, 2013-12-20 at 17:20 +0800, roy.qing.li@...il.com wrote:
> From: Li RongQing <roy.qing.li@...il.com>
> 
> if a dst is not attached to anywhere, it should be released before
> exit ipip6_tunnel_xmit, otherwise cause dst memory leakage.
> 
> Signed-off-by: Li RongQing <roy.qing.li@...il.com>
> ---
>  net/ipv6/sit.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> index 366fbba..d68a224 100644
> --- a/net/ipv6/sit.c
> +++ b/net/ipv6/sit.c
> @@ -966,8 +966,10 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
>  	tos = INET_ECN_encapsulate(tos, ipv6_get_dsfield(iph6));
>  
>  	skb = iptunnel_handle_offloads(skb, false, SKB_GSO_SIT);
> -	if (IS_ERR(skb))
> +	if (IS_ERR(skb)) {
> +		ip_rt_put(rt);
>  		goto out;
> +	}
>  
>  	err = iptunnel_xmit(rt, skb, fl4.saddr, fl4.daddr, IPPROTO_IPV6, tos,
>  			    ttl, df, !net_eq(tunnel->net, dev_net(dev)));


Fixes: 61c1db7fae21 ("ipv6: sit: add GSO/TSO support")
Acked-by: Eric Dumazet <edumazet@...gle.com>

Thanks a lot !


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ