]> git.baikalelectronics.ru Git - kernel.git/commit
net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Tue, 9 Apr 2019 09:47:20 +0000 (11:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Apr 2019 06:02:23 +0000 (23:02 -0700)
commitaf1eeb5afec0646481e7c69db582bf2e57582ea0
treefe658830a34a330da5c2d403a7f5b059eeff4991
parent10236a27d1f8a5fc1188fe8577dde48e11f2323b
net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv

gue tunnels run iptunnel_pull_offloads on received skbs. This can
determine a possible use-after-free accessing guehdr pointer since
the packet will be 'uncloned' running pskb_expand_head if it is a
cloned gso skb (e.g if the packet has been sent though a veth device)

Fixes: b274a1281308 ("tunnels: Remove encapsulation offloads on decap")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fou.c