* [PATCH] crypto/qat: fix ccm null aad pointer segfault
@ 2024-03-08 8:25 Arkadiusz Kusztal
2024-03-11 14:35 ` Power, Ciara
0 siblings, 1 reply; 3+ messages in thread
From: Arkadiusz Kusztal @ 2024-03-08 8:25 UTC (permalink / raw)
To: dev; +Cc: gakhil, ciara.power, Arkadiusz Kusztal, stable
This commit fixes a segfault, that occurs when NULL pointer
is being set to the aad pointer field.
Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")
Cc: stable@dpdk.org
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index eebf2e6eb8..83a6c30218 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -881,10 +881,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,
*(uint8_t *)&cipher_param->u.cipher_IV_array[0] =
q - ICP_QAT_HW_CCM_NONCE_OFFSET;
- rte_memcpy((uint8_t *)aad->va +
- ICP_QAT_HW_CCM_NONCE_OFFSET,
- (uint8_t *)iv->va + ICP_QAT_HW_CCM_NONCE_OFFSET,
- ctx->cipher_iv.length);
+ if (ctx->aad_len > 0) {
+ rte_memcpy((uint8_t *)aad->va +
+ ICP_QAT_HW_CCM_NONCE_OFFSET,
+ (uint8_t *)iv->va + ICP_QAT_HW_CCM_NONCE_OFFSET,
+ ctx->cipher_iv.length);
+ }
break;
default:
break;
--
2.13.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] crypto/qat: fix ccm null aad pointer segfault
2024-03-08 8:25 [PATCH] crypto/qat: fix ccm null aad pointer segfault Arkadiusz Kusztal
@ 2024-03-11 14:35 ` Power, Ciara
2024-03-13 14:51 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Power, Ciara @ 2024-03-11 14:35 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev; +Cc: gakhil, stable
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Friday, March 8, 2024 8:25 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Power, Ciara <ciara.power@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>; stable@dpdk.org
> Subject: [PATCH] crypto/qat: fix ccm null aad pointer segfault
>
> This commit fixes a segfault, that occurs when NULL pointer is being set to the
> aad pointer field.
>
> Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")
> Cc: stable@dpdk.org
>
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
The CI fail looks to be unrelated to this patch:
70/112 DPDK:fast-tests / pcapng_autotest FAIL 6.39s (exit status 255 or signal 127 SIGinvalid)
Ok: 101
Expected Fail: 0
Fail: 1
Acked-by: Ciara Power <ciara.power@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] crypto/qat: fix ccm null aad pointer segfault
2024-03-11 14:35 ` Power, Ciara
@ 2024-03-13 14:51 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2024-03-13 14:51 UTC (permalink / raw)
To: Power, Ciara, Kusztal, ArkadiuszX, dev; +Cc: stable
> > Subject: [PATCH] crypto/qat: fix ccm null aad pointer segfault
> >
> > This commit fixes a segfault, that occurs when NULL pointer is being set to the
> > aad pointer field.
> >
> > Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> > ---
> > drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
>
>
> The CI fail looks to be unrelated to this patch:
>
> 70/112 DPDK:fast-tests / pcapng_autotest FAIL 6.39s (exit status
> 255 or signal 127 SIGinvalid)
>
> Ok: 101
> Expected Fail: 0
> Fail: 1
>
>
> Acked-by: Ciara Power <ciara.power@intel.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-13 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 8:25 [PATCH] crypto/qat: fix ccm null aad pointer segfault Arkadiusz Kusztal
2024-03-11 14:35 ` Power, Ciara
2024-03-13 14:51 ` 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).