summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-06-04 01:30:25 +0900
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-06-05 04:02:31 +0900
commita3c960899e042bc1c2b730a2115fa32da7802039 (patch)
treed12d8270414bc113b0ae5b7ffc0d23096b30e193 /net
parente51171019bb0e1f9fb57c25bd2e38ce652eaea27 (diff)
downloadlinux-a3c960899e042bc1c2b730a2115fa32da7802039.tar.gz
linux-a3c960899e042bc1c2b730a2115fa32da7802039.tar.bz2
linux-a3c960899e042bc1c2b730a2115fa32da7802039.zip
[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 <den@openvz.org>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Denis V. Lunev <den@openvz.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 2 insertions, 0 deletions
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;