summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2024-12-03 00:37:14 +0100
committerSteve Sakoman <steve@sakoman.com>2024-12-09 07:54:03 -0800
commit47b90adf882fac910e85d3ed6383aec2e3d131b3 (patch)
treee7ca58929f6cc355468533be9a616fcc092bea95
parentcfaf5aa831a1de495a2837b509ba9754abfc5d20 (diff)
downloadpoky-47b90adf882fac910e85d3ed6383aec2e3d131b3.tar.gz
qemu: patch CVE-2024-6505
Backport patch [3] as linked from [1] via [2]. [1] https://nvd.nist.gov/vuln/detail/CVE-2024-6505 [2] https://bugzilla.redhat.com/show_bug.cgi?id=2295760 [3] https://gitlab.com/qemu-project/qemu/-/commit/f1595ceb (From OE-Core rev: 7e725e126689cc44055e27a05efafb7b52e89192) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2024-6505.patch40
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index cc78d7db06..a43785c79d 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -120,6 +120,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
120 file://CVE-2024-4467-0005.patch \ 120 file://CVE-2024-4467-0005.patch \
121 file://CVE-2023-3019-0001.patch \ 121 file://CVE-2023-3019-0001.patch \
122 file://CVE-2023-3019-0002.patch \ 122 file://CVE-2023-3019-0002.patch \
123 file://CVE-2024-6505.patch \
123 " 124 "
124UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 125UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
125 126
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2024-6505.patch b/meta/recipes-devtools/qemu/qemu/CVE-2024-6505.patch
new file mode 100644
index 0000000000..f9ee36f8ed
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2024-6505.patch
@@ -0,0 +1,40 @@
1From f1595ceb9aad36a6c1da95bcb77ab9509b38822d Mon Sep 17 00:00:00 2001
2From: Akihiko Odaki <akihiko.odaki@daynix.com>
3Date: Mon, 1 Jul 2024 20:58:04 +0900
4Subject: [PATCH] virtio-net: Ensure queue index fits with RSS
5
6Ensure the queue index points to a valid queue when software RSS
7enabled. The new calculation matches with the behavior of Linux's TAP
8device with the RSS eBPF program.
9
10Fixes: 4474e37a5b3a ("virtio-net: implement RX RSS processing")
11Reported-by: Zhibin Hu <huzhibin5@huawei.com>
12Cc: qemu-stable@nongnu.org
13Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
14Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
15Signed-off-by: Jason Wang <jasowang@redhat.com>
16
17CVE: CVE-2024-6505
18Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/f1595ceb9aad36a6c1da95bcb77ab9509b38822d]
19Signed-off-by: Peter Marko <peter.marko@siemens.com>
20---
21 hw/net/virtio-net.c | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
23
24diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
25index 8f30972708..5635620a31 100644
26--- a/hw/net/virtio-net.c
27+++ b/hw/net/virtio-net.c
28@@ -1752,7 +1752,8 @@ static ssize_t virtio_net_receive_rcu(NetClientState *nc, const uint8_t *buf,
29 if (!no_rss && n->rss_data.enabled && n->rss_data.enabled_software_rss) {
30 int index = virtio_net_process_rss(nc, buf, size);
31 if (index >= 0) {
32- NetClientState *nc2 = qemu_get_subqueue(n->nic, index);
33+ NetClientState *nc2 =
34+ qemu_get_subqueue(n->nic, index % n->curr_queue_pairs);
35 return virtio_net_receive_rcu(nc2, buf, size, true);
36 }
37 }
38--
392.30.2
40