ip_gre: fix a possible crash in parse_gre_header()
authorEric Dumazet <edumazet@google.com>
Thu, 4 Apr 2013 15:41:27 +0000 (15:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2013 16:00:17 +0000 (12:00 -0400)
commit22251c73ca63b5b1050724be9b54910c101a5f30
tree0f3ae2864a661d0d3ad178421d897ded5f884ac4
parentf8075a8c946d11e17bb5d837e2a032206f26ec70
ip_gre: fix a possible crash in parse_gre_header()

pskb_may_pull() can change skb->head, so we must init iph/greh after
calling it.

Bug added in commit c54419321455 (GRE: Refactor GRE tunneling code.)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c