]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jan 2019 21:35:21 +0000 (13:35 -0800)
commitf5a89d6b86f61e3e39133697e374d63fe82caaf0
treedc4196a9e798d5f2bc2ebbeddb9b80717882687a
parentb4fabe195f1a2857dacf99b194add9366d233a03
openvswitch: Avoid OOB read when parsing flow nlattrs

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>
net/openvswitch/flow_netlink.c