patch 'vhost: fix out-of-bounds read in control virtqueue handler' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:01:36 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
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/08/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1ccd6c53f47e1cea79c6a435356236d77178bbda
Thanks.
Kevin
---
>From 1ccd6c53f47e1cea79c6a435356236d77178bbda Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Fri, 11 Sep 2026 15:33:41 +0200
Subject: [PATCH] vhost: fix out-of-bounds read in control virtqueue handler
[ upstream commit 08481c06e8b10bf3d25460bc0ec1d5c4e86aacd1 ]
Add request length validation before accessing command_data in the
control virtqueue handler. The request buffer size was only validated
against the 2-byte header (class + command), but the MQ_VQ_PAIRS_SET
handler reads a 2-byte queue_pairs field from command_data without
verifying those bytes exist.
A malicious guest could submit a 2-byte control request causing an
out-of-bounds heap read of bytes [2..3] beyond the allocation.
Propagate data_len through virtio_net_ctrl_elem and validate the
minimum required size (4 bytes) before dereferencing command_data.
CVE-2026-86564
Bugzilla ID: 2007
Reported-by: Stephen Haruna <syberstevelabs at gmail.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Kevin Traynor <ktraynor at redhat.com>
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 676f7357ab..5abd689e00 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1607,4 +1607,5 @@ Stepan Sojka <stepan.sojka at adaptivemobile.com>
Stephen Coleman <omegacoleman at gmail.com>
Stephen Douthit <stephend at silicom-usa.com>
+Stephen Haruna <syberstevelabs at gmail.com>
Stephen Hemminger <stephen at networkplumber.org> <sthemmin at microsoft.com>
Stephen Hemminger <stephen at networkplumber.org> <shemming at brocade.com>
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:44.080673528 +0000
+++ 0170-vhost-fix-out-of-bounds-read-in-control-virtqueue-ha.patch 2026-12-03 12:52:39.145234466 +0000
@@ -1 +1 @@
-From 08481c06e8b10bf3d25460bc0ec1d5c4e86aacd1 Mon Sep 17 00:00:00 2001
+From 1ccd6c53f47e1cea79c6a435356236d77178bbda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08481c06e8b10bf3d25460bc0ec1d5c4e86aacd1 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -26,3 +27,2 @@
- .mailmap | 1 +
- lib/vhost/virtio_net_ctrl.c | 14 ++++++++++++--
- 2 files changed, 13 insertions(+), 2 deletions(-)
+ .mailmap | 1 +
+ 1 file changed, 1 insertion(+)
@@ -31 +31 @@
-index fe83ed1c56..63282765fd 100644
+index 676f7357ab..5abd689e00 100644
@@ -34 +34 @@
-@@ -1628,4 +1628,5 @@ Stepan Sojka <stepan.sojka at adaptivemobile.com>
+@@ -1607,4 +1607,5 @@ Stepan Sojka <stepan.sojka at adaptivemobile.com>
@@ -40,43 +39,0 @@
-diff --git a/lib/vhost/virtio_net_ctrl.c b/lib/vhost/virtio_net_ctrl.c
-index 1e5034457c..51a3baf78e 100644
---- a/lib/vhost/virtio_net_ctrl.c
-+++ b/lib/vhost/virtio_net_ctrl.c
-@@ -21,4 +21,5 @@ struct virtio_net_ctrl_elem {
- uint16_t head_idx;
- uint16_t n_descs;
-+ uint32_t data_len;
- uint8_t *desc_ack;
- };
-@@ -136,4 +137,5 @@ virtio_net_ctrl_pop(struct virtio_net *dev, struct vhost_virtqueue *cvq,
- goto err;
- }
-+ ctrl_elem->data_len = data_len;
-
- ctrl_req = (uint8_t *)ctrl_elem->ctrl_req;
-@@ -214,5 +216,6 @@ err:
-
- static uint8_t
--virtio_net_ctrl_handle_req(struct virtio_net *dev, struct virtio_net_ctrl *ctrl_req)
-+virtio_net_ctrl_handle_req(struct virtio_net *dev, struct virtio_net_ctrl *ctrl_req,
-+ uint32_t data_len)
- {
- uint8_t ret = VIRTIO_NET_ERR;
-@@ -223,4 +226,10 @@ virtio_net_ctrl_handle_req(struct virtio_net *dev, struct virtio_net_ctrl *ctrl_
- uint32_t i;
-
-+ if (data_len < sizeof(*ctrl_req) + sizeof(queue_pairs)) {
-+ VHOST_CONFIG_LOG(dev->ifname, ERR,
-+ "Invalid MQ control request size");
-+ return VIRTIO_NET_ERR;
-+ }
-+
- queue_pairs = *(uint16_t *)(uintptr_t)ctrl_req->command_data;
- VHOST_CONFIG_LOG(dev->ifname, INFO, "Ctrl req: MQ %u queue pairs", queue_pairs);
-@@ -297,5 +306,6 @@ virtio_net_ctrl_handle(struct virtio_net *dev)
- break;
-
-- *ctrl_elem.desc_ack = virtio_net_ctrl_handle_req(dev, ctrl_elem.ctrl_req);
-+ *ctrl_elem.desc_ack = virtio_net_ctrl_handle_req(dev, ctrl_elem.ctrl_req,
-+ ctrl_elem.data_len);
-
- ret = virtio_net_ctrl_push(dev, &ctrl_elem);
More information about the stable
mailing list