mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
flow: Clear ovs_nsh_key's context data when nsh's type can't be handled
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user