Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95b9b88d authored by David Lebrun's avatar David Lebrun Committed by David S. Miller
Browse files

ipv6: sr: fix double free of skb after handling invalid SRH



The icmpv6_param_prob() function already does a kfree_skb(),
this patch removes the duplicate one.

Fixes: 1ababeba ("ipv6: implement dataplane support for rthdr type 4 (Segment Routing Header)")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b0522e13
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -388,7 +388,6 @@ static int ipv6_srh_rcv(struct sk_buff *skb)
		icmpv6_param_prob(skb, ICMPV6_HDR_FIELD,
				  ((&hdr->segments_left) -
				   skb_network_header(skb)));
		kfree_skb(skb);
		return -1;
	}