ipv6: fix a potential use after free in sit.c
authorLi RongQing <[email protected]>
Sat, 18 Oct 2014 09:33:38 +0000 (17:33 +0800)
committerDavid S. Miller <[email protected]>
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 <[email protected]>
Signed-off-by: Li RongQing <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv6/sit.c