summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-02-02 17:37:09 +0100
committerKhem Raj <raj.khem@gmail.com>2026-02-04 20:53:29 -0800
commit5a74edf28bbbb328e468b81bab1d464951a4e18c (patch)
tree0a2d0083cb9fe919cadabd82f7d8c516554d4b05
parent1a31d20cea9373621873681a1d9b65a880a52a64 (diff)
downloadmeta-openembedded-5a74edf28bbbb328e468b81bab1d464951a4e18c.tar.gz
libcupsfilters: patch CVE-2025-64503
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-64503 Pick the patch that explicitly refernces the CVE ID in its message. (The NVD advisory mentions only the cups-filters patch, but the developer indicated the CVE ID in the libcupsfilters patch also) Between this recipe version and the patch the project has decided to eliminate c++ from the project, and use c only. The patch however is straightforward enough that it could be backported with very small modifications. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-printing/cups/libcupsfilters/CVE-2025-64503.patch47
-rw-r--r--meta-oe/recipes-printing/cups/libcupsfilters_2.1.1.bb8
2 files changed, 51 insertions, 4 deletions
diff --git a/meta-oe/recipes-printing/cups/libcupsfilters/CVE-2025-64503.patch b/meta-oe/recipes-printing/cups/libcupsfilters/CVE-2025-64503.patch
new file mode 100644
index 0000000000..b70586296e
--- /dev/null
+++ b/meta-oe/recipes-printing/cups/libcupsfilters/CVE-2025-64503.patch
@@ -0,0 +1,47 @@
1From da9a7db3b9125c87b11c43b05354ca2eb21ed684 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Mon, 10 Nov 2025 21:10:56 +0100
4Subject: [PATCH] Fix out-of-bounds write in cfFilterPDFToRaster()
5
6From: Till Kamppeter <till.kamppeter@gmail.com>
7
8PDFs with too large page dimensions could cause an integer overflow and then a too small buffer for the pixel line to be allocated.
9
10Fixed this by cropping the page size to the maximum allowed by the standard, 14400x14400pt, 200x200in, 5x5m
11
12https://community.adobe.com/t5/indesign-discussions/maximum-width-of-a-pdf/td-p/9217372
13
14Fixes CVE-2025-64503
15
16CVE: CVE-2025-64503
17Upstream-Status: Backport [https://github.com/OpenPrinting/libcupsfilters/commit/fd01543f372ca3ba1f1c27bd3427110fa0094e3f]
18Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
19---
20 cupsfilters/pdftoraster.cxx | 14 ++++++++++++++
21 1 file changed, 14 insertions(+)
22
23diff --git a/cupsfilters/pdftoraster.cxx b/cupsfilters/pdftoraster.cxx
24index 0235b54..09583df 100644
25--- a/cupsfilters/pdftoraster.cxx
26+++ b/cupsfilters/pdftoraster.cxx
27@@ -1606,6 +1606,20 @@ out_page(pdftoraster_doc_t *doc,
28 l = inputPageBox.height();
29 if (l < 0)
30 l = -l;
31+
32+ //
33+ // Maximum allowed page size for PDF is 200x200 inches (~ 5x5 m), or 14400x14400 pt
34+ // https://community.adobe.com/t5/indesign-discussions/maximum-width-of-a-pdf/td-p/9217372
35+ //
36+ if (doc->header.cupsPageSize[0] > 14400) {
37+ fprintf(stderr, "ERROR: Page width is %.2fpt, too large, cropping to 14400pt\n", doc->header.cupsPageSize[0]);
38+ doc->header.cupsPageSize[0] = 14400;
39+ }
40+ if (doc->header.cupsPageSize[1] > 14400) {
41+ fprintf(stderr, "ERROR: Page height is %.2fpt, too large, cropping to 14400pt\n", doc->header.cupsPageSize[1]);
42+ doc->header.cupsPageSize[1] = 14400;
43+ }
44+
45 if (rotate == 90 || rotate == 270)
46 doc->header.cupsPageSize[0] = l;
47 else
diff --git a/meta-oe/recipes-printing/cups/libcupsfilters_2.1.1.bb b/meta-oe/recipes-printing/cups/libcupsfilters_2.1.1.bb
index 51d8c4f18b..311f33e134 100644
--- a/meta-oe/recipes-printing/cups/libcupsfilters_2.1.1.bb
+++ b/meta-oe/recipes-printing/cups/libcupsfilters_2.1.1.bb
@@ -5,10 +5,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=aab2024bd2a475438a154cd1640c9684"
5 5
6DEPENDS = "cups fontconfig libexif dbus lcms qpdf poppler libpng jpeg tiff" 6DEPENDS = "cups fontconfig libexif dbus lcms qpdf poppler libpng jpeg tiff"
7 7
8SRC_URI = " \ 8SRC_URI = "https://github.com/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz \
9 https://github.com/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz \ 9 file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch \
10 file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch \ 10 file://CVE-2025-64503.patch \
11" 11 "
12SRC_URI[sha256sum] = "6c303e36cfde05a6c88fb940c62b6a18e7cdbfb91f077733ebc98f104925ce36" 12SRC_URI[sha256sum] = "6c303e36cfde05a6c88fb940c62b6a18e7cdbfb91f077733ebc98f104925ce36"
13 13
14inherit autotools gettext pkgconfig github-releases 14inherit autotools gettext pkgconfig github-releases