From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46575A04F0 for ; Tue, 10 Dec 2019 16:01:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D07D1B13C; Tue, 10 Dec 2019 16:01:36 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 2EC6A1B13C for ; Tue, 10 Dec 2019 16:01:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9vi7X5DEX7Hk3QBUk0ucn3GLMWE7wAqymr0+3RDr8pU=; b=R+6zZ9FuCsAosLp3Srk679OXWaO5xRQS5xskssSWloiD4qw+Xdt1Jbvn3wKxSTY3DIAj6C ARBNQ4Lb+8fiYiFajln/xE5YmuTVHn+MtLIok7nXXbjw7qKETXm4j0Xb1w28ihxI1ypQd4 6RI6024I9135G8qlRPUrE6qMeHkBS7M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-JALEvAjEOq2qXZpJunyzrQ-1; Tue, 10 Dec 2019 10:01:33 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C6028005AF for ; Tue, 10 Dec 2019 15:01:32 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2301D5DA82; Tue, 10 Dec 2019 15:01:22 +0000 (UTC) From: Kevin Traynor To: Kevin Traynor Cc: David Marchand , dpdk stable Date: Tue, 10 Dec 2019 14:59:25 +0000 Message-Id: <20191210145937.32755-51-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: JALEvAjEOq2qXZpJunyzrQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'common/cpt: fix possible null dereference' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/16/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/3f6ffc1f80b9f030df= 2cb7518001058b7e65d32d Thanks. Kevin. --- >From 3f6ffc1f80b9f030df2cb7518001058b7e65d32d Mon Sep 17 00:00:00 2001 From: Kevin Traynor Date: Wed, 6 Nov 2019 19:01:57 +0000 Subject: [PATCH] common/cpt: fix possible null dereference [ upstream commit 01c65002b7153b4a111c77854715d535c0b6e851 ] Coverity complains that ctrl_flags is set to NULL at the start of the function and it may not have been set before there is a jump to fc_success and it is dereferenced. Check for NULL before dereference. 312fc_success: CID 344983 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)7. var_deref_op: Dereferencing null pointer ctrl_flags. 313 *ctrl_flags =3D rte_cpu_to_be_64(*ctrl_flags); Coverity issue: 344983 Fixes: 6cc54096520d ("crypto/octeontx: add supported sessions") Signed-off-by: Kevin Traynor Reviewed-by: David Marchand --- drivers/common/cpt/cpt_ucode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.= h index d408d50e3..f0632caf6 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -316,5 +316,6 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, uint= 8_t *key, =20 fc_success: -=09*ctrl_flags =3D rte_cpu_to_be_64(*ctrl_flags); +=09if (ctrl_flags !=3D NULL) +=09=09*ctrl_flags =3D rte_cpu_to_be_64(*ctrl_flags); =20 success: --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:42.460827448 +0000 +++ 0051-common-cpt-fix-possible-null-dereference.patch=092019-12-10 14:49:= 39.086457133 +0000 @@ -1 +1 @@ -From 01c65002b7153b4a111c77854715d535c0b6e851 Mon Sep 17 00:00:00 2001 +From 3f6ffc1f80b9f030df2cb7518001058b7e65d32d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 01c65002b7153b4a111c77854715d535c0b6e851 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 0dac12ee3..d5a0135d7 100644 +index d408d50e3..f0632caf6 100644 @@ -31 +32 @@ -@@ -311,5 +311,6 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, con= st uint8_t *key, +@@ -316,5 +316,6 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, uin= t8_t *key,