]> 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)
commit9689c058383dd1e24571293a798c1250d74d80ba
treea8905a9be405f6f988683a689ac62df2c96fc618
parent37cec0c5c5578a292d80d7e48414c00ced4b12ec
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: e6df12b2bb07 ("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