netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: fix a potential use after free in ip6_offload.c
@ 2014-10-18  9:27 roy.qing.li
  2014-10-18 15:50 ` Eric Dumazet
  2014-10-18 17:07 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: roy.qing.li @ 2014-10-18  9:27 UTC (permalink / raw)
  To: netdev

From: Li RongQing <roy.qing.li@gmail.com>

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>
---
 net/ipv6/ip6_offload.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
index 9034f76..91014d3 100644
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -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);
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-18 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-18  9:27 [PATCH] ipv6: fix a potential use after free in ip6_offload.c roy.qing.li
2014-10-18 15:50 ` Eric Dumazet
2014-10-18 17:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).