diff options
author | Vijay Anusuri <vanusuri@mvista.com> | 2023-08-10 10:17:25 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-08-16 03:55:13 -1000 |
commit | 3e0bb5455bcef1081ed0b165bbddb3fd1f385858 (patch) | |
tree | 158fc820c6da7f2fefe3a62b4b5bd2904e9c6d59 /meta/recipes-extended | |
parent | 3afaf243ba669edd7b5dc38929c4e6fec267737d (diff) | |
download | poky-3e0bb5455bcef1081ed0b165bbddb3fd1f385858.tar.gz |
ghostscript: backport fix for CVE-2023-38559
Upstream-Status: Backport from https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d81b82c70bc1fb9991bb95f1201abb5dea55f57f
(From OE-Core rev: f70113d1d5b5359c8b668ba43aac362457927d9e)
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch | 31 | ||||
-rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript_9.52.bb | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch b/meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch new file mode 100644 index 0000000000..91b9f6df50 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From d81b82c70bc1fb9991bb95f1201abb5dea55f57f Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Liddell <chris.liddell@artifex.com> | ||
3 | Date: Mon, 17 Jul 2023 14:06:37 +0100 | ||
4 | Subject: [PATCH] Bug 706897: Copy pcx buffer overrun fix from | ||
5 | devices/gdevpcx.c | ||
6 | |||
7 | Bounds check the buffer, before dereferencing the pointer. | ||
8 | |||
9 | Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d81b82c70bc1fb9991bb95f1201abb5dea55f57f] | ||
10 | CVE: CVE-2023-38559 | ||
11 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
12 | --- | ||
13 | base/gdevdevn.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/base/gdevdevn.c b/base/gdevdevn.c | ||
17 | index 3b019d6..2888776 100644 | ||
18 | --- a/base/gdevdevn.c | ||
19 | +++ b/base/gdevdevn.c | ||
20 | @@ -1980,7 +1980,7 @@ devn_pcx_write_rle(const byte * from, const byte * end, int step, gp_file * file | ||
21 | byte data = *from; | ||
22 | |||
23 | from += step; | ||
24 | - if (data != *from || from == end) { | ||
25 | + if (from >= end || data != *from) { | ||
26 | if (data >= 0xc0) | ||
27 | gp_fputc(0xc1, file); | ||
28 | } else { | ||
29 | -- | ||
30 | 2.25.1 | ||
31 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.52.bb b/meta/recipes-extended/ghostscript/ghostscript_9.52.bb index 57f0b51ad3..37e9ed8e84 100644 --- a/meta/recipes-extended/ghostscript/ghostscript_9.52.bb +++ b/meta/recipes-extended/ghostscript/ghostscript_9.52.bb | |||
@@ -40,6 +40,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d | |||
40 | file://CVE-2021-3781_2.patch \ | 40 | file://CVE-2021-3781_2.patch \ |
41 | file://CVE-2021-3781_3.patch \ | 41 | file://CVE-2021-3781_3.patch \ |
42 | file://CVE-2023-28879.patch \ | 42 | file://CVE-2023-28879.patch \ |
43 | file://0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch \ | ||
43 | " | 44 | " |
44 | 45 | ||
45 | SRC_URI = "${SRC_URI_BASE} \ | 46 | SRC_URI = "${SRC_URI_BASE} \ |