ipv6: fix a potential use after free in sit.c
authorLi RongQing <roy.qing.li@gmail.com>
Sat, 18 Oct 2014 09:33:38 +0000 (17:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Oct 2014 17:04:09 +0000 (13:04 -0400)
commita6d4518da371b0d21512ef0f641928d6f99ee70f
treed2cd98564a10f6cbf52492765d383f7959f4f001
parentfc6fb41cd64fd810bcc69fe9776d2f500778f38f
ipv6: fix a potential use after free in sit.c

pskb_may_pull() maybe change skb->data and make iph pointer oboslete,
fix it by geting ip header length directly.

Fixes: ca15a078 (sit: generate icmpv6 error when receiving icmpv4 error)
Cc: Oussama Ghorbel <ghorbel@pivasoftware.com>
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>
net/ipv6/sit.c