]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
openvswitch: Avoid OOB read when parsing flow nlattrs
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Mon, 14 Jan 2019 09:16:56 +0000 (09:16 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit5b217bbe7447440a4c505d2fe532a3bb3958caee
treefa593895680e87cc71d223ea6cc9ed229b165d82
parentdd016356bc45aa70dd4466b7aca64df747873320
openvswitch: Avoid OOB read when parsing flow nlattrs

BugLink: https://bugs.launchpad.net/bugs/1837664
[ Upstream commit 04a4af334b971814eedf4e4a413343ad3287d9a9 ]

For nested and variable attributes, the expected length of an attribute
is not known and marked by a negative number.  This results in an OOB
read when the expected length is later used to check if the attribute is
all zeros. Fix this by using the actual length of the attribute rather
than the expected length.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/openvswitch/flow_netlink.c