From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3388CD3423 for ; Fri, 1 May 2026 15:28:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C55FD8567E; Fri, 1 May 2026 15:28:56 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id vXkvhjXz2lmY; Fri, 1 May 2026 15:28:54 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B0E2685679 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org; s=default; t=1777649334; bh=ehtopKHZiPL/OFhw5Z2KlPz2CBaj/ubkeOhjg9cfxM4=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Tp6tJnC1Bu/FmiNbBYx7c8eK61ndULx3np+cr6ZA/2M7BB4o4yFS9TDnHdFXppAPR /8++q/Ql9M53ErjVADxpiS9DFNZDKyISXm7dt0PqxAZ7exqQOzScWJXJfb2Ln7/d9B NiozHaUw9bXrdVEl6m/UUCR6SWBgRw7SssSVc4L/tPlJmJKYPh92WnrSXBFKGX7tu/ 69H1Hj0Hx3dNvtp1iWUFZfL1ySadriB5qtc8QosPrNidpo5VDOtCYWI+B3AstTji1J Uc97oX2NFMy8QLUdZlQBmeFzT0jd937tTlPxMJ/NvvZCvc9RYmJ4kDDGOkukLqfnK0 pNf1wMwj2Leow== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id B0E2685679; Fri, 1 May 2026 15:28:54 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists1.osuosl.org (Postfix) with ESMTP id 3ADAF293 for ; Fri, 1 May 2026 15:28:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2C6A76F6F7 for ; Fri, 1 May 2026 15:28:53 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ABowxolBDdn8 for ; Fri, 1 May 2026 15:28:52 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=85.13.140.57; helo=dd20012.kasserver.com; envelope-from=bernd@kuhls.net; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 207FE6F6DF DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 207FE6F6DF Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp3.osuosl.org (Postfix) with ESMTPS id 207FE6F6DF for ; Fri, 1 May 2026 15:28:52 +0000 (UTC) Received: from fli4l.lan.fli4l (p4fd6c2eb.dip0.t-ipconnect.de [79.214.194.235]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 240F2A4C0238; Fri, 1 May 2026 17:28:02 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:42324) by fli4l.lan.fli4l with esmtp (Exim 4.99.2) (envelope-from ) id 1wIpmZ-00000000172-1ARo; Fri, 01 May 2026 15:27:58 +0000 From: Bernd Kuhls To: buildroot@buildroot.org Date: Fri, 1 May 2026 17:27:43 +0200 Message-ID: <20260501152758.2610763-8-bernd@kuhls.net> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260501152758.2610763-1-bernd@kuhls.net> References: <20260501152758.2610763-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202511301023; t=1777649282; bh=BJoBuznYYTEeeh2g9M5tvamlydTqu6Cqv+qZ4iHiMDw=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=ttIv/+l0bfUtY3f89wI4kR4n+oiI7gXka5KHQ9On2tWEIe0UUcT/UJ0CPp1TlpV65 4IkwzuuTMt7xd4fjQsW/oDeS4X8YZ+a2GSmoew7+c8fvu0Ahfv+Z1DeCEFGi/LPy7l +e/x7vrho8El4MfhkthejMR3afwExi9+bQ7dTvvNPcQe2+FI9MRyGhqfDmjAtUZSvB lbxEUJhAIJOK2tCD/njO6BbRoC5yr9gXGFoiTkByFeJj1Kdrs5J6fWl1mRpbPoGJOA egMTMf71tLpviS0rbQitQJc7wYKq8XVtJ9zntHXnjGHNgUvdmQspQ1bqZKapzMk9h1 KeetpMoE+dICA== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=kuhls.net X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202511301023 header.b=ttIv/+l0 Subject: [Buildroot] [PATCH v4 07/21] package/cups-filters: add upstream patch to fix CVE-2025-64524 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zoltan Gyarmati , Tudor Holton , Fabrice Fontaine , Angelo Compagnucci , Olivier Schonken , Thomas Petazzoni , Romain Naour , Giulio Benetti Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Bernd Kuhls --- ...ix-infinite-loop-caused-by-crafted-f.patch | 83 +++++++++++++++++++ package/cups-filters/cups-filters.mk | 3 + 2 files changed, 86 insertions(+) create mode 100644 package/cups-filters/0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch diff --git a/package/cups-filters/0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch b/package/cups-filters/0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch new file mode 100644 index 0000000000..e9900e5672 --- /dev/null +++ b/package/cups-filters/0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch @@ -0,0 +1,83 @@ +From b03866fd2e251a6d822a5e8c807c8d47b4d2dce2 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: Wed, 12 Nov 2025 16:02:20 +0100 +Subject: [PATCH] rastertopclx.c: Fix infinite loop caused by crafted file + +Infinite loop happened because of crafted input raster file, which led +into heap buffer overflow of `CompressBuf` array. + +Based on comments there should be always some `count` when compressing +the data, and processing of crafted file ended with offset and count +being 0. + +Fixes CVE-2025-64524 + +Upstream: https://github.com/OpenPrinting/cups-filters/commit/b03866fd2e251a6d822a5e8c807c8d47b4d2dce2 + +Signed-off-by: Bernd Kuhls +--- + filter/rastertopclx.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/filter/rastertopclx.c b/filter/rastertopclx.c +index 3e7c129da..1015308da 100644 +--- a/filter/rastertopclx.c ++++ b/filter/rastertopclx.c +@@ -818,10 +818,10 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */ + } + + if (header->cupsCompression) +- CompBuffer = malloc(DotBufferSize * 4); ++ CompBuffer = calloc(DotBufferSize * 4, sizeof(unsigned char)); + + if (header->cupsCompression >= 3) +- SeedBuffer = malloc(DotBufferSize); ++ SeedBuffer = calloc(DotBufferSize, sizeof(unsigned char)); + + SeedInvalid = 1; + +@@ -1152,6 +1152,13 @@ CompressData(unsigned char *line, /* I - Data to compress */ + seed ++; + count ++; + } ++ ++ // ++ // Bail out if we don't have count to compress ++ // ++ ++ if (count == 0) ++ break; + } + + /* +@@ -1245,6 +1252,13 @@ CompressData(unsigned char *line, /* I - Data to compress */ + + count = line_ptr - start; + ++ // ++ // Bail out if we don't have count to compress ++ // ++ ++ if (count == 0) ++ break; ++ + #if 0 + fprintf(stderr, "DEBUG: offset=%d, count=%d, comp_ptr=%p(%d of %d)...\n", + offset, count, comp_ptr, comp_ptr - CompBuffer, +@@ -1416,6 +1430,13 @@ CompressData(unsigned char *line, /* I - Data to compress */ + + count = (line_ptr - start) / 3; + ++ // ++ // Bail out if we don't have count to compress ++ // ++ ++ if (count == 0) ++ break; ++ + /* + * Place mode 10 compression data in the buffer; each sequence + * starts with a command byte that looks like: +-- +2.47.3 + diff --git a/package/cups-filters/cups-filters.mk b/package/cups-filters/cups-filters.mk index dcfb2e9500..6bc4610376 100644 --- a/package/cups-filters/cups-filters.mk +++ b/package/cups-filters/cups-filters.mk @@ -13,6 +13,9 @@ CUPS_FILTERS_CPE_ID_VENDOR = linuxfoundation # 0001-beh-backend-Use-execv-instead-of-system-CVE-2023-24805.patch CUPS_FILTERS_IGNORE_CVES += CVE-2023-24805 +# 0002-rastertopclx.c-Fix-infinite-loop-caused-by-crafted-f.patch +CUPS_FILTERS_IGNORE_CVES += CVE-2025-64524 + CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg CUPS_FILTERS_CONF_OPTS = \ -- 2.47.3 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot