diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2020-14415.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2020-14415.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-14415.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-14415.patch new file mode 100644 index 0000000000..dca2f90a49 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-14415.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 7a4ede0047a8613b0e3b72c9d351038f013dd357 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gerd Hoffmann <kraxel@redhat.com> | ||
3 | Date: Mon, 20 Jan 2020 11:18:04 +0100 | ||
4 | Subject: [PATCH] audio/oss: fix buffer pos calculation | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=utf8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api") | ||
10 | Reported-by: ziming zhang <ezrakiez@gmail.com> | ||
11 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
12 | Message-Id: <20200120101804.29578-1-kraxel@redhat.com> | ||
13 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
14 | |||
15 | Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=7a4ede0047a8613b0e3b72c9d351038f013dd357] | ||
16 | CVE: CVE-2020-14415 | ||
17 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
18 | --- | ||
19 | audio/ossaudio.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/audio/ossaudio.c b/audio/ossaudio.c | ||
23 | index c43faee..9456491 100644 | ||
24 | --- a/audio/ossaudio.c | ||
25 | +++ b/audio/ossaudio.c | ||
26 | @@ -420,7 +420,7 @@ static size_t oss_write(HWVoiceOut *hw, void *buf, size_t len) | ||
27 | size_t to_copy = MIN(len, hw->size_emul - hw->pos_emul); | ||
28 | memcpy(hw->buf_emul + hw->pos_emul, buf, to_copy); | ||
29 | |||
30 | - hw->pos_emul = (hw->pos_emul + to_copy) % hw->pos_emul; | ||
31 | + hw->pos_emul = (hw->pos_emul + to_copy) % hw->size_emul; | ||
32 | buf += to_copy; | ||
33 | len -= to_copy; | ||
34 | } | ||
35 | -- | ||
36 | 1.8.3.1 | ||
37 | |||