patches for DPDK stable branches
 help / color / 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, back to index

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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://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/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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