diff mbox series

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

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

Commit Message

From: Ashishkumar Parmar <asparmar@cisco.com>

This patch applies the upstream fix referenced in [2], using the commit
shown in [1].

[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 dad2ce88ba..2b63c448c6 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -29,6 +29,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..226839fdc9
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/CVE-2026-107888.patch
@@ -0,0 +1,64 @@ 
+From 6cb1f8abb2b46285db7b4c2cf683ac05fb35ec0c 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 47b394be..cbea543e 100644
+--- a/CHANGES.md
++++ b/CHANGES.md
+@@ -5,6 +5,8 @@ CHANGES - OpenPrinting CUPS
+ Changes in CUPS v2.4.16 (2025-12-04)
+ ------------------------------------
+ 
++- SECURITY-4.1: Held jobs for temporary print queues could crash the scheduler
++  (GHSA-qqm8-4q5h-jg55)
+ - CVE-2026-27447: The scheduler treated local user and group names as case-
+   insensitive.
+ - Fixed cupsd crash if user does not exist (Issue #1555)
+diff --git a/scheduler/job.c b/scheduler/job.c
+index 183c76fa..b688c342 100644
+--- a/scheduler/job.c
++++ b/scheduler/job.c
+@@ -328,12 +328,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");
++      }
+     }
+ 
+    /*
+-- 
+2.35.6
+