]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Avoid memory corruption in queue_userspace_packet()
authorAndy Zhou <azhou@nicira.com>
Thu, 17 Jul 2014 22:17:44 +0000 (15:17 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Thu, 24 Jul 2014 16:37:20 +0000 (09:37 -0700)
commitce3ae60f44476fbfd20d3a7cdcbccdaece3d84ce
tree2c289fa62e00614a8267cecfac3a9c7703b3aef8
parent70dfd51686af0a247557a4c2086d8214ecd3ec43
openvswitch: Avoid memory corruption in queue_userspace_packet()

In queue_userspace_packet(), the ovs_nla_put_flow return value is
not checked. This is fine as long as key_attr_size() returns the
correct value. In case it does not, the current code may corrupt buffer
memory. Add a run time assertion catch this case to avoid silent
failure.

Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
net/openvswitch/datapath.c