From: Stefan Mueller via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "Stefan Müller" <stefan.mueller@rey-technology.com>
Subject: [Buildroot] [PATCH v2 4/5] package/libssh2: fix CVE-2026-66034
Date: Thu, 20 Aug 2026 07:32:07 +0000 [thread overview]
Message-ID: <20260820073208.376968-5-stemu86@gmx.ch> (raw)
In-Reply-To: <20260820073208.376968-1-stemu86@gmx.ch>
From: Stefan Müller <stefan.mueller@rey-technology.com>
Backport the fix for CVE-2026-66034.
The publickey subsystem does not sufficiently validate the length of a
server-controlled comment field. A malformed response can therefore
cause an out-of-bounds read.
Use Debian's libssh2 1.11.1 backport of the upstream fix.
Signed-off-by: Stefan Müller <stefan.mueller@rey-technology.com>
---
Backport to: 2025.02.x
---
...009-publickey-fix-potential-OOB-read.patch | 35 +++++++++++++++++++
package/libssh2/libssh2.mk | 3 ++
2 files changed, 38 insertions(+)
create mode 100644 package/libssh2/0009-publickey-fix-potential-OOB-read.patch
diff --git a/package/libssh2/0009-publickey-fix-potential-OOB-read.patch b/package/libssh2/0009-publickey-fix-potential-OOB-read.patch
new file mode 100644
index 0000000000..96b633f3d1
--- /dev/null
+++ b/package/libssh2/0009-publickey-fix-potential-OOB-read.patch
@@ -0,0 +1,35 @@
+From a13bb6c773f0d55ad1628cede57e99803cd898d9 Mon Sep 17 00:00:00 2001
+From: Viktor Szakats <commit@vsz.me>
+Date: Sat, 4 Jul 2026 11:19:49 +0200
+Subject: [PATCH] publickey: fix potential OOB read in
+ `libssh2_publickey_list_fetch()`
+
+Reported-by: Vladimir Eli Tokarev
+Fixes GHSA-w6g9-cpfp-22gc
+
+Closes #2202
+Forwarded: not-needed
+
+CVE: CVE-2026-66034
+Upstream: https://github.com/libssh2/libssh2/commit/a13bb6c773f0d55ad1628cede57e99803cd898d9
+Signed-off-by: Stefan Müller <stefan.mueller@rey-technology.com>
+---
+ src/publickey.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/src/publickey.c
++++ b/src/publickey.c
+@@ -988,6 +988,13 @@
+ }
+
+ if(comment_len) {
++ if(pkey->listFetch_s + comment_len >
++ pkey->listFetch_data + pkey->listFetch_data_len) {
++ _libssh2_error(session, LIBSSH2_ERROR_BUFFER_TOO_SMALL,
++ "ListFetch data too short");
++ goto err_exit;
++ }
++
+ list[keys].num_attrs = 1;
+ list[keys].attrs =
+ LIBSSH2_ALLOC(session,
diff --git a/package/libssh2/libssh2.mk b/package/libssh2/libssh2.mk
index a3c0b6a67f..4a4491f0f1 100644
--- a/package/libssh2/libssh2.mk
+++ b/package/libssh2/libssh2.mk
@@ -33,6 +33,9 @@ LIBSSH2_IGNORE_CVES += CVE-2026-66032
# 0008-openssl-fix-AES-GCM-bounds-checks.patch
LIBSSH2_IGNORE_CVES += CVE-2026-66033
+# 0009-publickey-fix-potential-OOB-read.patch
+LIBSSH2_IGNORE_CVES += CVE-2026-66034
+
ifeq ($(BR2_PACKAGE_LIBSSH2_MBEDTLS),y)
LIBSSH2_DEPENDENCIES += mbedtls
LIBSSH2_CONF_OPTS += --with-libmbedcrypto-prefix=$(STAGING_DIR)/usr \
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-08-20 7:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 7:32 [Buildroot] [PATCH v2 0/5] package/libssh2: fix five security vulnerabilities Stefan Mueller via buildroot
2026-08-20 7:32 ` [Buildroot] [PATCH v2 1/5] package/libssh2: fix CVE-2025-15661 Stefan Mueller via buildroot
2026-08-22 22:02 ` Julien Olivain via buildroot
2026-08-20 7:32 ` [Buildroot] [PATCH v2 2/5] package/libssh2: fix CVE-2026-66032 Stefan Mueller via buildroot
2026-08-20 7:32 ` [Buildroot] [PATCH v2 3/5] package/libssh2: fix CVE-2026-66033 Stefan Mueller via buildroot
2026-08-20 7:32 ` Stefan Mueller via buildroot [this message]
2026-08-20 7:32 ` [Buildroot] [PATCH v2 5/5] package/libssh2: fix CVE-2026-66035 Stefan Mueller via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260820073208.376968-5-stemu86@gmx.ch \
--to=buildroot@buildroot.org \
--cc=stefan.mueller@rey-technology.com \
--cc=stemu86@gmx.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox