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

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


  Branch: refs/heads/branch-2.12
  Home:   https://github.com/openvswitch/ovs
  Commit: 3d374b854d8226041009a84dcbf52893f659e6c0
      https://github.com/openvswitch/ovs/commit/3d374b854d8226041009a84dcbf52893f659e6c0
  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: 1de5188adc9b96528d78f8a95377b47d2fbf6dd9
      https://github.com/openvswitch/ovs/commit/1de5188adc9b96528d78f8a95377b47d2fbf6dd9
  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: a849d2caea9e8a7ad0d8fcbf9aca680d644fd6cd
      https://github.com/openvswitch/ovs/commit/a849d2caea9e8a7ad0d8fcbf9aca680d644fd6cd
  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: 105874d7d94942bfdf56f6f36c4f70ca8fe7f1db
      https://github.com/openvswitch/ovs/commit/105874d7d94942bfdf56f6f36c4f70ca8fe7f1db
  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/b8703aad78cd...105874d7d949


More information about the git mailing list