[ovs-git] [ovn-org/ovn] 382af3: northd: Fix leaks of strings while formatting ecmp...

Ilya Maximets noreply at github.com
Sun Nov 22 18:13:30 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/ovn-org/ovn
  Commit: 382af3deaaf156fd2d77acd720c8775547638ba7
      https://github.com/ovn-org/ovn/commit/382af3deaaf156fd2d77acd720c8775547638ba7
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M northd/ovn-northd.c

  Log Message:
  -----------
  northd: Fix leaks of strings while formatting ecmp flows.

Result of 'normalize_v46_prefix()' should be freed and all dynamic
strings should be destroyed.

Fixes: 4fdca656857d ("Add ECMP symmetric replies.")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 3b1affc5b1b0fecb332a21221f4988a99c4e693f
      https://github.com/ovn-org/ovn/commit/3b1affc5b1b0fecb332a21221f4988a99c4e693f
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M tests/test-ovn.c

  Log Message:
  -----------
  test-ovn: Fix expression leak.

No need to clone when assigning to the same variable.

Fixes: 024500aeab9a ("expr: Evaluate the condition expression in a separate step.")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 9443464f7335cc8b8ec6299e70a5ad6266bef4c8
      https://github.com/ovn-org/ovn/commit/9443464f7335cc8b8ec6299e70a5ad6266bef4c8
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M lib/actions.c

  Log Message:
  -----------
  actions: Fix leak of child ports in fwd group.

'child_port_list' is an array of pointers that should be freed too.

  Direct leak of 30 byte(s) in 6 object(s) allocated from:
    #0 0x501fff in malloc (/tests/ovstest+0x501fff)
    #1 0x6227e6 in xmalloc /lib/util.c:138:15
    #2 0x6228b8 in xmemdup0 /lib/util.c:168:15
    #3 0x8183d6 in parse_fwd_group_action /lib/actions.c:3374:30
    #4 0x814b6e in parse_action /lib/actions.c:3610:9
    #5 0x8139ef in parse_actions /lib/actions.c:3637:14
    #6 0x8136a3 in ovnacts_parse /lib/actions.c:3672:9
    #7 0x813c80 in ovnacts_parse_string /lib/actions.c:3699:5
    #8 0x53a979 in test_parse_actions /tests/test-ovn.c:1372:21
    #9 0x54e7a8 in ovs_cmdl_run_command__ /lib/command-line.c:247:17
    #10 0x537c75 in test_ovn_main /tests/test-ovn.c:1630:5
    #11 0x54e7a8 in ovs_cmdl_run_command__ /lib/command-line.c:247:17
    #12 0x537359 in main /tests/ovstest.c:133:9
    #13 0x7f06978f21a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)

CC: Manoj Sharma <manoj.sharma at nutanix.com>
Fixes: edb240081518 ("Forwarding group to load balance l2 traffic with liveness detection")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 18141dbcb023df9cac8c9a4d6aae63c77d8acc69
      https://github.com/ovn-org/ovn/commit/18141dbcb023df9cac8c9a4d6aae63c77d8acc69
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M lib/actions.c

  Log Message:
  -----------
  actions: Fix leak of select group members.

'dsts' should be freed in case of any error.

  Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x502378 in realloc (/tests/ovstest+0x502378)
    #1 0x622826 in xrealloc /lib/util.c:149:9
    #2 0x8194f4 in parse_select_action /lib/actions.c:1185:20
    #3 0x814f49 in parse_set_action /lib/actions.c:3499:13
    #4 0x814341 in parse_action /lib/actions.c:3554:9
    #5 0x8139ef in parse_actions /lib/actions.c:3643:14
    #6 0x8136a3 in ovnacts_parse /lib/actions.c:3678:9
    #7 0x813c80 in ovnacts_parse_string /lib/actions.c:3705:5
    #8 0x53a4e8 in test_parse_actions /tests/test-ovn.c:1321:17
    #9 0x54e7a8 in ovs_cmdl_run_command__ /lib/command-line.c:247:17
    #10 0x537c75 in test_ovn_main /tests/test-ovn.c:1630:5
    #11 0x54e7a8 in ovs_cmdl_run_command__ /lib/command-line.c:247:17
    #12 0x537359 in main /tests/ovstest.c:133:9
    #13 0x7f9ce05ba1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)

CC: Han Zhou <hzhou at ovn.org>
Fixes: 85b3544aabb2 ("ovn-controller: A new action "select".")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: d058d9a08572520a4cb4ec4a4c6db5afdb35d515
      https://github.com/ovn-org/ovn/commit/d058d9a08572520a4cb4ec4a4c6db5afdb35d515
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M controller/ofctrl.c

  Log Message:
  -----------
  ofctrl: Fix leak of meter mod bands.

'parse_ofp_meter_mod_str' allocates space for meter.bands that
should be freed.

  Direct leak of 448 byte(s) in 7 object(s) allocated from:
    #0 0x52100f in malloc (/controller/ovn-controller+0x52100f)
    #1 0x7523a6 in xmalloc /lib/util.c:138:15
    #2 0x6fd079 in ofpbuf_init /lib/ofpbuf.c:123:26
    #3 0x6cba27 in parse_ofp_meter_mod_str /lib/ofp-meter.c:779:5
    #4 0x5705b8 in add_meter_string /controller/ofctrl.c:1674:19
    #5 0x56f736 in ofctrl_put /controller/ofctrl.c:2105:13
    #6 0x59aebb in main /controller/ovn-controller.c:2627:25
    #7 0x7f07873251a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)

CC: Guoshuai Li <ligs at dtdream.com>
Fixes: c25094b3884d ("ovn: OVN Support QoS meter")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 79b946da70442ab2610c47752555dffbbce490a5
      https://github.com/ovn-org/ovn/commit/79b946da70442ab2610c47752555dffbbce490a5
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M controller/pinctrl.c

  Log Message:
  -----------
  pinctrl: Fix leak of DNS cache records.

'smap_clear()' doesn't free allocated memory, but 'smap_clone()'
re-initializes hash map clearing internal pointers and leaking
this memory.  'smap_destroy()' should be used instead.

Also, all the records and array of datapaths should be freed on
destruction of a cache entry.

  Direct leak of 16 byte(s) in 2 object(s) allocated from:
    #0 0x5211c7 in calloc (/controller/ovn-controller+0x5211c7)
    #1 0x752364 in xcalloc /lib/util.c:121:31
    #2 0x576e76 in sync_dns_cache /controller/pinctrl.c:2517:25
    #3 0x5758fb in pinctrl_run /controller/pinctrl.c:3158:5
    #4 0x59b06c in main /controller/ovn-controller.c:2642:25
    #5 0x7fb570fc11a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)

  Indirect leak of 26 byte(s) in 2 object(s) allocated from:
    #0 0x52100f in malloc (/controller/ovn-controller+0x52100f)
    #1 0x7523d6 in xmalloc /lib/util.c:138:15
    #2 0x7524a8 in xmemdup0 /lib/util.c:168:15
    #3 0x73d8fc in smap_clone /lib/smap.c:314:45
    #4 0x576e2f in sync_dns_cache /controller/pinctrl.c:2513:13
    #5 0x5758fb in pinctrl_run /controller/pinctrl.c:3158:5
    #6 0x59b06c in main /controller/ovn-controller.c:2642:25
    #7 0x7fb570fc11a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)

Fixes: 6b72068202f1 ("ovn-controller: Add a new thread in pinctrl module to handle packet-ins.")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 11bd9d337b670f5a3fe3c6abb2dd932039a6518d
      https://github.com/ovn-org/ovn/commit/11bd9d337b670f5a3fe3c6abb2dd932039a6518d
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: Fix leak of pending ct zones.

shash contains pointers to the data that should be freed.

  Direct leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0x52100f in malloc (/controller/ovn-controller+0x52100f)
    #1 0x752436 in xmalloc /lib/util.c:138:15
    #2 0x5a2f0b in add_pending_ct_zone_entry /controller/ovn-controller.c:548:45
    #3 0x5a2d1d in update_ct_zones /controller/ovn-controller.c:668:9
    #4 0x59d8c6 in en_ct_zones_run /controller/ovn-controller.c:1495:5
    #5 0x5dade4 in engine_run /lib/inc-proc-eng.c:377:9
    #6 0x59adf4 in main /controller/ovn-controller.c
    #7 0x7f0799ef41a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)

CC: xu rong <xu.rong at zte.com.cn>
Fixes: 252e1642fb59 ("ovn-controller: pending_ct_zones should be destroyed")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 6f4353df304cdf8e32afb32bf243599b99851d5a
      https://github.com/ovn-org/ovn/commit/6f4353df304cdf8e32afb32bf243599b99851d5a
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  ovn-nbctl: Fix error leak on duplicated switch port.

Error is allocated from heap and should be freed.

Fixes: 738295605b44 ("ovn: Detect and prevent duplicate address assignments.")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 44f41669812c633bc180074e6d91e0d0f3a781a1
      https://github.com/ovn-org/ovn/commit/44f41669812c633bc180074e6d91e0d0f3a781a1
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M northd/ovn-northd.c

  Log Message:
  -----------
  northd: Fix leak of dynamic string for fwd group ports.

'group_ports' never destroyed and re-created on each iteration.

CC: Manoj Sharma <manoj.sharma at nutanix.com>
Fixes: edb240081518 ("Forwarding group to load balance l2 traffic with liveness detection")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 61d209bbf2abacb71cdb63555fe1fe6b0020daf3
      https://github.com/ovn-org/ovn/commit/61d209bbf2abacb71cdb63555fe1fe6b0020daf3
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M lib/actions.c

  Log Message:
  -----------
  actions: Fix leak of dynamic string on fwd group encoding failure.

CC: Manoj Sharma <manoj.sharma at nutanix.com>
Fixes: edb240081518 ("Forwarding group to load balance l2 traffic with liveness detection")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: f9e449fce78b2e0682cef53ba09cade492b4d260
      https://github.com/ovn-org/ovn/commit/f9e449fce78b2e0682cef53ba09cade492b4d260
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  ovn-nbctl: Fix leak of IPs while configuring NAT.

CC: Ankur Sharma <ankur.sharma at nutanix.com>
Fixes: 20bc58a67f39 ("External IP based NAT: Add Columns and CLI")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Dumitru Ceara <dceara at redhat.com>
Acked-by: Ankur Sharma <ankur.sharma at nutanix.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 360b5bf20f23eb103edf86f3b13ab0a5fe0490db
      https://github.com/ovn-org/ovn/commit/360b5bf20f23eb103edf86f3b13ab0a5fe0490db
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  ovn-nbctl: Fix IP leak on router NAT addition failure.

Cleanup needed instead of direct return.

Fixes: 43f42ecb3a5a ("Use normalized IP addreses in `ovn-nbctl lr-nat-add`")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 47385c83f865306b5c85a61d530e2a9383640ceb
      https://github.com/ovn-org/ovn/commit/47385c83f865306b5c85a61d530e2a9383640ceb
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  ovn-nbctl: Fix IP leak on failure of lr policy addition.

Fixes: 742474bad730 ("ovn-nbctl: Enhance lr-policy-add to set the options.")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: f3b8cbb2f2c55f9debec56ff881190de7e9b2d63
      https://github.com/ovn-org/ovn/commit/f3b8cbb2f2c55f9debec56ff881190de7e9b2d63
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-22 (Sun, 22 Nov 2020)

  Changed paths:
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  ovn-nbctl: Fix leak of array of new policies.

CC: Tao YunXiang <taoyunxiang at cmss.chinamobile.com>
Fixes: 5820502a5507 ("ovn-nbctl.c: Fix lr-policy-del command")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


Compare: https://github.com/ovn-org/ovn/compare/1dd27ea7aea4...f3b8cbb2f2c5


More information about the git mailing list