From: YOSHIFUJI Hideaki Date: Tue, 3 Jun 2008 16:30:25 +0000 (+0900) Subject: [IPV6] UDP: Possible dst leak in udpv6_sendmsg. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3c960899e042bc1c2b730a2115fa32da7802039;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [IPV6] UDP: Possible dst leak in udpv6_sendmsg. ip6_sk_dst_lookup returns held dst entry. It should be released on all paths beyond this point. Add missed release when up->pending is set. Bug report and initial patch by Denis V. Lunev . Signed-off-by: YOSHIFUJI Hideaki Acked-by: Denis V. Lunev --- diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1fd784f3e2ec..47123bf5eb0f 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -848,12 +848,14 @@ do_append_data: } else { dst_release(dst); } + dst = NULL; } if (err > 0) err = np->recverr ? net_xmit_errno(err) : 0; release_sock(sk); out: + dst_release(dst); fl6_sock_release(flowlabel); if (!err) return len;