3.2.93-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: "David S. Miller" <davem@xxxxxxxxxxxxx> commit e3e86b5119f81e5e2499bea7ea1ebe8ac6aab789 upstream. If ip6_find_1stfragopt() fails and we return an error we have to free up 'segs' because nobody else is going to. Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options") Reported-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> [bwh: Backported to 3.2: adjust filename, context] Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx> --- net/ipv6/af_inet6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -824,8 +824,10 @@ static struct sk_buff *ipv6_gso_segment( sizeof(*ipv6h)); if (proto == IPPROTO_UDP) { int err = ip6_find_1stfragopt(skb, &prevhdr); - if (err < 0) + if (err < 0) { + kfree_skb_list(segs); return ERR_PTR(err); + } fptr = (struct frag_hdr *)(skb_network_header(skb) + err); fptr->frag_off = htons(offset);