[ovs-dev] [PATCH] conntrack: Fix NULL pointer dereference.

Ilya Maximets i.maximets at ovn.org
Wed Mar 18 12:49:48 UTC 2020


On 3/18/20 12:12 AM, William Tu wrote:
> Coverity CID 279957 reports NULL pointer derefence when
> 'conn' is NULL and calling ct_print_conn_info.
> 
> Cc: Usman Ansari <uansari at vmware.com>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---
>  lib/conntrack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index ff5a89457c0a..001a37ff6aff 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -1302,7 +1302,7 @@ process_one(struct conntrack *ct, struct dp_packet *pkt,
>              if (!conn) {
>                  pkt->md.ct_state |= CS_TRACKED | CS_INVALID;
>                  char *log_msg = xasprintf("Missing master conn %p", rev_conn);
> -                ct_print_conn_info(conn, log_msg, VLL_INFO, true, true);
> +                ct_print_conn_info(rev_conn, log_msg, VLL_INFO, true, true);
>                  free(log_msg);
>                  return;
>              }
> 

Hi.

This issue is addressed as part of the following patch:
  https://patchwork.ozlabs.org/patch/1249513/
I'm not sure if we need to split it and fix this issue separately.
Thoughts?

Best regards, Ilya Maximets.


More information about the dev mailing list