]> 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)
commitbb5a8853af754974a0ce50c1e39a2183bebe07cf
treedc4196a9e798d5f2bc2ebbeddb9b80717882687a
parent50691ac813216f4b608bd9620f06ed93da47f2d3
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