summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2022-09-14 14:04:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-23 16:22:59 +0100
commitb44d2090439187bcdc740736abd5a9879f455e51 (patch)
treeba68286c3d0e5f131ca625055bda0b0b2c6474f1 /meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch
parent20087e04b32722b0b24f8da3e3bf4dce3281571e (diff)
downloadpoky-b44d2090439187bcdc740736abd5a9879f455e51.tar.gz
qemu: fix and ignore several CVEs
backport fixes: CVE-2020-13754, backport patches as debian security tracker notes https://security-tracker.debian.org/tracker/CVE-2020-13754 CVE-2021-3713 CVE-2021-3748 CVE-2021-3930 CVE-2021-4206 CVE-2021-4207 CVE-2022-0216, does not include qtest in patches, the qtest code were not available in v4.2. Ignore: CVE-2020-27661, issue introduced in v5.1.0-rc0 https://security-tracker.debian.org/tracker/CVE-2020-27661 (From OE-Core rev: 16a6e8530c4820f070973a1b4d64764c20706087) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch b/meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch
new file mode 100644
index 0000000000..137906cd30
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2022-0216-2.patch
@@ -0,0 +1,52 @@
1From 4367a20cc442c56b05611b4224de9a61908f9eac Mon Sep 17 00:00:00 2001
2From: Mauro Matteo Cascella <mcascell@redhat.com>
3Date: Mon, 11 Jul 2022 14:33:16 +0200
4Subject: [PATCH] scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout
5 (CVE-2022-0216)
6
7Set current_req to NULL, not current_req->req, to prevent reusing a free'd
8buffer in case of repeated SCSI cancel requests. Also apply the fix to
9CLEAR QUEUE and BUS DEVICE RESET messages as well, since they also cancel
10the request.
11
12Thanks to Alexander Bulekov for providing a reproducer.
13
14Fixes: CVE-2022-0216
15Resolves: https://gitlab.com/qemu-project/qemu/-/issues/972
16Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
17Tested-by: Alexander Bulekov <alxndr@bu.edu>
18Message-Id: <20220711123316.421279-1-mcascell@redhat.com>
19Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
20
21https://gitlab.com/qemu-project/qemu/-/commit/4367a20cc4
22CVE: CVE-2022-0216
23Upstream-Status: Backport
24Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
25---
26 hw/scsi/lsi53c895a.c | 3 +-
27 1 files changed, 2 insertions(+), 1 deletion(-)
28
29diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
30index 99ea42d49b..ad5f5e5f39 100644
31--- a/hw/scsi/lsi53c895a.c
32+++ b/hw/scsi/lsi53c895a.c
33@@ -1030,7 +1030,7 @@ static void lsi_do_msgout(LSIState *s)
34 trace_lsi_do_msgout_abort(current_tag);
35 if (current_req && current_req->req) {
36 scsi_req_cancel(current_req->req);
37- current_req->req = NULL;
38+ current_req = NULL;
39 }
40 lsi_disconnect(s);
41 break;
42@@ -1056,6 +1056,7 @@ static void lsi_do_msgout(LSIState *s)
43 /* clear the current I/O process */
44 if (s->current) {
45 scsi_req_cancel(s->current->req);
46+ current_req = NULL;
47 }
48
49 /* As the current implemented devices scsi_disk and scsi_generic
50--
51GitLab
52