]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Oct 2019 00:39:26 +0000 (17:39 -0700)
commit48ad772faf81e43b5ad8ae8f152de35178b0c4f3
treea8905a9be405f6f988683a689ac62df2c96fc618
parent3a84a26880c04cf2acd7ef279098e72f9ca66071
vxlan: check tun_info options_len properly

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: 90ef35c5364d ("vxlan: Flow based tunneling")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c