[ovs-dev] [PATCH] revalidator: Fix access of uninitialized memory.

Joe Stringer joestringer at nicira.com
Tue Dec 9 01:26:54 UTC 2014


Commit 64bb477 "dpif: Minimize memory copy for revalidation." introduced
a bug where the corner case of ukey creation (in revalidator threads)
could result in access to uninitialized memory when deleting flows from
the datapath. This could result in OVS aborting or deadlock. Fix it.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
---
 ofproto/ofproto-dpif-upcall.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 38e1aff..5fe90ac 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1675,6 +1675,7 @@ exit:
 static void
 delete_op_init__(struct ukey_op *op, const struct dpif_flow *flow)
 {
+    op->ukey = NULL;
     op->dop.type = DPIF_OP_FLOW_DEL;
     op->dop.u.flow_del.key = flow->key;
     op->dop.u.flow_del.key_len = flow->key_len;
-- 
1.7.10.4




More information about the dev mailing list