[ovs-git] [openvswitch/ovs] 49b216: ofp-port: Further cleanups and fixes for ofputil_d...

GitHub noreply at github.com
Mon Sep 10 19:41:15 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 49b21677f4f32e194442e4016afd2253bbc78077
      https://github.com/openvswitch/ovs/commit/49b21677f4f32e194442e4016afd2253bbc78077
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-09-10 (Mon, 10 Sep 2018)

  Changed paths:
    M lib/ofp-port.c
    M lib/ofp-print.c

  Log Message:
  -----------
  ofp-port: Further cleanups and fixes for ofputil_decode_port_stats().

This fixes leaks on the error path in parse_intel_port_custom_property().

ofp_print_ofpst_port_reply() failed to free the custom_stats in decoded
port stats.  This fixes the problem.

parse_intel_port_custom_property() had a memory leak if there was more than
one custom stats property (which there shouldn't be, but still).  This
fixes the problem.

There was a function netdev_free_custom_stats_counters() meant for freeing
custom_stats, but hardly anything used it.  This adopts it consistently.

It wasn't safe to free the custom stats if ofputil_decode_port_stats()
returned an error.  Using netdev_free_custom_stats_counters() avoids this
pitfall.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9972
Signed-off-by: Ben Pfaff <blp at ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>


  Commit: 2bdeb9a70e3c882ab97e9d2e16e7a7989b07f024
      https://github.com/openvswitch/ovs/commit/2bdeb9a70e3c882ab97e9d2e16e7a7989b07f024
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-09-10 (Mon, 10 Sep 2018)

  Changed paths:
    M tests/automake.mk
    A tests/fuzz-regression-list.at
    A tests/fuzz-regression.at
    A tests/fuzz-regression/flow_extract_fuzzer-5112775280951296
    A tests/fuzz-regression/flow_extract_fuzzer-5457710546944000
    A tests/fuzz-regression/json_parser_fuzzer-4790908707930112
    A tests/fuzz-regression/ofp_print_fuzzer-4584019764183040
    A tests/fuzz-regression/ofp_print_fuzzer-4730143510626304
    A tests/fuzz-regression/ofp_print_fuzzer-4854119633256448
    A tests/fuzz-regression/ofp_print_fuzzer-5070973479944192
    A tests/fuzz-regression/ofp_print_fuzzer-5072291707748352
    A tests/fuzz-regression/ofp_print_fuzzer-5147430386401280
    A tests/fuzz-regression/ofp_print_fuzzer-5168455220199424
    A tests/fuzz-regression/ofp_print_fuzzer-5190507327127552
    A tests/fuzz-regression/ofp_print_fuzzer-5204186701496320
    A tests/fuzz-regression/ofp_print_fuzzer-5394482341085184
    A tests/fuzz-regression/ofp_print_fuzzer-5395207246839808
    A tests/fuzz-regression/ofp_print_fuzzer-5647458888581120
    A tests/fuzz-regression/ofp_print_fuzzer-5674119268925440
    A tests/fuzz-regression/ofp_print_fuzzer-5674419757252608
    A tests/fuzz-regression/ofp_print_fuzzer-5677588436484096
    A tests/fuzz-regression/ofp_print_fuzzer-5706562554298368
    A tests/fuzz-regression/ofp_print_fuzzer-5722747668791296
    A tests/fuzz-regression/ofp_print_fuzzer-6285128790704128
    A tests/fuzz-regression/ofp_print_fuzzer-6470117922701312
    A tests/fuzz-regression/ofp_print_fuzzer-6502620041576448
    M tests/testsuite.at

  Log Message:
  -----------
  tests: Add regression tests for all the bugs found by oss-fuzz so far.

This will make it harder for bugs found by oss-fuzz to reappear.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Tested-by: Yifeng Sun <pkusunyifeng at gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/5ff53df67441...2bdeb9a70e3c
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list