[ovs-git] [openvswitch/ovs] aeee33: netdev-offload-tc: Fix using uninitialized recirc_...

Ilya Maximets noreply at github.com
Tue Jan 7 14:27:08 UTC 2020


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

  Changed paths:
    M lib/netdev-offload-tc.c

  Log Message:
  -----------
  netdev-offload-tc: Fix using uninitialized recirc_act.

Fixes: b2ae40690ed7 ("netdev-offload-tc: Add recirculation support via tc chains")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Roi Dayan <roid at mellanox.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>


  Commit: e64fe4e4c2c9df7954f2efda0db3ee240f69572a
      https://github.com/openvswitch/ovs/commit/e64fe4e4c2c9df7954f2efda0db3ee240f69572a
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M lib/tc.h

  Log Message:
  -----------
  tc: Fix using uninitialized id chain.

tc_make_tcf_id() doesn't initialize the 'chain' field leaving it with a
random value from the stack.  This makes request_from_tcf_id() create
request with random TCA_CHAIN included.  These requests are obviously
doesn't work as needed leading to broken flow dump and various other
issues.  Fix that by using designated initializer instead.

Fixes: acdd544c4c9a ("tc: Introduce tcf_id to specify a tc filter")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Roi Dayan <roid at mellanox.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>


  Commit: f7392b44a216c9f9e2c8266361c61b54b0d5829c
      https://github.com/openvswitch/ovs/commit/f7392b44a216c9f9e2c8266361c61b54b0d5829c
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M lib/dpif-netlink.c

  Log Message:
  -----------
  dpif-netlink: Fix dumping uninitialized netdev flow stats.

dpif logging functions expects to be called after the operation.
log_flow_del_message() dumps flow stats on success which are not
initialized before the actual call to netdev_flow_del():

 Conditional jump or move depends on uninitialised value(s)
    at 0x6090875: _itoa_word (_itoa.c:179)
    by 0x6093F0D: vfprintf (vfprintf.c:1642)
    by 0x60C090F: vsnprintf (vsnprintf.c:114)
    by 0xE5E7EC: ds_put_format_valist (dynamic-string.c:155)
    by 0xE5E755: ds_put_format (dynamic-string.c:142)
    by 0xE5A5E6: dpif_flow_stats_format (dpif.c:903)
    by 0xE5B708: log_flow_message (dpif.c:1763)
    by 0xE5BCA4: log_flow_del_message (dpif.c:1809)
    by 0xFA6076: try_send_to_netdev (dpif-netlink.c:2190)
    by 0xFA0D3C: dpif_netlink_operate (dpif-netlink.c:2248)
    by 0xE5AFAC: dpif_operate (dpif.c:1376)
    by 0xDF176E: push_dp_ops (ofproto-dpif-upcall.c:2367)
    by 0xDF04C8: push_ukey_ops (ofproto-dpif-upcall.c:2447)
    by 0xDF008F: revalidator_sweep__ (ofproto-dpif-upcall.c:2805)
    by 0xDF5DC6: revalidator_sweep (ofproto-dpif-upcall.c:2816)
    by 0xDF1E83: udpif_revalidator (ofproto-dpif-upcall.c:949)
    by 0xF3A3FE: ovsthread_wrapper (ovs-thread.c:383)
    by 0x565F6DA: start_thread (pthread_create.c:463)
    by 0x615988E: clone (clone.S:95)
  Uninitialised value was created by a stack allocation
    at 0xDEFC24: revalidator_sweep__ (ofproto-dpif-upcall.c:2733)

Fixes: 3cd99886191e ("dpif-netlink: Use dpif logging functions")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Roi Dayan <roid at mellanox.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>


  Commit: af683565bae8d7083c0b5b522409a848c3f28759
      https://github.com/openvswitch/ovs/commit/af683565bae8d7083c0b5b522409a848c3f28759
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M tests/automake.mk

  Log Message:
  -----------
  tests: Allow running offloads testsuite under valgrind.

This helps a lot with finding memory leaks and uninitialized
data usage.

Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>
Signed-off-by: Simon Horman <simon.horman at netronome.com>


Compare: https://github.com/openvswitch/ovs/compare/6634cc8aed48...af683565bae8


More information about the git mailing list