]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: use the correct nlattr array in NL_SET_ERR_MSG_ATTR
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 22 Apr 2020 15:29:50 +0000 (17:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2020 19:39:09 +0000 (12:39 -0700)
commit6ce7b1ff64f3981308ae0e213b5e8c71ac45591c
treeecde45a3e6eeaca368f4c119b61b9847a8bc6005
parent60d2d072ac074d014a0b6b59457f543e6af46dc1
vxlan: use the correct nlattr array in NL_SET_ERR_MSG_ATTR

IFLA_VXLAN_* attributes are in the data array, which is correctly
used when fetching the value, but not when setting the extended
ack. Because IFLA_VXLAN_MAX < IFLA_MAX, we avoid out of bounds
array accesses, but we don't provide a pointer to the invalid
attribute to userspace.

Fixes: 2a84cefbcae2 ("vxlan: change vxlan_[config_]validate() to use netlink_ext_ack for error reporting")
Fixes: 9bdb7a1ed201 ("vxlan: Allow configuration of DF behaviour")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c