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

Shani Peretz shperetz at nvidia.com
Sun Dec 21 15:55:59 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.6

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/fb86f067ccce9322e3bdf063271f8abf28757e1a

Thanks.

Shani

---
>From fb86f067ccce9322e3bdf063271f8abf28757e1a 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 b9914fb799..9550fe58c7 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -84,13 +84,14 @@ 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 nb_to_clean;
+	uint16_t first_sw_id;
+	const char *reason;
 	uint16_t nb_tx = 0;
 	uint64_t ol_flags;
 	uint16_t nb_used;
 	uint16_t tx_id;
 	uint16_t sw_id;
 	uint64_t bytes;
-	uint16_t first_sw_id;
 	uint8_t csum;
 
 	sw_ring = txq->sw_ring;
@@ -114,6 +115,12 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		if (txq->nb_free < tx_pkt->nb_segs)
 			break;
 
+
+		if (rte_mbuf_check(tx_pkt, true, &reason)) {
+			PMD_DRV_LOG(DEBUG, "Invalid mbuf: %s", reason);
+			break;
+		}
+
 		ol_flags = tx_pkt->ol_flags;
 		nb_used = tx_pkt->nb_segs;
 		first_sw_id = sw_id;
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-12-21 16:54:17.936223891 +0200
+++ 0011-net-gve-validate-Tx-packet-before-sending.patch	2025-12-21 16:54:16.669063000 +0200
@@ -1 +1 @@
-From f33ce4445ee6bc8f6d2ea4d894511f5446e9e3a2 Mon Sep 17 00:00:00 2001
+From fb86f067ccce9322e3bdf063271f8abf28757e1a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f33ce4445ee6bc8f6d2ea4d894511f5446e9e3a2 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index b2e5aae634..7e03e75b20 100644
+index b9914fb799..9550fe58c7 100644
@@ -25,2 +26 @@
-@@ -113,13 +113,14 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
- 	struct rte_mbuf **sw_ring;
+@@ -84,13 +84,14 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -28,0 +29 @@
+ 	uint16_t nb_to_clean;
@@ -33 +34 @@
- 	uint16_t nb_descs;
+ 	uint16_t nb_used;
@@ -38 +38,0 @@
- 	uint8_t tso;
@@ -41,3 +41,4 @@
-@@ -139,6 +140,12 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
- 			gve_tx_clean_descs_dqo(txq, DQO_TX_MULTIPLIER *
- 					       txq->rs_thresh);
+ 	sw_ring = txq->sw_ring;
+@@ -114,6 +115,12 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+ 		if (txq->nb_free < tx_pkt->nb_segs)
+ 			break;
@@ -51,0 +53 @@
+ 		nb_used = tx_pkt->nb_segs;
@@ -53 +54,0 @@
- 


More information about the stable mailing list