]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
geneve: use the correct nlattr array in NL_SET_ERR_MSG_ATTR
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 22 Apr 2020 15:29:51 +0000 (17:29 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:41:44 +0000 (10:41 +0200)
commit06af38d7488e77c4f97eaea2dcb651ac97b2f986
treee193ecc9bf4ed45f25cd202ac8fc58c85b200eb7
parent99801dd7429fae2c2ed69da476e1dbefbe4b8679
geneve: use the correct nlattr array in NL_SET_ERR_MSG_ATTR

BugLink: https://bugs.launchpad.net/bugs/1876361
[ Upstream commit 9a7b5b50de8a764671ba1800fe4c52d3b7013901 ]

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

Fixes: a025fb5f49ad ("geneve: Allow configuration of DF behaviour")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
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: Stefan Bader <stefan.bader@canonical.com>
drivers/net/geneve.c