* [dpdk-stable] [PATCH] crypto/dpaax_sec: fix a null pointer dereference after null check
@ 2020-09-05 10:26 wangyunjian
2020-10-06 20:37 ` Akhil Goyal
0 siblings, 1 reply; 2+ messages in thread
From: wangyunjian @ 2020-09-05 10:26 UTC (permalink / raw)
To: dev
Cc: akhil.goyal, hemant.agrawal, jerry.lilijun, xudingke,
Yunjian Wang, stable
From: Yunjian Wang <wangyunjian@huawei.com>
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@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.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 c4339336d..fa42c9906 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,
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.18.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-06 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 10:26 [dpdk-stable] [PATCH] crypto/dpaax_sec: fix a null pointer dereference after null check wangyunjian
2020-10-06 20:37 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).