[ovs-git] [openvswitch/ovs] fea883: odp-util: Fix a null pointer dereference in odp_ns...

wyjwang noreply at github.com
Thu Sep 16 00:50:08 UTC 2021


  Branch: refs/heads/branch-2.13
  Home:   https://github.com/openvswitch/ovs
  Commit: fea883d3bd855d3f9e58283eef817b12b0c12e69
      https://github.com/openvswitch/ovs/commit/fea883d3bd855d3f9e58283eef817b12b0c12e69
  Author: Yunjian Wang <wangyunjian at huawei.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Fix a null pointer dereference in odp_nsh_key_from_attr__().

This patch fixes (dereference after null check) coverity issue.
We should add null check of 'nsh_mask' to avoid passing NULL pointer
to memcpy() because the 'nsh_mask' maybe null.

Addresses-Coverity: ("Dereference after null check")
Fixes: 81fdabb94dd7 ("nsh: fix nested mask for OVS_KEY_ATTR_NSH")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Aaron Conole <aconole at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: b9b144b8d8e64c626232cd3bfdaca2ca8174c7a2
      https://github.com/openvswitch/ovs/commit/b9b144b8d8e64c626232cd3bfdaca2ca8174c7a2
  Author: Yunjian Wang <wangyunjian at huawei.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Fix a null pointer dereference in odp_flow_format().

This patch fixes (dereference after null check) coverity issue.
For this reason, we should add null check of 'mask' before calling
nl_attr_find__() because the 'mask' maybe null.

Addresses-Coverity: ("Dereference after null check")
Fixes: e6cc0babc25d ("ovs-dpctl: Add mega flow support")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Aaron Conole <aconole at redhat.com>
Acked-by: Vasu Dasari <vdasari at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 186ff2a5b2fa40dfdda46f0c6b2b189e393c2547
      https://github.com/openvswitch/ovs/commit/186ff2a5b2fa40dfdda46f0c6b2b189e393c2547
  Author: Yunjian Wang <wangyunjian at huawei.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M lib/pcap-file.c

  Log Message:
  -----------
  pcap-file: Fix memory leak in ovs_pcap_open().

In ovs_pcap_open(), we allocate memory for the 'p_file'
structure but not released when fopen fails.

Addresses-Coverity: ("Resource leak")
Fixes: b6e840aed03e ("pcap-file: Add nanosecond resolution pcap support.")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Aaron Conole <aconole at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: a56a8008eb99e750f666b9bc7db994e54ae324c7
      https://github.com/openvswitch/ovs/commit/a56a8008eb99e750f666b9bc7db994e54ae324c7
  Author: Yunjian Wang <wangyunjian at huawei.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M lib/netdev-linux.c

  Log Message:
  -----------
  netdev-linux: Fix a null pointer dereference in netdev_linux_notify_sock().

If nl_sock_join_mcgroup() returns an error, the 'sock' is freed and
set to NULL. This issues will lead to null pointer deference in
nl_sock_listen_all_nsid(). To fix it, we call nl_sock_listen_all_nsid()
before joining the mcgroups.

Fixes: cf114a7fce80 ("netlink linux: enable listening to all nsids")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Flavio Leitner <fbl at sysclose.org>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/ef6d151b043f...a56a8008eb99


More information about the git mailing list