1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

ghostscript: fix CVE-2023-38559

(From OE-Core rev: 9552f934ae5305b9154f1560d4823b168457b784)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Chee Yang Lee
2023-08-17 17:34:57 +08:00
committed by Steve Sakoman
parent b2e02ea2be
commit 915fd3ca17
2 changed files with 32 additions and 0 deletions
@@ -0,0 +1,31 @@
CVE: CVE-2023-38559
Upstream-Status: Backport [ https://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=d81b82c70bc1 ]
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
From d81b82c70bc1fb9991bb95f1201abb5dea55f57f Mon Sep 17 00:00:00 2001
From: Chris Liddell <chris.liddell@artifex.com>
Date: Mon, 17 Jul 2023 14:06:37 +0100
Subject: [PATCH] Bug 706897: Copy pcx buffer overrun fix from
devices/gdevpcx.c
Bounds check the buffer, before dereferencing the pointer.
---
base/gdevdevn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/gdevdevn.c b/base/gdevdevn.c
index 7b14d9c71..6351fb77a 100644
--- a/base/gdevdevn.c
+++ b/base/gdevdevn.c
@@ -1983,7 +1983,7 @@ devn_pcx_write_rle(const byte * from, const byte * end, int step, gp_file * file
byte data = *from;
from += step;
- if (data != *from || from == end) {
+ if (from >= end || data != *from) {
if (data >= 0xc0)
gp_fputc(0xc1, file);
} else {
--
2.34.1
@@ -36,6 +36,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
file://cross-compile.patch \
file://cve-2023-28879.patch \
file://cve-2023-36664.patch \
file://CVE-2023-38559.patch \
"
SRC_URI = "${SRC_URI_BASE} \