summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2025-04-08 16:27:18 +0530
committerSteve Sakoman <steve@sakoman.com>2025-04-11 08:36:03 -0700
commitbfe8ae1a38eeceff5030df78b6263fa8ac45a01e (patch)
treebf507cb7b268a1c6bb2af405752952e075a67f12
parent09870c8cce80f0f114e450bdc644f55c1fb11c69 (diff)
downloadpoky-bfe8ae1a38eeceff5030df78b6263fa8ac45a01e.tar.gz
ghostscript: Fix CVE-2025-27832
Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=57291c846334f1585552010faa42d7cb2cbd5c41] (From OE-Core rev: a1cd1e6275cc5ae3c100a3259e24d03937a4b78d) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/CVE-2025-27832.patch45
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2025-27832.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2025-27832.patch
new file mode 100644
index 0000000000..c3a328bcc9
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2025-27832.patch
@@ -0,0 +1,45 @@
1From 57291c846334f1585552010faa42d7cb2cbd5c41 Mon Sep 17 00:00:00 2001
2From: Zdenek Hutyra <zhutyra@centrum.cz>
3Date: Wed, 20 Nov 2024 11:42:31 +0000
4Subject: Bug 708133: Avoid integer overflow leading to buffer overflow
5
6The calculation of the buffer size was being done with int values, and
7overflowing that data type. By leaving the total size calculation to the
8memory manager, the calculation ends up being done in size_t values, and
9avoiding the overflow in this case, but also meaning the memory manager
10overflow protection will be effective.
11
12CVE-2025-27832
13
14Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=57291c846334f1585552010faa42d7cb2cbd5c41]
15CVE: CVE-2025-27832
16Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
17---
18 contrib/japanese/gdevnpdl.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/contrib/japanese/gdevnpdl.c b/contrib/japanese/gdevnpdl.c
22index 60065bacf..4967282bd 100644
23--- a/contrib/japanese/gdevnpdl.c
24+++ b/contrib/japanese/gdevnpdl.c
25@@ -587,7 +587,7 @@ npdl_print_page_copies(gx_device_printer * pdev, gp_file * prn_stream, int num_c
26 int code;
27 int maxY = lprn->BlockLine / lprn->nBh * lprn->nBh;
28
29- if (!(lprn->CompBuf = gs_malloc(pdev->memory->non_gc_memory, line_size * maxY, sizeof(byte), "npdl_print_page_copies(CompBuf)")))
30+ if (!(lprn->CompBuf = gs_malloc(pdev->memory->non_gc_memory, line_size, maxY, "npdl_print_page_copies(CompBuf)")))
31 return_error(gs_error_VMerror);
32
33 /* Initialize printer */
34@@ -683,7 +683,7 @@ npdl_print_page_copies(gx_device_printer * pdev, gp_file * prn_stream, int num_c
35 /* Form Feed */
36 gp_fputs("\014", prn_stream);
37
38- gs_free(pdev->memory->non_gc_memory, lprn->CompBuf, line_size * maxY, sizeof(byte), "npdl_print_page_copies(CompBuf)");
39+ gs_free(pdev->memory->non_gc_memory, lprn->CompBuf, line_size, maxY, "npdl_print_page_copies(CompBuf)");
40 return 0;
41 }
42
43--
44cgit v1.2.3
45
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb b/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb
index 94a21d1dce..284ae3a28e 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb
@@ -65,6 +65,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
65 file://CVE-2025-27830.patch \ 65 file://CVE-2025-27830.patch \
66 file://CVE-2025-27831-pre1.patch \ 66 file://CVE-2025-27831-pre1.patch \
67 file://CVE-2025-27831.patch \ 67 file://CVE-2025-27831.patch \
68 file://CVE-2025-27832.patch \
68" 69"
69 70
70SRC_URI = "${SRC_URI_BASE} \ 71SRC_URI = "${SRC_URI_BASE} \