* [PATCH] examples/fips_validation: fix dangling pointer for SHA test @ 2025-08-28 9:28 Emma Finn 2025-08-28 9:42 ` [EXTERNAL] " Gowrishankar Muthukrishnan 0 siblings, 1 reply; 9+ messages in thread From: Emma Finn @ 2025-08-28 9:28 UTC (permalink / raw) To: Gowrishankar Muthukrishnan; +Cc: dev, kai.ji, Emma Finn Set vector pointer to NULL after free to avoid calling rte_free() on the same pointer twice in some cases. Signed-off-by: Emma Finn <emma.finn@intel.com> --- examples/fips_validation/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index f21826e9d7..60ee9f8dd4 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -2612,7 +2612,7 @@ fips_mct_sha_test(void) rte_free(md[i].val); rte_free(vec.pt.val); - + vec.pt.val = NULL; rte_free(val.val); return 0; } -- 2.34.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-28 9:28 [PATCH] examples/fips_validation: fix dangling pointer for SHA test Emma Finn @ 2025-08-28 9:42 ` Gowrishankar Muthukrishnan 2025-08-29 10:18 ` Finn, Emma 0 siblings, 1 reply; 9+ messages in thread From: Gowrishankar Muthukrishnan @ 2025-08-28 9:42 UTC (permalink / raw) To: Emma Finn; +Cc: dev, kai.ji > Set vector pointer to NULL after free to avoid calling rte_free() on the same > pointer twice in some cases. > > Signed-off-by: Emma Finn <emma.finn@intel.com> > --- > examples/fips_validation/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c > index f21826e9d7..60ee9f8dd4 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -2612,7 +2612,7 @@ fips_mct_sha_test(void) > rte_free(md[i].val); > > rte_free(vec.pt.val); > - > + vec.pt.val = NULL; Same could be the case for fips_mct_shake_test also. Thanks, Gowrishankar > rte_free(val.val); > return 0; > } > -- > 2.34.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-28 9:42 ` [EXTERNAL] " Gowrishankar Muthukrishnan @ 2025-08-29 10:18 ` Finn, Emma 2025-08-29 10:23 ` Gowrishankar Muthukrishnan 0 siblings, 1 reply; 9+ messages in thread From: Finn, Emma @ 2025-08-29 10:18 UTC (permalink / raw) To: Gowrishankar Muthukrishnan; +Cc: dev, Ji, Kai > -----Original Message----- > From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com> > Sent: Thursday 28 August 2025 10:42 > To: Finn, Emma <emma.finn@intel.com> > Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com> > Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling > pointer for SHA test > > > Set vector pointer to NULL after free to avoid calling rte_free() on > > the same pointer twice in some cases. > > > > Signed-off-by: Emma Finn <emma.finn@intel.com> > > --- > > examples/fips_validation/main.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/examples/fips_validation/main.c > > b/examples/fips_validation/main.c index f21826e9d7..60ee9f8dd4 100644 > > --- a/examples/fips_validation/main.c > > +++ b/examples/fips_validation/main.c > > @@ -2612,7 +2612,7 @@ fips_mct_sha_test(void) > > rte_free(md[i].val); > > > > rte_free(vec.pt.val); > > - > > + vec.pt.val = NULL; > > Same could be the case for fips_mct_shake_test also. > Good catch, probably the same could happen with shake. I currently don’t have a way to test shake but I'm happy to make the change as part of this patch if you can test? Thanks, Emma > Thanks, > Gowrishankar > > rte_free(val.val); > > return 0; > > } > > -- > > 2.34.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-29 10:18 ` Finn, Emma @ 2025-08-29 10:23 ` Gowrishankar Muthukrishnan 2025-08-29 10:40 ` Finn, Emma 0 siblings, 1 reply; 9+ messages in thread From: Gowrishankar Muthukrishnan @ 2025-08-29 10:23 UTC (permalink / raw) To: Finn, Emma; +Cc: dev, Ji, Kai > > > rte_free(vec.pt.val); > > > - > > > + vec.pt.val = NULL; > > > > Same could be the case for fips_mct_shake_test also. > > > Good catch, probably the same could happen with shake. > I currently don’t have a way to test shake but I'm happy to make the change as > part of this patch if you can test? > Did you find any segfault and so got to know the problem ? If so, what was the command you executed ?. Thanks, Gowrishankar ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-29 10:23 ` Gowrishankar Muthukrishnan @ 2025-08-29 10:40 ` Finn, Emma 2025-08-29 12:16 ` Gowrishankar Muthukrishnan 0 siblings, 1 reply; 9+ messages in thread From: Finn, Emma @ 2025-08-29 10:40 UTC (permalink / raw) To: Gowrishankar Muthukrishnan; +Cc: dev, Ji, Kai > -----Original Message----- > From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com> > Sent: Friday 29 August 2025 11:23 > To: Finn, Emma <emma.finn@intel.com> > Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com> > Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer > for SHA test > Importance: High > > > > > rte_free(vec.pt.val); > > > > - > > > > + vec.pt.val = NULL; > > > > > > Same could be the case for fips_mct_shake_test also. > > > > > Good catch, probably the same could happen with shake. > > I currently don’t have a way to test shake but I'm happy to make the > > change as part of this patch if you can test? > > > Did you find any segfault and so got to know the problem ? If so, what was the > command you executed ?. > > Thanks, > Gowrishankar Running fips sample app with aesni_mb and SHA ACVP test vector files. Also occurs with QAT. ./dpdk-fips_validation --vdev=crypto_aesni_mb -- --req-file $FIPS_DIR/$alg/req --rsp-file $FIPS_DIR/$alg/resp_aesni_mb --path-is-folder Output shows invalid memory bug. EAL: Detected CPU lcores: 64 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) CRYPTODEV: Creating cryptodev crypto_aesni_mb CRYPTODEV: Initialisation parameters - name: crypto_aesni_mb,socket id: 0, max queue pairs: 8 IPSEC_MB: ipsec_mb_create() line 168: IPSec Multi-buffer library version used: 2.0.0 EAL: Error: Invalid memory SHAKE is not supported by these hence I did not catch it. Thanks, Emma ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-29 10:40 ` Finn, Emma @ 2025-08-29 12:16 ` Gowrishankar Muthukrishnan 2025-08-29 13:14 ` Finn, Emma 0 siblings, 1 reply; 9+ messages in thread From: Gowrishankar Muthukrishnan @ 2025-08-29 12:16 UTC (permalink / raw) To: Finn, Emma; +Cc: dev, Ji, Kai > SHAKE is not supported by these hence I did not catch it. OpenSSL PMD supports SHA and SHAKE. Could that help verifying both lines of fix ?. Thanks, Gowrishankar. ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-29 12:16 ` Gowrishankar Muthukrishnan @ 2025-08-29 13:14 ` Finn, Emma 2025-10-15 15:53 ` Ji, Kai 0 siblings, 1 reply; 9+ messages in thread From: Finn, Emma @ 2025-08-29 13:14 UTC (permalink / raw) To: Gowrishankar Muthukrishnan; +Cc: dev, Ji, Kai > -----Original Message----- > From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com> > Sent: Friday 29 August 2025 13:17 > To: Finn, Emma <emma.finn@intel.com> > Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com> > Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer > for SHA test > Importance: High > > > SHAKE is not supported by these hence I did not catch it. > > OpenSSL PMD supports SHA and SHAKE. Could that help verifying both lines of fix > ?. > > Thanks, > Gowrishankar. OpenSSL PMD only supports SHAKE-256 for EdDSA operations, not as standalone hash functions ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-08-29 13:14 ` Finn, Emma @ 2025-10-15 15:53 ` Ji, Kai 2025-10-22 5:22 ` Gowrishankar Muthukrishnan 0 siblings, 1 reply; 9+ messages in thread From: Ji, Kai @ 2025-10-15 15:53 UTC (permalink / raw) To: Finn, Emma, Gowrishankar Muthukrishnan; +Cc: dev [-- Attachment #1: Type: text/plain, Size: 1060 bytes --] Hi Gowrishankar, Have you get a chance to test this patch against SHAKE on your ends ? Regards Kai ________________________________ From: Finn, Emma <emma.finn@intel.com> Sent: Friday, August 29, 2025 14:14 To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com> Cc: dev@dpdk.org <dev@dpdk.org>; Ji, Kai <kai.ji@intel.com> Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test > -----Original Message----- > From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com> > Sent: Friday 29 August 2025 13:17 > To: Finn, Emma <emma.finn@intel.com> > Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com> > Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer > for SHA test > Importance: High > > > SHAKE is not supported by these hence I did not catch it. > > OpenSSL PMD supports SHA and SHAKE. Could that help verifying both lines of fix > ?. > > Thanks, > Gowrishankar. OpenSSL PMD only supports SHAKE-256 for EdDSA operations, not as standalone hash functions [-- Attachment #2: Type: text/html, Size: 2864 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test 2025-10-15 15:53 ` Ji, Kai @ 2025-10-22 5:22 ` Gowrishankar Muthukrishnan 0 siblings, 0 replies; 9+ messages in thread From: Gowrishankar Muthukrishnan @ 2025-10-22 5:22 UTC (permalink / raw) To: Ji, Kai, Finn, Emma; +Cc: dev [-- Attachment #1: Type: text/plain, Size: 2354 bytes --] Hi, I see example app runs normally with openssl PMD in my local tests, even without fix. Thanks, Gowrishankar From: Ji, Kai <kai.ji@intel.com> Sent: Wednesday, October 15, 2025 9:23 PM To: Finn, Emma <emma.finn@intel.com>; Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com> Cc: dev@dpdk.org Subject: Re: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test Hi Gowrishankar, Have you get a chance to test this patch against SHAKE on your ends ? Regards Kai From: Finn, Emma <emma. finn@ intel. com> Sent: Friday, August 29, 2025 14: 14 To: Gowrishankar Muthukrishnan <gmuthukrishn@ marvell. com> ZjQcmQRYFpfptBannerStart Prioritize security for external emails: Confirm sender and content safety before clicking links or opening attachments Report Suspicious <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/CRVmXkqW!ui3XGZ9YrjX626H8WV37YM2aa0G6UhN-cKsdbpw7pqWvplKrDOohK8dxT6B9_RqNiV6uMomo_2pTJiWsEIfe_ZdA07-kBAy14DcmaeM7eRLbMeeoTtyqbMs3d2Q0-a5r77yEbIlkHnqjs8o$> ZjQcmQRYFpfptBannerEnd Hi Gowrishankar, Have you get a chance to test this patch against SHAKE on your ends ? Regards Kai ________________________________ From: Finn, Emma <emma.finn@intel.com<mailto:emma.finn@intel.com>> Sent: Friday, August 29, 2025 14:14 To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com<mailto:gmuthukrishn@marvell.com>> Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>; Ji, Kai <kai.ji@intel.com<mailto:kai.ji@intel.com>> Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test > -----Original Message----- > From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com<mailto:gmuthukrishn@marvell.com>> > Sent: Friday 29 August 2025 13:17 > To: Finn, Emma <emma.finn@intel.com<mailto:emma.finn@intel.com>> > Cc: dev@dpdk.org<mailto:dev@dpdk.org>; Ji, Kai <kai.ji@intel.com<mailto:kai.ji@intel.com>> > Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer > for SHA test > Importance: High > > > SHAKE is not supported by these hence I did not catch it. > > OpenSSL PMD supports SHA and SHAKE. Could that help verifying both lines of fix > ?. > > Thanks, > Gowrishankar. OpenSSL PMD only supports SHAKE-256 for EdDSA operations, not as standalone hash functions [-- Attachment #2: Type: text/html, Size: 10212 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-10-22 5:22 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-08-28 9:28 [PATCH] examples/fips_validation: fix dangling pointer for SHA test Emma Finn 2025-08-28 9:42 ` [EXTERNAL] " Gowrishankar Muthukrishnan 2025-08-29 10:18 ` Finn, Emma 2025-08-29 10:23 ` Gowrishankar Muthukrishnan 2025-08-29 10:40 ` Finn, Emma 2025-08-29 12:16 ` Gowrishankar Muthukrishnan 2025-08-29 13:14 ` Finn, Emma 2025-10-15 15:53 ` Ji, Kai 2025-10-22 5:22 ` Gowrishankar Muthukrishnan
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).