patch 'net/gve: validate Tx packet before sending' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Oct 31 15:32:14 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/25. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/055812afeb5c0efb6bd234104518652f958ab856

Thanks.

Kevin

---
>From 055812afeb5c0efb6bd234104518652f958ab856 Mon Sep 17 00:00:00 2001
From: Joshua Washington <joshwash at google.com>
Date: Mon, 7 Jul 2025 16:18:08 -0700
Subject: [PATCH] net/gve: validate Tx packet before sending

[ upstream commit f33ce4445ee6bc8f6d2ea4d894511f5446e9e3a2 ]

The hardware assumes that a mismatch between the reported packet length
and the total amount of data in the descriptors is caused by a malicious
driver, leading the hardware to disable transmission altogether. To
avoid such a scenario, use rte_mbuf_check to validate that the mbuf is
correctly formed before processing.

Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO")

Signed-off-by: Joshua Washington <joshwash at google.com>
Reviewed-by: Ankit Garg <nktgrg at google.com>
---
 drivers/net/gve/gve_tx_dqo.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index b2e5aae634..7e03e75b20 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -114,4 +114,6 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	struct rte_mbuf *tx_pkt;
 	uint16_t mask, sw_mask;
+	uint16_t first_sw_id;
+	const char *reason;
 	uint16_t nb_tx = 0;
 	uint64_t ol_flags;
@@ -120,5 +122,4 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint16_t sw_id;
 	uint64_t bytes;
-	uint16_t first_sw_id;
 	uint8_t tso;
 	uint8_t csum;
@@ -140,4 +141,10 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 					       txq->rs_thresh);
 
+
+		if (rte_mbuf_check(tx_pkt, true, &reason)) {
+			PMD_DRV_LOG(DEBUG, "Invalid mbuf: %s", reason);
+			break;
+		}
+
 		ol_flags = tx_pkt->ol_flags;
 		first_sw_id = sw_id;
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-31 13:53:52.658914418 +0000
+++ 0012-net-gve-validate-Tx-packet-before-sending.patch	2025-10-31 13:53:52.017523309 +0000
@@ -1 +1 @@
-From f33ce4445ee6bc8f6d2ea4d894511f5446e9e3a2 Mon Sep 17 00:00:00 2001
+From 055812afeb5c0efb6bd234104518652f958ab856 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f33ce4445ee6bc8f6d2ea4d894511f5446e9e3a2 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list