]> git.baikalelectronics.ru Git - kernel.git/commit
ip_gre: fix possible use after free
authorEric Dumazet <edumazet@google.com>
Thu, 20 Dec 2012 16:00:27 +0000 (16:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Dec 2012 21:14:01 +0000 (13:14 -0800)
commitb0d102946afa4a112eb741bdf2fbf0f1609e6a3b
treeef32b318efe584f845f05eb7f65daca803abb6a1
parentaacbe0945f92712c10fc5481bfcfb387df1aa534
ip_gre: fix possible use after free

Once skb_realloc_headroom() is called, tiph might point to freed memory.

Cache tiph->ttl value before the reallocation, to avoid unexpected
behavior.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c