* [OE-core][scarthgap][PATCH 1/2] zlib: fix CVE-2026-85091
@ 2026-11-24 9:49 Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-24 9:49 ` [OE-core][scarthgap][PATCH 2/2] zlib: Ignore CVE-2026-76844 Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)
0 siblings, 1 reply; 2+ messages in thread
From: Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-11-24 9:49 UTC (permalink / raw)
To: openembedded-core
From: Devansh Patel <devanshp@cisco.com>
This patch applies the upstream zlib 1.4 backport for
CVE-2026-85091. The upstream fix commit is referenced in [1], and
the public CVE advisory is referenced in [2].
Reset the retained caller-buffer input state after a failed direct
write. Adapt the error branch to zlib 1.3.1 while retaining its
existing return value; non-blocking support is not required.
[1] https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148
[2] https://www.cve.org/CVERecord?id=CVE-2026-85091
Signed-off-by: Devansh Patel <devanshp@cisco.com>
---
.../zlib/zlib/CVE-2026-85091.patch | 40 +++++++++++++++++++
meta/recipes-core/zlib/zlib_1.3.1.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-core/zlib/zlib/CVE-2026-85091.patch
diff --git a/meta/recipes-core/zlib/zlib/CVE-2026-85091.patch b/meta/recipes-core/zlib/zlib/CVE-2026-85091.patch
new file mode 100644
index 00000000..1905df18
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib/CVE-2026-85091.patch
@@ -0,0 +1,40 @@
+From 529a7dec05d4d7c39582715bf2b9c50ec633b5f4 Mon Sep 17 00:00:00 2001
+From: Mark Adler <git@madler.net>
+Date: Wed, 16 Sep 2026 16:26:14 -0700
+Subject: [PATCH] Fix buffer overflow bug in non-blocking gzwrite.
+
+This addresses CVE-2026-85091.
+
+CVE: CVE-2026-85091
+Upstream-Status: Backport [https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148]
+
+Backport Changes:
+- The original hunk does not apply to zlib 1.3.1, which lacks the
+ later ret/state->again write accounting. Reset the same two input
+ fields in its existing gz_comp() failure branch and preserve its
+ return 0 behavior. No non-blocking support prerequisite is needed.
+
+AI-Generated: Uses Codex
+(cherry picked from commit df84af25dc1942490e1d1c899a07619152a46148)
+Signed-off-by: Devansh Patel <devanshp@cisco.com>
+---
+ gzwrite.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/gzwrite.c b/gzwrite.c
+index 435b462..fd340f0 100644
+--- a/gzwrite.c
++++ b/gzwrite.c
+@@ -223,8 +223,11 @@ local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) {
+ n = (unsigned)len;
+ state->strm.avail_in = n;
+ state->x.pos += n;
+- if (gz_comp(state, Z_NO_FLUSH) == -1)
++ if (gz_comp(state, Z_NO_FLUSH) == -1) {
++ state->strm.avail_in = 0;
++ state->strm.next_in = state->in;
+ return 0;
++ }
+ len -= n;
+ } while (len);
+ }
diff --git a/meta/recipes-core/zlib/zlib_1.3.1.bb b/meta/recipes-core/zlib/zlib_1.3.1.bb
index e42578fd..bfcf8ea2 100644
--- a/meta/recipes-core/zlib/zlib_1.3.1.bb
+++ b/meta/recipes-core/zlib/zlib_1.3.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "https://zlib.net/${BP}.tar.gz \
file://0001-configure-Pass-LDFLAGS-to-link-tests.patch \
file://run-ptest \
file://CVE-2026-27171.patch \
+ file://CVE-2026-85091.patch \
"
UPSTREAM_CHECK_URI = "http://zlib.net/"
--
2.35.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [OE-core][scarthgap][PATCH 2/2] zlib: Ignore CVE-2026-76844
2026-11-24 9:49 [OE-core][scarthgap][PATCH 1/2] zlib: fix CVE-2026-85091 Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)
@ 2026-11-24 9:49 ` Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)
0 siblings, 0 replies; 2+ messages in thread
From: Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-11-24 9:49 UTC (permalink / raw)
To: openembedded-core
From: Devansh Patel <devanshp@cisco.com>
Analysis:
- The corrected CVE record identifies webpack-dev-middleware and its
getFilenameFromUrl() path traversal, rather than zlib. [1]
- The package affected by this record is unrelated to zlib's gzip
writer; the zlib writer defect is CVE-2026-85091. [2]
- Hence ignore this CVE for zlib using cpe-incorrect. This applies to
the target, native and nativesdk variants of the recipe.
Reference:
[1] https://www.cve.org/CVERecord?id=CVE-2026-76844
[2] https://www.cve.org/CVERecord?id=CVE-2026-85091
Signed-off-by: Devansh Patel <devanshp@cisco.com>
---
meta/recipes-core/zlib/zlib_1.3.1.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-core/zlib/zlib_1.3.1.bb b/meta/recipes-core/zlib/zlib_1.3.1.bb
index bfcf8ea2..0c2b63c3 100644
--- a/meta/recipes-core/zlib/zlib_1.3.1.bb
+++ b/meta/recipes-core/zlib/zlib_1.3.1.bb
@@ -52,3 +52,6 @@ BBCLASSEXTEND = "native nativesdk"
CVE_PRODUCT = "zlib:zlib gnu:zlib"
CVE_STATUS[CVE-2026-22184] = "not-applicable-config: vulnerable file is not compiled"
+
+# The corrected record describes webpack-dev-middleware, not zlib.
+CVE_STATUS[CVE-2026-76844] = "cpe-incorrect: CVE applies to webpack-dev-middleware, not zlib"
--
2.35.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 9:49 [OE-core][scarthgap][PATCH 1/2] zlib: fix CVE-2026-85091 Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-24 9:49 ` [OE-core][scarthgap][PATCH 2/2] zlib: Ignore CVE-2026-76844 Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox