DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: Kai Ji <kai.ji@intel.com>
Cc: dev@dpdk.org, Ciara Power <ciara.power@intel.com>,
	fanzhang.oss@gmail.com, stable@dpdk.org
Subject: [PATCH] crypto/scheduler: fix last element for valid args
Date: Fri, 14 Apr 2023 12:33:06 +0000	[thread overview]
Message-ID: <20230414123306.575977-1-ciara.power@intel.com> (raw)

The list of valid arguments for Scheduler PMD should be terminated with
a NULL entry, as expected by rte_kvargs_parse.

Without this, if an invalid key name was used, a global buffer overflow
occurred resulting in a segmentation fault.

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Cc: fanzhang.oss@gmail.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/scheduler/scheduler_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 9d1ce46622..4e8bbf0e09 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -50,7 +50,8 @@ static const char * const scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
-	RTE_CRYPTODEV_VDEV_CORELIST
+	RTE_CRYPTODEV_VDEV_CORELIST,
+	NULL
 };
 
 struct scheduler_parse_map {
-- 
2.25.1


             reply	other threads:[~2023-04-14 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 12:33 Ciara Power [this message]
2023-04-14 13:22 ` Ji, Kai
2023-05-03  7:35   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230414123306.575977-1-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=kai.ji@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).