diff mbox series

[scarthgap,5/8] cups: Fix CVE-2026-107888

Message ID 20261124084033.72286-6-asparmar@cisco.com
State New
Headers show
Series cups: backport eight CVE fixes (2026-11-24) | expand

Commit Message

From: Ashishkumar Parmar <asparmar@cisco.com>

This patch applies the upstream 2.4.x fix for CVE-2026-107888 to
CUPS 2.4.11. The fixing commit is referenced in [1], and the public
advisory is referenced in [2].

[1] https://github.com/OpenPrinting/cups/commit/c5fc041ca0a211f8e69854907be7b55f56955659
[2] https://github.com/OpenPrinting/cups/security/advisories/GHSA-qqm8-4q5h-jg55

Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
diff mbox series

Patch

diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index abc6e98df9..a28080f053 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -36,6 +36,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
            file://CVE-2026-55467.patch \
            file://CVE-2026-55480.patch \
            file://CVE-2026-61702.patch \
+           file://CVE-2026-107888.patch \
            "
 
 GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
diff --git a/meta/recipes-extended/cups/cups/CVE-2026-107888.patch b/meta/recipes-extended/cups/cups/CVE-2026-107888.patch
new file mode 100644
index 0000000000..a96b109fcf
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/CVE-2026-107888.patch
@@ -0,0 +1,61 @@ 
+From 35ad3366ac27f2908eaef366ba805ad48c510424 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <msweet@msweet.org>
+Date: Thu, 1 Oct 2026 17:05:55 -0400
+Subject: [PATCH] Abort held jobs if the destination has gone away
+ (GHSA-qqm8-4q5h-jg55)
+
+CVE: CVE-2026-107888
+Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/c5fc041ca0a211f8e69854907be7b55f56955659]
+
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ CHANGES.md      |  2 ++
+ scheduler/job.c | 20 ++++++++++++++++----
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/CHANGES.md b/CHANGES.md
+index 030b00d839..833021a203 100644
+--- a/CHANGES.md
++++ b/CHANGES.md
+@@ -9,6 +9,8 @@ Changes in CUPS v2.4.11 (2024-09-30)
+ - CVE-2026-NNNNN: The scheduler did not sanitizer fax numbers.
+ - CVE-2026-NNNNN: The scheduler did not open temporary PPD files in exclusive
+   mode.
++- SECURITY-4.1: Held jobs for temporary print queues could crash the scheduler
++  (GHSA-qqm8-4q5h-jg55)
+ - Updated the maximum file descriptor limit for `cupsd` to 64k-1 (Issue #989)
+ - Fixed `lpoptions -d` with a discovered but not added printer (Issue #833)
+ - Fixed incorrect error message for HTTP/IPP errors (Issue #893)
+diff --git a/scheduler/job.c b/scheduler/job.c
+index f746fb0e02..77e62a5af6 100644
+--- a/scheduler/job.c
++++ b/scheduler/job.c
+@@ -332,12 +332,24 @@ cupsdCheckJobs(void)
+       * Check whether the printer is still holding new jobs...
+       */
+ 
+-      printer = cupsdFindDest(job->dest);
++      if ((printer = cupsdFindDest(job->dest)) == NULL)
++      {
++       /*
++        * Whoa, the printer and/or class for this destination went away;
++	* cancel the job...
++	*/
+ 
+-      if (printer->holding_new_jobs)
++        cupsdSetJobState(job, IPP_JSTATE_ABORTED, CUPSD_JOB_PURGE, "Job aborted because the destination printer/class has gone away.");
+         continue;
+-
+-      ippSetString(job->attrs, &job->reasons, 0, "none");
++      }
++      else if (printer->holding_new_jobs)
++      {
++        continue;
++      }
++      else
++      {
++        ippSetString(job->attrs, &job->reasons, 0, "none");
++      }
+     }
+ 
+    /*