[ovs-git] [openvswitch/ovs] 4bf39b: datapath: Avoid OOB read when parsing flow nlattrs

Yi-Hung Wei noreply at github.com
Mon Feb 4 21:48:43 UTC 2019


  Branch: refs/heads/branch-2.11
  Home:   https://github.com/openvswitch/ovs
  Commit: 4bf39b4b6884f5620af217792bda95d4e6ee4987
      https://github.com/openvswitch/ovs/commit/4bf39b4b6884f5620af217792bda95d4e6ee4987
  Author: Ross Lagerwall <ross.lagerwall at citrix.com>
  Date:   2019-02-04 (Mon, 04 Feb 2019)

  Changed paths:
    M datapath/flow_netlink.c

  Log Message:
  -----------
  datapath: Avoid OOB read when parsing flow nlattrs

Upstream commit:
    commit 04a4af334b971814eedf4e4a413343ad3287d9a9
    Author: Ross Lagerwall <ross.lagerwall at citrix.com>
    Date:   Mon Jan 14 09:16:56 2019 +0000

    openvswitch: Avoid OOB read when parsing flow nlattrs

    For nested and variable attributes, the expected length of an attribute
    is not known and marked by a negative number.  This results in an OOB
    read when the expected length is later used to check if the attribute is
    all zeros. Fix this by using the actual length of the attribute rather
    than the expected length.

    Signed-off-by: Ross Lagerwall <ross.lagerwall at citrix.com>
    Acked-by: Pravin B Shelar <pshelar at ovn.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Cc: Ross Lagerwall <ross.lagerwall at citrix.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: ee9d8b82e960629b736eea0f87374d2d7deb7ade
      https://github.com/openvswitch/ovs/commit/ee9d8b82e960629b736eea0f87374d2d7deb7ade
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2019-02-04 (Mon, 04 Feb 2019)

  Changed paths:
    M datapath/flow.c

  Log Message:
  -----------
  datapath: Derive IP protocol number for IPv6 later frags

Upstream commit:
    commit fa642f08839bf2ff35b2f6c6a6c062aee8121ba8
    Author: Yi-Hung Wei <yihung.wei at gmail.com>
    Date:   Tue Sep 4 15:33:41 2018 -0700

    openvswitch: Derive IP protocol number for IPv6 later frags

    Currently, OVS only parses the IP protocol number for the first
    IPv6 fragment, but sets the IP protocol number for the later fragments
    to be NEXTHDF_FRAGMENT.  This patch tries to derive the IP protocol
    number for the IPV6 later frags so that we can match that.

    Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
    Acked-by: Pravin B Shelar <pshelar at ovn.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>

CC: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 4e0b94b69c8dafd2c53eb2aa62759a24680c9432
      https://github.com/openvswitch/ovs/commit/4e0b94b69c8dafd2c53eb2aa62759a24680c9432
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2019-02-04 (Mon, 04 Feb 2019)

  Changed paths:
    M datapath/flow.c

  Log Message:
  -----------
  datapath: Fix IPv6 later frags parsing

Upstream commit:
    commit 41e4e2cd75346667b0c531c07dab05cce5b06d15
    Author: Yi-Hung Wei <yihung.wei at gmail.com>
    Date:   Thu Jan 3 09:51:57 2019 -0800

    openvswitch: Fix IPv6 later frags parsing

    The previous commit fa642f08839b
    ("openvswitch: Derive IP protocol number for IPv6 later frags")
    introduces IP protocol number parsing for IPv6 later frags that can mess
    up the network header length calculation logic, i.e. nh_len < 0.
    However, the network header length calculation is mainly for deriving
    the transport layer header in the key extraction process which the later
    fragment does not apply.

    Therefore, this commit skips the network header length calculation to
    fix the issue.

    Reported-by: Chris Mi <chrism at mellanox.com>
    Reported-by: Greg Rose <gvrose8192 at gmail.com>
    Fixes: fa642f08839b ("openvswitch: Derive IP protocol number for IPv6 later frags")
    Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Fixes: 9a4ab6da01f7 ("datapath: Derive IP protocol number for IPv6 later frags")
Cc: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/007ad72fbddd...4e0b94b69c8d


More information about the git mailing list