summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-08-27 09:38:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-30 09:56:13 +0100
commitca098d172823a01e7b1a0d105304a4731c8cd321 (patch)
tree44e223362f010cafc2d6bf112980b29ff3719cde /meta/recipes-devtools/qemu/qemu
parentb59fa412bd8ee74f4acc12f45c8730cb7d11b58c (diff)
downloadpoky-ca098d172823a01e7b1a0d105304a4731c8cd321.tar.gz
qemu: Fix CVE-2023-40360
(From OE-Core rev: 5b68ec70ecc9779146789cc635d8ab60928e9233) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-CVE-2023-40360-hw-nvme-fix-null-pointer-access-in-di.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-CVE-2023-40360-hw-nvme-fix-null-pointer-access-in-di.patch b/meta/recipes-devtools/qemu/qemu/0001-CVE-2023-40360-hw-nvme-fix-null-pointer-access-in-di.patch
new file mode 100644
index 0000000000..731b0281f4
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-CVE-2023-40360-hw-nvme-fix-null-pointer-access-in-di.patch
@@ -0,0 +1,39 @@
1From 83dd3da9fac872fac9739b9dcb96232c93675824 Mon Sep 17 00:00:00 2001
2From: Klaus Jensen <k.jensen@samsung.com>
3Date: Tue, 8 Aug 2023 17:16:13 +0200
4Subject: [PATCH] CVE-2023-40360 hw/nvme: fix null pointer access in directive
5 receive
6
7nvme_directive_receive() does not check if an endurance group has been
8configured (set) prior to testing if flexible data placement is enabled
9or not.
10
11Fix this.
12
13CVE: CVE-2023-40360
14Upstream-Status: Backport [https://gitlab.com/birkelund/qemu/-/commit/6c8f8456cb0b239812dee5211881426496da7b98]
15Cc: qemu-stable@nongnu.org
16Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1815
17Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
18Reviewed-by: Jesper Wendel Devantier <j.devantier@samsung.com>
19Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
20---
21 hw/nvme/ctrl.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
25index 2097fb131..36a2846c3 100644
26--- a/hw/nvme/ctrl.c
27+++ b/hw/nvme/ctrl.c
28@@ -6862,7 +6862,7 @@ static uint16_t nvme_directive_receive(NvmeCtrl *n, NvmeRequest *req)
29 case NVME_DIRECTIVE_IDENTIFY:
30 switch (doper) {
31 case NVME_DIRECTIVE_RETURN_PARAMS:
32- if (ns->endgrp->fdp.enabled) {
33+ if (ns->endgrp && ns->endgrp->fdp.enabled) {
34 id.supported |= 1 << NVME_DIRECTIVE_DATA_PLACEMENT;
35 id.enabled |= 1 << NVME_DIRECTIVE_DATA_PLACEMENT;
36 id.persistent |= 1 << NVME_DIRECTIVE_DATA_PLACEMENT;
37--
382.42.0
39