[ovs-git] [openvswitch/ovs] d7b55c: dpif: Fix leak and usage of uninitialized dp_extra...

Ilya Maximets noreply at github.com
Mon Jan 20 17:06:50 UTC 2020

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: d7b55c5c941b1f8bf220d49262d7026d058cbe77
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-01-20 (Mon, 20 Jan 2020)

  Changed paths:
    M lib/dpif-netlink.c
    M lib/dpif.c
    M lib/dpif.h
    M lib/netdev-offload-dpdk.c
    M lib/netdev-offload-tc.c
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  dpif: Fix leak and usage of uninitialized dp_extra_info.

'dpif_probe_feature'/'revalidate' doesn't free the 'dp_extra_info'
string.  Also, all the implementations of dpif_flow_get() should
initialize the value to avoid printing/freeing of random memory.

 30 bytes in 1 blocks are definitely lost in loss record 323 of 889
    at 0x483AD19: realloc (vg_replace_malloc.c:836)
    by 0xDDAD89: xrealloc (util.c:149)
    by 0xCE1609: ds_reserve (dynamic-string.c:63)
    by 0xCE1A90: ds_put_format_valist (dynamic-string.c:161)
    by 0xCE19B9: ds_put_format (dynamic-string.c:142)
    by 0xCCCEA9: dp_netdev_flow_to_dpif_flow (dpif-netdev.c:3170)
    by 0xCCD2DD: dpif_netdev_flow_get (dpif-netdev.c:3278)
    by 0xCCEA0A: dpif_netdev_operate (dpif-netdev.c:3868)
    by 0xCDF81B: dpif_operate (dpif.c:1361)
    by 0xCDEE93: dpif_flow_get (dpif.c:1002)
    by 0xCDECF9: dpif_probe_feature (dpif.c:962)
    by 0xC635D2: check_recirc (ofproto-dpif.c:896)
    by 0xC65C02: check_support (ofproto-dpif.c:1567)
    by 0xC63274: open_dpif_backer (ofproto-dpif.c:818)
    by 0xC65E3E: construct (ofproto-dpif.c:1605)
    by 0xC4D436: ofproto_create (ofproto.c:549)
    by 0xC3931A: bridge_reconfigure (bridge.c:877)
    by 0xC3FEAC: bridge_run (bridge.c:3324)
    by 0xC4551D: main (ovs-vswitchd.c:127)

CC: Emma Finn <emma.finn at intel.com>
Fixes: 0e8f5c6a38d0 ("dpif-netdev: Modified ovs-appctl dpctl/dump-flows command")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Roi Dayan <roid at mellanox.com>

More information about the git mailing list