mirror of https://gitee.com/openkylin/linux.git
ipv6: fix a potential use after free in ip6_offload.c
pskb_may_pull() maybe change skb->data and make opth pointer oboslete, so set the opth again Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b4e3cef703
commit
fc6fb41cd6
|
@ -46,6 +46,7 @@ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
|
|||
if (unlikely(!pskb_may_pull(skb, len)))
|
||||
break;
|
||||
|
||||
opth = (void *)skb->data;
|
||||
proto = opth->nexthdr;
|
||||
__skb_pull(skb, len);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue