patches for DPDK stable branches
 help / color / mirror / Atom feed
* [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

* Re: [dpdk-stable] [PATCH] crypto/dpaax_sec: fix a null pointer dereference after null check
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2020-10-06 20:37 UTC (permalink / raw)
  To: wangyunjian, dev; +Cc: Hemant Agrawal, jerry.lilijun, xudingke, 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
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.


^ 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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git