ip_tunnel: Fix a memory corruption in ip_tunnel_xmit
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 1 Oct 2013 09:33:59 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2013 23:08:30 +0000 (16:08 -0700)
commit23d6f8dd1cc9ca2a3aaed9c6bb24f80b39e071df
tree9eff8a12a85b9916789890ba2368100337d562f5
parentc7bd0696131d1cc596afea05d06c6fee5b7a51ca
ip_tunnel: Fix a memory corruption in ip_tunnel_xmit

[ Upstream commit 3e08f4a72f689c6296d336c2aab4bddd60c93ae2 ]

We might extend the used aera of a skb beyond the total
headroom when we install the ipip header. Fix this by
calling skb_cow_head() unconditionally.

Bug was introduced with commit c544193214
("GRE: Refactor GRE tunneling code.")

Cc: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_tunnel.c