]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
vxlan: check tun_info options_len properly
authorXin Long <lucien.xin@gmail.com>
Mon, 28 Oct 2019 17:24:32 +0000 (01:24 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:01 +0000 (13:16 +0100)
commiteb19850e7847c0708d9c8af8db92b5fccf118d61
tree805938a013ea668182a95af0c0f787e55878a8bb
parent05d23f5562dd7d4caa9b7235935a931f056a132b
vxlan: check tun_info options_len properly

BugLink: https://bugs.launchpad.net/bugs/1853208
[ Upstream commit eadf52cf1852196a1363044dcda22fa5d7f296f7 ]

This patch is to improve the tun_info options_len by dropping
the skb when TUNNEL_VXLAN_OPT is set but options_len is less
than vxlan_metadata. This can void a potential out-of-bounds
access on ip_tun_info.

Fixes: ee122c79d422 ("vxlan: Flow based tunneling")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/vxlan.c