[dpdk-stable] patch 'crypto/dpaa_sec: fix a null pointer dereference' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:03 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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 10/30/20. 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 rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From a1d4781f98130649437ee812533776cb8c0c58d8 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Sat, 5 Sep 2020 18:26:02 +0800
Subject: [PATCH] crypto/dpaa_sec: fix a null pointer dereference

[ upstream commit 8839c8a1f79e722be6397590bd7d255972a398b4 ]

This patch fixes a null pointer dereference after null check detected by
coverity scan.

Coverity issue: 349904
Fixes: 6a0c9d364afc ("crypto/dpaax_sec: support HFN override")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 35f1feac44..a650313cdb 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2959,7 +2959,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
 	session->pdcp.hfn = pdcp_xform->hfn;
 	session->pdcp.hfn_threshold = pdcp_xform->hfn_threshold;
 	session->pdcp.hfn_ovd = pdcp_xform->hfn_ovrd;
-	session->pdcp.hfn_ovd_offset = cipher_xform->iv.offset;
+	if (cipher_xform)
+		session->pdcp.hfn_ovd_offset = cipher_xform->iv.offset;
 
 	rte_spinlock_lock(&dev_priv->lock);
 	for (i = 0; i < MAX_DPAA_CORES; i++) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.210650780 +0000
+++ 0144-crypto-dpaa_sec-fix-a-null-pointer-dereference.patch	2020-10-28 10:35:11.728833321 +0000
@@ -1,14 +1,15 @@
-From 8839c8a1f79e722be6397590bd7d255972a398b4 Mon Sep 17 00:00:00 2001
+From a1d4781f98130649437ee812533776cb8c0c58d8 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Sat, 5 Sep 2020 18:26:02 +0800
 Subject: [PATCH] crypto/dpaa_sec: fix a null pointer dereference
 
+[ upstream commit 8839c8a1f79e722be6397590bd7d255972a398b4 ]
+
 This patch fixes a null pointer dereference after null check detected by
 coverity scan.
 
 Coverity issue: 349904
 Fixes: 6a0c9d364afc ("crypto/dpaax_sec: support HFN override")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index 97002170b0..0495422a4c 100644
+index 35f1feac44..a650313cdb 100644
 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
 +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -2949,7 +2949,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -2959,7 +2959,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
  	session->pdcp.hfn = pdcp_xform->hfn;
  	session->pdcp.hfn_threshold = pdcp_xform->hfn_threshold;
  	session->pdcp.hfn_ovd = pdcp_xform->hfn_ovrd;


More information about the stable mailing list