* [PATCH] crypto/openssl: fix segfault due to uninitialized var
@ 2023-07-11 18:48 Gowrishankar Muthukrishnan
2023-07-12 5:30 ` Anoob Joseph
0 siblings, 1 reply; 3+ messages in thread
From: Gowrishankar Muthukrishnan @ 2023-07-11 18:48 UTC (permalink / raw)
To: dev
Cc: anoobj, Akhil Goyal, Kai Ji, tingtingx.liao, Gowrishankar Muthukrishnan
In some openSSL 3 libraries, uninitialized output variable
cause segfault. It is always nice to initialize it.
Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
Bugzilla ID: 1250
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 4569c5e62f..5e8624cebe 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2734,7 +2734,7 @@ process_openssl_sm2_op_evp(struct rte_crypto_op *cop,
case RTE_CRYPTO_ASYM_OP_ENCRYPT:
{
OSSL_PARAM *eparams = sess->u.sm2.params;
- size_t output_len;
+ size_t output_len = 0;
kctx = EVP_PKEY_CTX_new_id(EVP_PKEY_SM2, NULL);
if (kctx == NULL || EVP_PKEY_fromdata_init(kctx) <= 0 ||
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] crypto/openssl: fix segfault due to uninitialized var
2023-07-11 18:48 [PATCH] crypto/openssl: fix segfault due to uninitialized var Gowrishankar Muthukrishnan
@ 2023-07-12 5:30 ` Anoob Joseph
2023-07-12 16:48 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Anoob Joseph @ 2023-07-12 5:30 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan, dev
Cc: Akhil Goyal, Kai Ji, tingtingx.liao, Gowrishankar Muthukrishnan
>
> In some openSSL 3 libraries, uninitialized output variable cause segfault. It is
> always nice to initialize it.
>
> Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Bugzilla ID:
> 1250
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] crypto/openssl: fix segfault due to uninitialized var
2023-07-12 5:30 ` Anoob Joseph
@ 2023-07-12 16:48 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2023-07-12 16:48 UTC (permalink / raw)
To: Anoob Joseph, Gowrishankar Muthukrishnan, dev
Cc: Kai Ji, tingtingx.liao, Gowrishankar Muthukrishnan
> Subject: RE: [PATCH] crypto/openssl: fix segfault due to uninitialized var
>
> >
> > In some openSSL 3 libraries, uninitialized output variable cause segfault. It is
> > always nice to initialize it.
> >
> > Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Bugzilla ID:
> > 1250
> >
> > Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
Applied to dpdk-next-crypto
Thanks. Will be part of RC4, as RC3 is already tagged.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-12 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 18:48 [PATCH] crypto/openssl: fix segfault due to uninitialized var Gowrishankar Muthukrishnan
2023-07-12 5:30 ` Anoob Joseph
2023-07-12 16:48 ` 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).