Skip to content

Commit

Permalink
flow: Clear ovs_nsh_key's context data when nsh's type can't be handled
Browse files Browse the repository at this point in the history
In the default case when nsh's md_type is not recognized by nsh parser,
uninitialized data in key->context can sneak into miniflow. This
patch fixes it.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10519
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
yifsun authored and blp committed Oct 8, 2018
1 parent 298115b commit 4117939
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/flow.c
Expand Up @@ -576,6 +576,7 @@ parse_nsh(const void **datap, size_t *sizep, struct ovs_key_nsh *key)
break;
default:
/* We don't parse other context headers yet. */
memset(key->context, 0, sizeof(key->context));
break;
}

Expand Down

0 comments on commit 4117939

Please sign in to comment.