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

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


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: c9b69c128b99395b80cce6e49c6eb80305dc245e
      https://github.com/openvswitch/ovs/commit/c9b69c128b99395b80cce6e49c6eb80305dc245e
  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: 8cc232e15902a408af02749621fbcf18d5f01934
      https://github.com/openvswitch/ovs/commit/8cc232e15902a408af02749621fbcf18d5f01934
  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: baac814a9107652c0afec5ffb667a16686cc1c95
      https://github.com/openvswitch/ovs/commit/baac814a9107652c0afec5ffb667a16686cc1c95
  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/843e459c2d79...baac814a9107


More information about the git mailing list