ipv6: fix a potential use after free in ip6_offload.c
Subsystems (3)
PATCH 1/1 ipv6: fix a potential use after free in ip6_offload.c
From: Li RongQing <[email protected]>
pskb_may_pull() maybe change skb->data and make opth pointer oboslete, so set the opth again
Signed-off-by Li RongQing <[email protected]>
--- net/ipv6/ip6_offload.c | 1 + 1 file changed, 1 insertion(+)
net/ipv6/ip6_offload.c +1 -0
@@ -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); }
Signature · 1 line
1.7.10.4
Quoted 15 lines · On Sat, 2014-10-18 at 17:27 +0800, [email protected] wrote:
From: Li RongQing <[email protected]>
pskb_may_pull()maybe changeskb->dataand make opth pointer oboslete, so set the opth againSigned-off-by Li RongQing <[email protected]>--- net/ipv6/ip6_offload.c | 1 + 1 file changed, 1 insertion(+)net/ipv6/ip6_offload.c +0
-0
net/ipv6/ip6_offload.c static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) · line 52
Quoted 7 lines
net/ipv6/ip6_offload.c +1
-0@@ -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); }
Acked-by Eric Dumazet <[email protected]>
From: [email protected]
Date: Sat, 18 Oct 2014 17:27:42 +0800
Quoted 6 lines
From: Li RongQing <[email protected]>
pskb_may_pull()maybe changeskb->dataand make opth pointer oboslete, so set the opth againSigned-off-by Li RongQing <[email protected]>
Applied.