diff mbox series

[wrynose,2/8] cups: Fix CVE-2026-55467

Message ID 20261120105720.2197092-3-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/0cf4e7814d6810ed3c454222bce3aa342d541681
[2] https://github.com/OpenPrinting/cups/security/advisories/GHSA-69qc-prxg-h2c7

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 c635e95015..65db905563 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -26,6 +26,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
            file://CVE-2026-27447-regression_p2.patch \
            file://CVE-2026-41079.patch \
            file://CVE-2026-55453.patch \
+           file://CVE-2026-55467.patch \
            "
 
 GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
diff --git a/meta/recipes-extended/cups/cups/CVE-2026-55467.patch b/meta/recipes-extended/cups/cups/CVE-2026-55467.patch
new file mode 100644
index 0000000000..834a910c2b
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/CVE-2026-55467.patch
@@ -0,0 +1,63 @@ 
+From ae60aee636ef12192e42a22d6ba44330a3aa5120 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <msweet@msweet.org>
+Date: Fri, 12 Jun 2026 15:43:22 -0400
+Subject: [PATCH] Sanitizer destination-uri and pre-dial-string values.
+
+CVE: CVE-2026-55467
+Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/0cf4e7814d6810ed3c454222bce3aa342d541681]
+
+Backport Changes:
+- Omit the CHANGES.md release-note hunk for the newer upstream release.
+
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ scheduler/job.c | 29 +++++++++++++++++++++++++++--
+ 1 file changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/job.c b/scheduler/job.c
+index 2ef56c41..183c76fa 100644
+--- a/scheduler/job.c
++++ b/scheduler/job.c
+@@ -3901,12 +3901,37 @@ get_options(cupsd_job_t *job,		/* I - Job */
+     ipp_t *ipp = ippGetCollection(attr, 0);	// Collection value
+     const char *destination_uri = ippGetString(ippFindAttribute(ipp, "destination-uri", IPP_TAG_URI), 0, NULL);
+     const char *pre_dial_string = ippGetString(ippFindAttribute(ipp, "pre-dial-string", IPP_TAG_TEXT), 0, NULL);
++    char buffer[256], *bufptr;		// Sanitized value
+ 
+     if (destination_uri && !strncmp(destination_uri, "tel:", 4))
+-      num_pwgppds = cupsAddOption("phone", destination_uri + 4, num_pwgppds, &pwgppds);
++    {
++      for (destination_uri += 4, bufptr = buffer; *destination_uri && bufptr < (buffer + sizeof(buffer) - 1); destination_uri ++)
++      {
++        if ((*destination_uri & 255) < ' ' || *destination_uri == 127)
++          *bufptr++ = ' ';
++	else
++	  *bufptr++ = *destination_uri;
++      }
++
++      *bufptr = '\0';
++
++      num_pwgppds = cupsAddOption("phone", buffer, num_pwgppds, &pwgppds);
++    }
+ 
+     if (pre_dial_string)
+-      num_pwgppds = cupsAddOption("faxPrefix", pre_dial_string, num_pwgppds, &pwgppds);
++    {
++      for (bufptr = buffer; *pre_dial_string && bufptr < (buffer + sizeof(buffer) - 1); pre_dial_string ++)
++      {
++        if ((*pre_dial_string & 255) < ' ' || *pre_dial_string == 127)
++          *bufptr++ = ' ';
++	else
++	  *bufptr++ = *pre_dial_string;
++      }
++
++      *bufptr = '\0';
++
++      num_pwgppds = cupsAddOption("faxPrefix", buffer, num_pwgppds, &pwgppds);
++    }
+   }
+ 
+  /*
+-- 
+2.35.6
+