diff options
author | Davide Gardenal <davidegarde2000@gmail.com> | 2022-03-25 17:46:30 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-31 21:09:33 +0100 |
commit | a27aa2316f383735d5c4cba7f7e502bff579979b (patch) | |
tree | 33c61bb6dd64663ce6fb868102faf00fa0c91416 /meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch | |
parent | 4391ddecb2c5903a4c00d62646add0988a79c6d9 (diff) | |
download | poky-a27aa2316f383735d5c4cba7f7e502bff579979b.tar.gz |
ghostscript: backport patch fix for CVE-2021-3781
Upstream advisory:
https://ghostscript.com/blog/CVE-2021-3781.html
Other than the CVE fix other two commits are backported
to fit the patch.
(From OE-Core rev: ce856e5e07589d49d5ff84b515c48735cc78cd01)
Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch')
-rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch new file mode 100644 index 0000000000..beade79eef --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 9daf042fd7bb19e93388d89d9686a2fa4496f382 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Liddell <chris.liddell@artifex.com> | ||
3 | Date: Mon, 24 Aug 2020 09:24:31 +0100 | ||
4 | Subject: [PATCH] Coverity 361429: move "break" to correct place. | ||
5 | |||
6 | We had to add the outputfile to the "control" file permission list (as well | ||
7 | as write), but for the "pipe" case, I accidentally added the call after the | ||
8 | break out of loop that checks for a pipe. | ||
9 | |||
10 | CVE: CVE-2021-3781 | ||
11 | |||
12 | Upstream-Status: Backport: | ||
13 | https://git.ghostscript.com/?p=ghostpdl.git;a=commit;f=base/gslibctx.c;h=9daf042fd7bb19e93388d89d9686a2fa4496f382 | ||
14 | |||
15 | Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> | ||
16 | --- | ||
17 | base/gslibctx.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/base/gslibctx.c b/base/gslibctx.c | ||
21 | index ff8fc895e..63dfbe2e0 100644 | ||
22 | --- a/base/gslibctx.c | ||
23 | +++ b/base/gslibctx.c | ||
24 | @@ -668,10 +668,10 @@ gs_add_outputfile_control_path(gs_memory_t *mem, const char *fname) | ||
25 | code = gs_add_control_path(mem, gs_permit_file_writing, f); | ||
26 | if (code < 0) | ||
27 | return code; | ||
28 | - break; | ||
29 | code = gs_add_control_path(mem, gs_permit_file_control, f); | ||
30 | if (code < 0) | ||
31 | return code; | ||
32 | + break; | ||
33 | } | ||
34 | if (!IS_WHITESPACE(f[i])) | ||
35 | break; | ||
36 | -- | ||
37 | 2.25.1 | ||