diff mbox series

[wrynose,3/8] cups: Fix CVE-2026-55480

Message ID 20261120105720.2197092-4-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/98adfd855950e806508f961d5438ad32e26aac62
[2] https://github.com/OpenPrinting/cups/security/advisories/GHSA-jj94-x3qh-ffp9

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 65db905563..482eb9c85d 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -27,6 +27,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
            file://CVE-2026-41079.patch \
            file://CVE-2026-55453.patch \
            file://CVE-2026-55467.patch \
+           file://CVE-2026-55480.patch \
            "
 
 GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
diff --git a/meta/recipes-extended/cups/cups/CVE-2026-55480.patch b/meta/recipes-extended/cups/cups/CVE-2026-55480.patch
new file mode 100644
index 0000000000..b7a682418a
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/CVE-2026-55480.patch
@@ -0,0 +1,32 @@ 
+From c93f88be468c6eeed863237d87da67e13b2e53c0 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <msweet@msweet.org>
+Date: Fri, 12 Jun 2026 16:15:56 -0400
+Subject: [PATCH] Open temporary PPD files more securely.
+
+CVE: CVE-2026-55480
+Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/98adfd855950e806508f961d5438ad32e26aac62]
+
+Backport Changes:
+- Omit the CHANGES.md release-note hunk for the newer upstream release.
+
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ scheduler/ipp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scheduler/ipp.c b/scheduler/ipp.c
+index 9a280e75..1c9798cb 100644
+--- a/scheduler/ipp.c
++++ b/scheduler/ipp.c
+@@ -4492,7 +4492,7 @@ copy_model(cupsd_client_t *con,		/* I - Client connection */
+ 
+   snprintf(buffer, sizeof(buffer), "%s/daemon/cups-driverd", ServerBin);
+   snprintf(tempfile, sizeof(tempfile), "%s/%d.ppd", TempDir, con->number);
+-  if ((tempfd = open(tempfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0)
++  if ((tempfd = open(tempfile, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL | O_NOFOLLOW, 0600)) < 0)
+     return (-1);
+   if (cupsdOpenPipe(temppipe))
+   {
+-- 
+2.35.6
+