From: Timothy McDaniel <timothy.mcdaniel@intel.com>
To: jerinj@marvell.com
Cc: dev@dpdk.org, stable@dpdk.org
Subject: [PATCH] event/dlb2: fix QID inflight exploit
Date: Mon, 6 Jun 2022 11:03:11 -0500 [thread overview]
Message-ID: <20220606160311.1227058-1-timothy.mcdaniel@intel.com> (raw)
If QID inflights is set to an invalid value it can cause the
PMD to hang. This commit adds checks to make sure that the
value is valid before programming the hardware.
Fixes: 1857f1922ce2 ("event/dlb2: use new implementation of resource file")
Cc: stable@dpdk.org
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
drivers/event/dlb2/pf/base/dlb2_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c
index d4c49c2992..548bebd068 100644
--- a/drivers/event/dlb2/pf/base/dlb2_resource.c
+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c
@@ -3701,7 +3701,7 @@ dlb2_verify_create_ldb_queue_args(struct dlb2_hw *hw,
}
}
- if (args->num_qid_inflights > 4096) {
+ if (args->num_qid_inflights < 1 || args->num_qid_inflights > 2048) {
resp->status = DLB2_ST_INVALID_QID_INFLIGHT_ALLOCATION;
return -EINVAL;
}
--
2.25.1
next reply other threads:[~2022-06-06 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 16:03 Timothy McDaniel [this message]
2022-06-09 17:58 ` Jerin Jacob
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=20220606160311.1227058-1-timothy.mcdaniel@intel.com \
--to=timothy.mcdaniel@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.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).