]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xfrm: Verify MAC header exists before overwriting eth_hdr(skb)->h_proto
authorYossi Kuperman <yossiku@mellanox.com>
Thu, 11 Oct 2018 19:49:19 +0000 (15:49 -0400)
committerKhalid Elmously <khalid.elmously@canonical.com>
Tue, 23 Oct 2018 06:45:58 +0000 (08:45 +0200)
commit138400565d76b4dd31e1272eefe516e6ebac7426
tree1ec0e5ddc6752680a01f51a413eba5b0e78c7055
parent0fb2cba7e3e2bebc5d1c012d46d65fd3b3ec62c9
xfrm: Verify MAC header exists before overwriting eth_hdr(skb)->h_proto

BugLink: https://bugs.launchpad.net/bugs/1795653
Artem Savkov reported that commit 5efec5c655dd leads to a packet loss under
IPSec configuration. It appears that his setup consists of a TUN device,
which does not have a MAC header.

Make sure MAC header exists.

Note: TUN device sets a MAC header pointer, although it does not have one.

Fixes: 5efec5c655dd ("xfrm: Fix eth_hdr(skb)->h_proto to reflect inner IP version")
Reported-by: Artem Savkov <artem.savkov@gmail.com>
Tested-by: Artem Savkov <artem.savkov@gmail.com>
Signed-off-by: Yossi Kuperman <yossiku@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 87cdf3148b11d46382dbce2754ae7036aba96380)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/ipv4/xfrm4_mode_tunnel.c
net/ipv6/xfrm6_mode_tunnel.c