diff mbox series

[scarthgap,1/8] cups: Fix CVE-2026-55453

Message ID 20261124084033.72286-2-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-55453 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/d41cf0616688721e9d435d54118c4c8a36ed596a
[2] https://github.com/OpenPrinting/cups/security/advisories/GHSA-7hqf-mfhx-7r3v

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 4c158aaee1..476d093fb2 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -32,6 +32,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
            file://CVE-2026-34990.patch \
            file://CVE-2026-39314.patch \
            file://CVE-2026-39316.patch \
+           file://CVE-2026-55453.patch \
            "
 
 GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
diff --git a/meta/recipes-extended/cups/cups/CVE-2026-55453.patch b/meta/recipes-extended/cups/cups/CVE-2026-55453.patch
new file mode 100644
index 0000000000..9e899cc87c
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/CVE-2026-55453.patch
@@ -0,0 +1,52 @@ 
+From 87a30222512dea2bed50ea436d85b1126bf1ee72 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <msweet@msweet.org>
+Date: Fri, 12 Jun 2026 14:45:48 -0400
+Subject: [PATCH] Sanitize IPP attribute strings.
+
+CVE: CVE-2026-55453
+Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/d41cf0616688721e9d435d54118c4c8a36ed596a]
+
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ CHANGES.md    | 1 +
+ backend/ipp.c | 8 +++++++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/CHANGES.md b/CHANGES.md
+index 7a5e8813fe..c8284c9b42 100644
+--- a/CHANGES.md
++++ b/CHANGES.md
+@@ -5,6 +5,7 @@ CHANGES - OpenPrinting CUPS
+ Changes in CUPS v2.4.11 (2024-09-30)
+ ------------------------------------
+ 
++- CVE-2026-NNNNN: The backend did not sanitize IPP attribute strings.
+ - 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/backend/ipp.c b/backend/ipp.c
+index 8609e3a283..e537bfb096 100644
+--- a/backend/ipp.c
++++ b/backend/ipp.c
+@@ -70,6 +70,7 @@ typedef struct _cups_monitor_s		/**** Monitoring data ****/
+ /*
+  * Globals...
+  */
++
+ #if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
+ static pid_t		child_pid = 0;	/* Child process ID */
+ #endif /* HAVE_GSSAPI && HAVE_XPC */
+@@ -3099,7 +3100,12 @@ quote_string(const char *s,		/* I - String */
+         break;
+     }
+ 
+-    *qptr++ = *s++;
++    if ((*s & 255) < ' ' || *s == 127)
++      *qptr++ = ' ';
++    else
++      *qptr++ = *s;
++
++    s ++;
+   }
+ 
+   *qptr++ = '\"';