patch 'dma/dpaa: fix out-of-bounds access in SG descriptor enqueue' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 20 19:03:52 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/22/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1f7a7bc89544b91970f16ff53e01cb76997e0e14
Thanks.
Luca Boccassi
---
>From 1f7a7bc89544b91970f16ff53e01cb76997e0e14 Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla at nxp.com>
Date: Mon, 13 Jul 2026 15:47:40 +0530
Subject: [PATCH] dma/dpaa: fix out-of-bounds access in SG descriptor enqueue
[ upstream commit 3f3a2d00752df45289a474267c12b94b2eabf1a3 ]
In fsl_qdma_enqueue_desc_sg(), the code accesses desc_ssge[num - 1]
without validating num first. If pending_num is 0, num will be 0 and
the access underflows. Add a bounds check to return -EINVAL when num
is 0 or exceeds FSL_QDMA_SG_MAX_ENTRY.
Fixes: a77261f61245 ("dma/dpaa: support scatter-gather")
Signed-off-by: Vanshika Shukla <vanshika.shukla at nxp.com>
---
drivers/dma/dpaa/dpaa_qdma.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index a541398e48..4fb924cf95 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2021-2024 NXP
+ * Copyright 2021-2026 NXP
*/
#include <bus_dpaa_driver.h>
@@ -827,6 +827,11 @@ eq_sg:
}
}
+ if (num == 0 || num > FSL_QDMA_SG_MAX_ENTRY) {
+ DPAA_QDMA_ERR("Invalid scatter-gather entry count: num=%u", num);
+ return -EINVAL;
+ }
+
ft->desc_ssge[num - 1].final = 1;
ft->desc_dsge[num - 1].final = 1;
csgf_src->length = total_len;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-20 18:03:25.815307105 +0100
+++ 0008-dma-dpaa-fix-out-of-bounds-access-in-SG-descriptor-e.patch 2026-07-20 18:03:25.500443159 +0100
@@ -1 +1 @@
-From 3f3a2d00752df45289a474267c12b94b2eabf1a3 Mon Sep 17 00:00:00 2001
+From 1f7a7bc89544b91970f16ff53e01cb76997e0e14 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f3a2d00752df45289a474267c12b94b2eabf1a3 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index a695f58bc5..e2cb157c43 100644
+index a541398e48..4fb924cf95 100644
More information about the stable
mailing list