[ovs-dev] [PATCH 2/4] flow: Fix uninitialized reads in [mini]flow_hash_5tuple().
Ben Pfaff
blp at ovn.org
Fri May 20 03:59:24 UTC 2016
On Tue, May 17, 2016 at 10:31:23PM -0700, Daniele Di Proietto wrote:
> Almost every caller expects [mini]flow_hash_5tuple() to be able to deal
> with all kinds of flows, not only TCP and UDP.
>
> Currently, when dealing with non L4 flows, the function may access
> uninitialized memory. This commit changes it to return prematurely with
> a partial hash value instead of reading uninitialized memory.
>
> Found by valgrind.
>
> Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Good catch.
This comment in miniflow_hash_5tuple() seems obsolete and I guess it
should be removed:
/* Separate loops for better optimization. */
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the dev
mailing list