diff options
| author | Archana Polampalli <archana.polampalli@windriver.com> | 2024-05-29 05:42:24 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-06-05 05:57:12 -0700 |
| commit | 0c079e62fbfa8f1b3ac436b62d4234698f4fab97 (patch) | |
| tree | 28ec85ff9f5f655e92e110613d9668a79157c512 | |
| parent | 235050fbfa70877fd61cd3a5ee059d9958c56ff7 (diff) | |
| download | poky-0c079e62fbfa8f1b3ac436b62d4234698f4fab97.tar.gz | |
ghostscript: fix CVE-2024-33871
(From OE-Core rev: c28281b7e105536cdf61eef8fe81d85ff2a42e4f)
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript/CVE-2024-33871.patch | 43 | ||||
| -rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript_10.02.1.bb | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2024-33871.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2024-33871.patch new file mode 100644 index 0000000000..abe6384997 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2024-33871.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 7145885041bb52cc23964f0aa2aec1b1c82b5908 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zdenek Hutyra <zhutyra@centrum.cz> | ||
| 3 | Date: Mon, 22 Apr 2024 13:33:47 +0100 | ||
| 4 | Subject: [PATCH 4/5] OPVP device - prevent unsafe parameter change with SAFER | ||
| 5 | |||
| 6 | Bug #707754 "OPVP device - Arbitrary code execution via custom Driver library" | ||
| 7 | |||
| 8 | The "Driver" parameter for the "opvp"/"oprp" device specifies the name | ||
| 9 | of a dynamic library and allows any library to be loaded. | ||
| 10 | |||
| 11 | The patch does not allow changing this parameter after activating path | ||
| 12 | control. | ||
| 13 | |||
| 14 | This addresses CVE-2024-33871 | ||
| 15 | |||
| 16 | CVE: CVE-2024-33871 | ||
| 17 | |||
| 18 | Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=7145885041bb52cc2396] | ||
| 19 | |||
| 20 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
| 21 | --- | ||
| 22 | contrib/opvp/gdevopvp.c | 6 ++++++ | ||
| 23 | 1 file changed, 6 insertions(+) | ||
| 24 | |||
| 25 | diff --git a/contrib/opvp/gdevopvp.c b/contrib/opvp/gdevopvp.c | ||
| 26 | index 74200cf..80eb23b 100644 | ||
| 27 | --- a/contrib/opvp/gdevopvp.c | ||
| 28 | +++ b/contrib/opvp/gdevopvp.c | ||
| 29 | @@ -3456,6 +3456,12 @@ _put_params(gx_device *dev, gs_param_list *plist) | ||
| 30 | code = param_read_string(plist, pname, &vdps); | ||
| 31 | switch (code) { | ||
| 32 | case 0: | ||
| 33 | + if (gs_is_path_control_active(dev->memory) | ||
| 34 | + && (!opdev->globals.vectorDriver || strlen(opdev->globals.vectorDriver) != vdps.size | ||
| 35 | + || memcmp(opdev->globals.vectorDriver, vdps.data, vdps.size) != 0)) { | ||
| 36 | + param_signal_error(plist, pname, gs_error_invalidaccess); | ||
| 37 | + return_error(gs_error_invalidaccess); | ||
| 38 | + } | ||
| 39 | buff = realloc(buff, vdps.size + 1); | ||
| 40 | memcpy(buff, vdps.data, vdps.size); | ||
| 41 | buff[vdps.size] = 0; | ||
| 42 | -- | ||
| 43 | 2.40.0 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.02.1.bb b/meta/recipes-extended/ghostscript/ghostscript_10.02.1.bb index 91285ed2ad..8bda4404cc 100644 --- a/meta/recipes-extended/ghostscript/ghostscript_10.02.1.bb +++ b/meta/recipes-extended/ghostscript/ghostscript_10.02.1.bb | |||
| @@ -29,6 +29,7 @@ SRC_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/downlo | |||
| 29 | file://CVE-2024-33870.patch \ | 29 | file://CVE-2024-33870.patch \ |
| 30 | file://CVE-2024-33869-0001.patch \ | 30 | file://CVE-2024-33869-0001.patch \ |
| 31 | file://CVE-2024-33869-0002.patch \ | 31 | file://CVE-2024-33869-0002.patch \ |
| 32 | file://CVE-2024-33871.patch \ | ||
| 32 | " | 33 | " |
| 33 | 34 | ||
| 34 | SRC_URI[sha256sum] = "e429e4f5b01615a4f0f93a4128e8a1a4d932dff983b1774174c79c0630717ad9" | 35 | SRC_URI[sha256sum] = "e429e4f5b01615a4f0f93a4128e8a1a4d932dff983b1774174c79c0630717ad9" |
