summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2021-08-20 16:55:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-01 16:27:09 +0100
commitb3bf5ccd83f501f217713bb7c936a1e8817b92ba (patch)
treecd7e2d3a349a999508bc109f2aae9ae8f77d4274 /meta/recipes-devtools
parentc00a882bd66158f1dbce59bc45340ef81d3af2ed (diff)
downloadpoky-b3bf5ccd83f501f217713bb7c936a1e8817b92ba.tar.gz
qemu: Security fix for CVE-2020-29443
Source: Qemu.org MR: 109315 Type: Security Fix Disposition: Backport from https://git.qemu.org/?p=qemu.git;a=commit;h=813212288970c39b1800f63e83ac6e96588095c6 ChangeID: c0296e285169cc937cc9758c9d84ac690297ee54 Description: (From OE-Core rev: 1765005f73303d9857f9fde93efb1cc8534964f1) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2020-29443.patch45
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 76bfb4fcf9..bd1a83955f 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -59,6 +59,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
59 file://CVE-2020-25624_1.patch \ 59 file://CVE-2020-25624_1.patch \
60 file://CVE-2020-25624_2.patch \ 60 file://CVE-2020-25624_2.patch \
61 file://CVE-2020-25625.patch \ 61 file://CVE-2020-25625.patch \
62 file://CVE-2020-29443.patch \
62 " 63 "
63UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 64UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
64 65
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-29443.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-29443.patch
new file mode 100644
index 0000000000..1528d5c2fd
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-29443.patch
@@ -0,0 +1,45 @@
1From 813212288970c39b1800f63e83ac6e96588095c6 Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Tue, 1 Dec 2020 13:09:26 +0100
4Subject: [PATCH] ide: atapi: assert that the buffer pointer is in range
5
6A case was reported where s->io_buffer_index can be out of range.
7The report skimped on the details but it seems to be triggered
8by s->lba == -1 on the READ/READ CD paths (e.g. by sending an
9ATAPI command with LBA = 0xFFFFFFFF). For now paper over it
10with assertions. The first one ensures that there is no overflow
11when incrementing s->io_buffer_index, the second checks for the
12buffer overrun.
13
14Note that the buffer overrun is only a read, so I am not sure
15if the assertion failure is actually less harmful than the overrun.
16
17Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
18Message-id: 20201201120926.56559-1-pbonzini@redhat.com
19Reviewed-by: Kevin Wolf <kwolf@redhat.com>
20Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
21
22Upstream-Status: Backport
23CVE: CVE-2020-29443
24Signed-off-by: Armin Kuster <akuster@mvista.com>
25
26---
27 hw/ide/atapi.c | 2 ++
28 1 file changed, 2 insertions(+)
29
30diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
31index 14a2b0bb2f..e79157863f 100644
32--- a/hw/ide/atapi.c
33+++ b/hw/ide/atapi.c
34@@ -276,6 +276,8 @@ void ide_atapi_cmd_reply_end(IDEState *s)
35 s->packet_transfer_size -= size;
36 s->elementary_transfer_size -= size;
37 s->io_buffer_index += size;
38+ assert(size <= s->io_buffer_total_len);
39+ assert(s->io_buffer_index <= s->io_buffer_total_len);
40
41 /* Some adapters process PIO data right away. In that case, we need
42 * to avoid mutual recursion between ide_transfer_start
43--
442.25.1
45