{"id":1977882,"url":"http://patchwork.ozlabs.org/api/patches/1977882/","web_url":"http://patchwork.ozlabs.org/project/openvswitch/patch/948e855448fbaa994e45e06e76b9eef037a95b25.1724849996.git.echaudro@redhat.com/","project":{"id":47,"url":"http://patchwork.ozlabs.org/api/projects/47/","name":"Open vSwitch","link_name":"openvswitch","list_id":"ovs-dev.openvswitch.org","list_email":"ovs-dev@openvswitch.org","web_url":"http://openvswitch.org/","scm_url":"git@github.com:openvswitch/ovs.git","webscm_url":"https://github.com/openvswitch/ovs","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<948e855448fbaa994e45e06e76b9eef037a95b25.1724849996.git.echaudro@redhat.com>","list_archive_url":null,"date":"2024-08-28T13:28:40","name":"[ovs-dev,3/7] dpif: Fix potential NULL pointer access in log_flow_message().","commit_ref":"c9036248853f7c62b1f86aba87111a7d2e0c16b7","pull_url":null,"state":"accepted","archived":false,"hash":"3a196968c39a651874df750360f1bbffcae792d5","submitter":{"id":70613,"url":"http://patchwork.ozlabs.org/api/people/70613/","name":"Eelco Chaudron","email":"echaudro@redhat.com"},"delegate":{"id":75123,"url":"http://patchwork.ozlabs.org/api/users/75123/","username":"echaudron","first_name":"Eelco","last_name":"Chaudron","email":"echaudro@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/openvswitch/patch/948e855448fbaa994e45e06e76b9eef037a95b25.1724849996.git.echaudro@redhat.com/mbox/","series":[{"id":421331,"url":"http://patchwork.ozlabs.org/api/series/421331/","web_url":"http://patchwork.ozlabs.org/project/openvswitch/list/?series=421331","date":"2024-08-28T13:28:37","name":"Series fixing some issues reported by Coverity.","version":1,"mbox":"http://patchwork.ozlabs.org/series/421331/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/1977882/comments/","check":"fail","checks":"http://patchwork.ozlabs.org/api/patches/1977882/checks/","tags":{},"related":[],"headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ovs-dev@lists.linuxfoundation.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KkjEZlTE;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)","smtp1.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KkjEZlTE","smtp2.osuosl.org;\n dmarc=pass (p=none dis=none) header.from=redhat.com","smtp2.osuosl.org; dkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KkjEZlTE"],"Received":["from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4Wv4yZ6KTNz1yZd\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 28 Aug 2024 23:29:42 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 91A8780D5B;\n\tWed, 28 Aug 2024 13:29:37 +0000 (UTC)","from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 9Qt3KOinFwCi; Wed, 28 Aug 2024 13:29:36 +0000 (UTC)","from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id DDA2380C32;\n\tWed, 28 Aug 2024 13:29:33 +0000 (UTC)","from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 4A023C07E7;\n\tWed, 28 Aug 2024 13:29:33 +0000 (UTC)","from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 3697CC07E8\n for <dev@openvswitch.org>; Wed, 28 Aug 2024 13:29:30 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 2172A40BAF\n for <dev@openvswitch.org>; Wed, 28 Aug 2024 13:29:30 +0000 (UTC)","from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id WHuMGzOcMmkc for <dev@openvswitch.org>;\n Wed, 28 Aug 2024 13:29:29 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 0350D4012A\n for <dev@openvswitch.org>; Wed, 28 Aug 2024 13:29:28 +0000 (UTC)","from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-680-RztL0XLEO0WtR7voEaGuzA-1; Wed,\n 28 Aug 2024 09:29:26 -0400","from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 00D3D1954B1E\n for <dev@openvswitch.org>; Wed, 28 Aug 2024 13:29:26 +0000 (UTC)","from localhost.localdomain (unknown [10.39.194.72])\n by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 06C9819560AA\n for <dev@openvswitch.org>; Wed, 28 Aug 2024 13:29:24 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp1.osuosl.org DDA2380C32","OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0350D4012A"],"Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=echaudro@redhat.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp2.osuosl.org 0350D4012A","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1724851768;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=ck7RBFrvfoiMFlOJa4E/PEyqNlPeppa8UroVuL3IHf0=;\n b=KkjEZlTED3N3EPgX0N2U8wjekygvCLSMCnAHf3HJEn4lMZoCbMmJeooL+zn912w8UNNOT2\n efJjdJ1/Fs7MhUUrBB3htWzWar0GYPpwRG3+y3U75BN7HXw2/jG7GuHRJPeK/MXJlQWIHH\n lSv0M8tyCyJEOuT/5zTngHfq2gj4OGM=","X-MC-Unique":"RztL0XLEO0WtR7voEaGuzA-1","From":"Eelco Chaudron <echaudro@redhat.com>","To":"dev@openvswitch.org","Date":"Wed, 28 Aug 2024 15:28:40 +0200","Message-ID":"\n <948e855448fbaa994e45e06e76b9eef037a95b25.1724849996.git.echaudro@redhat.com>","In-Reply-To":"<cover.1724849996.git.echaudro@redhat.com>","References":"<cover.1724849996.git.echaudro@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.15","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Subject":"[ovs-dev] [PATCH 3/7] dpif: Fix potential NULL pointer access in\n log_flow_message().","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ovs-dev-bounces@openvswitch.org","Sender":"\"dev\" <ovs-dev-bounces@openvswitch.org>"},"content":"When actions is NULL and action_len is not zero, it would\npotentially allow format_odp_actions() to dereference the\nNULL pointer. The fix will check for valid actions pointer\nonly, as format_odp_actions() will handle a zero length.\n\nFixes: cdee00fd635d (\"datapath: Replace \"struct odp_action\" by Netlink attributes.\")\nSigned-off-by: Eelco Chaudron <echaudro@redhat.com>\n---\n lib/dpif.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/lib/dpif.c b/lib/dpif.c\nindex ab633fd27..245c8b5ee 100644\n--- a/lib/dpif.c\n+++ b/lib/dpif.c\n@@ -1810,7 +1810,7 @@ log_flow_message(const struct dpif *dpif, int error,\n         ds_put_cstr(&ds, \", \");\n         dpif_flow_stats_format(stats, &ds);\n     }\n-    if (actions || actions_len) {\n+    if (actions) {\n         ds_put_cstr(&ds, \", actions:\");\n         format_odp_actions(&ds, actions, actions_len, NULL);\n     }\n","prefixes":["ovs-dev","3/7"]}