diff options
| author | Archana Polampalli <archana.polampalli@windriver.com> | 2024-08-08 11:05:42 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-08-16 08:09:14 -0700 |
| commit | 52cfc786965eb818cb23846d24d827627cbdd4e6 (patch) | |
| tree | dec287f56a2e2247231f96a60a8ed3fb6936f416 | |
| parent | 204b28c41977cac9d1b428b490aaf7441140e92a (diff) | |
| download | poky-52cfc786965eb818cb23846d24d827627cbdd4e6.tar.gz | |
ghostscript: fix CVE-2024-29509
(From OE-Core rev: 18c55a131b0627b906de29f8c4cbd1526154cd60)
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-29509.patch | 45 | ||||
| -rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29509.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29509.patch new file mode 100644 index 0000000000..8de97f91a0 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29509.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From 917b3a71fb20748965254631199ad98210d6c2fb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ken Sharp <Ken.Sharp@artifex.com> | ||
| 3 | Date: Thu, 25 Jan 2024 11:58:22 +0000 | ||
| 4 | Subject: [PATCH] Bug 707510 - don't use strlen on passwords | ||
| 5 | |||
| 6 | Item #1 of the report. This looks like an oversight when first coding | ||
| 7 | the routine. We should use the PostScript string length, because | ||
| 8 | PostScript strings may not be NULL terminated (and as here may contain | ||
| 9 | internal NULL characters). | ||
| 10 | |||
| 11 | Fix the R6 handler which has the same problem too. | ||
| 12 | |||
| 13 | CVE: CVE-2024-29509 | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=917b3a71fb20748965254631199ad98210d6c2fb] | ||
| 16 | |||
| 17 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
| 18 | --- | ||
| 19 | pdf/pdf_sec.c | 4 ++-- | ||
| 20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/pdf/pdf_sec.c b/pdf/pdf_sec.c | ||
| 23 | index ff60805..2bb59e1 100644 | ||
| 24 | --- a/pdf/pdf_sec.c | ||
| 25 | +++ b/pdf/pdf_sec.c | ||
| 26 | @@ -1250,7 +1250,7 @@ static int check_password_R5(pdf_context *ctx, char *Password, int PasswordLen, | ||
| 27 | if (code < 0) { | ||
| 28 | pdf_string *P = NULL, *P_UTF8 = NULL; | ||
| 29 | |||
| 30 | - code = pdfi_object_alloc(ctx, PDF_STRING, strlen(ctx->encryption.Password), (pdf_obj **)&P); | ||
| 31 | + code = pdfi_object_alloc(ctx, PDF_STRING, PasswordLen, (pdf_obj **)&P); | ||
| 32 | if (code < 0) { | ||
| 33 | return code; | ||
| 34 | } | ||
| 35 | @@ -1300,7 +1300,7 @@ static int check_password_R6(pdf_context *ctx, char *Password, int PasswordLen, | ||
| 36 | if (code < 0) { | ||
| 37 | pdf_string *P = NULL, *P_UTF8 = NULL; | ||
| 38 | |||
| 39 | - code = pdfi_object_alloc(ctx, PDF_STRING, strlen(ctx->encryption.Password), (pdf_obj **)&P); | ||
| 40 | + code = pdfi_object_alloc(ctx, PDF_STRING, PasswordLen, (pdf_obj **)&P); | ||
| 41 | if (code < 0) | ||
| 42 | return code; | ||
| 43 | memcpy(P->data, Password, PasswordLen); | ||
| 44 | -- | ||
| 45 | 2.40.0 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb b/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb index ab4a2def4c..f738b0133f 100644 --- a/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb +++ b/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb | |||
| @@ -52,6 +52,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d | |||
| 52 | file://CVE-2023-52722.patch \ | 52 | file://CVE-2023-52722.patch \ |
| 53 | file://CVE-2024-29511-0001.patch \ | 53 | file://CVE-2024-29511-0001.patch \ |
| 54 | file://CVE-2024-29511-0002.patch \ | 54 | file://CVE-2024-29511-0002.patch \ |
| 55 | file://CVE-2024-29509.patch \ | ||
| 55 | " | 56 | " |
| 56 | 57 | ||
| 57 | SRC_URI = "${SRC_URI_BASE} \ | 58 | SRC_URI = "${SRC_URI_BASE} \ |
