From: David Lebrun Date: Wed, 19 Apr 2017 14:10:19 +0000 (+0200) Subject: ipv6: sr: fix double free of skb after handling invalid SRH X-Git-Tag: v4.10.14~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c52ac0687247590ac5bedcbc5fe2d09cec9b0000;p=thirdparty%2Fkernel%2Fstable.git ipv6: sr: fix double free of skb after handling invalid SRH [ Upstream commit 95b9b88d2da5e43e025400afcb492643933bf858 ] The icmpv6_param_prob() function already does a kfree_skb(), this patch removes the duplicate one. Fixes: 1ababeba4a21f3dba3da3523c670b207fb2feb62 ("ipv6: implement dataplane support for rthdr type 4 (Segment Routing Header)") Reported-by: Dan Carpenter Cc: Dan Carpenter Signed-off-by: David Lebrun Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 275cac628a950..25192a3b0cd7e 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -388,7 +388,6 @@ looped_back: icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, ((&hdr->segments_left) - skb_network_header(skb))); - kfree_skb(skb); return -1; }