[ovs-git] [openvswitch/ovs] 8523fe: odp-util: Avoid reading wrong table in generate_al...

GitHub noreply at github.com
Fri Dec 22 00:12:06 UTC 2017


  Branch: refs/heads/branch-2.5
  Home:   https://github.com/openvswitch/ovs
  Commit: 8523fe9e412dfe07bb0d365eab77042ff54e85b0
      https://github.com/openvswitch/ovs/commit/8523fe9e412dfe07bb0d365eab77042ff54e85b0
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-12-21 (Thu, 21 Dec 2017)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Avoid reading wrong table in generate_all_wildcard_mask().

These lines of code are intended to copy the 'next' and 'next_max' members
of tbl[type] into local variables 'tbl' and 'max':
      tbl = tbl[type].next;
      max = tbl[type].next_max;
They didn't do it properly because the first line changes 'tbl', so that
the first and seconds lines' references to tbl[type] refer to different
objects.

This commit fixes the problem.

Found by libfuzzer.

Reported-by: Bhargava Shastry <bshastry at sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Justin Pettit <jpettit at ovn.org>




More information about the git mailing list