new file mode 100644
@@ -0,0 +1,75 @@
+From b1545c47cddc9948cb0743b2ceb140a63c88acbc Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Thu, 16 Apr 2026 12:11:44 -0700
+Subject: [PATCH] gzexe: use -C if lacking mktemp
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+(Problem reported by Michał Majchrowicz.)
+* gzexe.in: If mktemp is needed but not installed,
+use ‘set -C’ to avoid a race when creating a temporary file.
+* zdiff.in: Use the same pattern here, even though the old
+code was probably OK anyway.
+
+CVE: CVE-2026-41991
+Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gzip.git/commit/?id=4e6f8b24ab823146ab8776f0b7fe486ab34d4269]
+
+(cherry picked from commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269)
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ NEWS | 5 +++++
+ gzexe.in | 1 +
+ zdiff.in | 7 +++----
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index 53bdf56..2d2eb81 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,5 +1,10 @@
+ GNU gzip NEWS -*- outline -*-
+
++ On old-fashioned or limited platforms lacking mktemp, gzexe and
++ zdiff no longer have a race when creating a temporary file.
++ [bug present since the beginning]
++
++
+ * Noteworthy changes in release 1.14 (2025-04-09) [stable]
+
+ ** Bug fixes
+diff --git a/gzexe.in b/gzexe.in
+index 1267d6e..09a2571 100644
+--- a/gzexe.in
++++ b/gzexe.in
+@@ -127,6 +127,7 @@ for i do
+ tmp=`mktemp "${dir}gzexeXXXXXXXXX"`
+ else
+ tmp=${dir}gzexe$$
++ (umask 77; set -C; > "$tmp")
+ fi && { cp -p "$file" "$tmp" 2>/dev/null || cp "$file" "$tmp"; } || {
+ res=$?
+ printf >&2 '%s\n' "$0: cannot copy $file"
+diff --git a/zdiff.in b/zdiff.in
+index a8689a0..c04a8c0 100644
+--- a/zdiff.in
++++ b/zdiff.in
+@@ -156,12 +156,11 @@ case $file2 in
+ *) TMPDIR=/tmp/;;
+ esac
+ if command -v mktemp >/dev/null 2>&1; then
+- tmp=`mktemp "${TMPDIR}zdiffXXXXXXXXX"` ||
+- exit 2
++ tmp=`mktemp "${TMPDIR}zdiffXXXXXXXXX"`
+ else
+- set -C
+ tmp=${TMPDIR}zdiff$$
+- fi
++ (umask 77; set -C; > "$tmp")
++ fi &&
+ 'gzip' -cdfq -- "$file2" > "$tmp" || exit 2
+ gzip_status=$(
+ exec 4>&1
+--
+2.53.0
+
@@ -6,6 +6,7 @@ LICENSE = "GPL-3.0-or-later"
SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
file://run-ptest \
+ file://CVE-2026-41991.patch \
"
SRC_URI:append:class-target = " file://wrong-path-fix.patch"