patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] cryptodev: fix cryptodev parameter parsing
@ 2020-10-08 19:42 Haggai Eran
  2020-10-09 17:51 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Haggai Eran @ 2020-10-08 19:42 UTC (permalink / raw)
  To: dev; +Cc: Akhil Goyal, Haggai Eran, stable, Declan Doherty

The rte_cryptodev_pmd_parse_input_args function crashes with a
segmentation fault when passing a non-empty argument string.

The function passes cryptodev_pmd_valid_params to rte_kvargs_parse,
which accepts a NULL-terminated list of valid keys, yet
cryptodev_pmd_valid_params does not end with NULL. The patch adds the
missing NULL pointer.

Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation")
Cc: stable@dpdk.org

Signed-off-by: Haggai Eran <haggaie@nvidia.com>
---
 lib/librte_cryptodev/rte_cryptodev_pmd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 81975d72b47a..1367222f7350 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -41,7 +41,8 @@
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	NULL
 };
 
 /**
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] cryptodev: fix cryptodev parameter parsing
  2020-10-08 19:42 [dpdk-stable] [PATCH] cryptodev: fix cryptodev parameter parsing Haggai Eran
@ 2020-10-09 17:51 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2020-10-09 17:51 UTC (permalink / raw)
  To: Haggai Eran, dev; +Cc: stable, Declan Doherty

> The rte_cryptodev_pmd_parse_input_args function crashes with a
> segmentation fault when passing a non-empty argument string.
> 
> The function passes cryptodev_pmd_valid_params to rte_kvargs_parse,
> which accepts a NULL-terminated list of valid keys, yet
> cryptodev_pmd_valid_params does not end with NULL. The patch adds the
> missing NULL pointer.
> 
> Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Haggai Eran <haggaie@nvidia.com>
> ---
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-09 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 19:42 [dpdk-stable] [PATCH] cryptodev: fix cryptodev parameter parsing Haggai Eran
2020-10-09 17: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).