mirror of
https://git.yoctoproject.org/poky
synced 2026-09-12 06:49:32 +02:00
libssh2: fix CVE-2026-66034
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2026-66034
a13bb6c773
libssh2 ptest results (qemux86-64):
before: PASSED: 1 FAILED: 0 SKIPPED: 0
after: PASSED: 1 FAILED: 0 SKIPPED: 0
(From OE-Core rev: 677c476980e7ef47bc4804682c554796edd0cde8)
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Signed-off-by: Fabien Thomas <fabien.thomas@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
committed by
Paul Barker
parent
69957c8adf
commit
001428f528
40
meta/recipes-support/libssh2/libssh2/CVE-2026-66034.patch
Normal file
40
meta/recipes-support/libssh2/libssh2/CVE-2026-66034.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 16720054e0b3f02e36f31dd04add534d73d4a18d 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
|
||||
|
||||
Backport adaptations:
|
||||
- The upstream fix uses ssh2_err() which is not available in libssh2
|
||||
1.11.1. Replace with the equivalent _libssh2_error() call.
|
||||
|
||||
CVE: CVE-2026-66034
|
||||
Upstream-Status: Backport [https://github.com/libssh2/libssh2/commit/a13bb6c773f0d55ad1628cede57e99804cd898d9]
|
||||
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|
||||
---
|
||||
src/publickey.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/publickey.c b/src/publickey.c
|
||||
index 9c9fa618..f3776d2d 100644
|
||||
--- a/src/publickey.c
|
||||
+++ b/src/publickey.c
|
||||
@@ -988,6 +988,13 @@ libssh2_publickey_list_fetch(LIBSSH2_PUBLICKEY * pkey, unsigned long *num_keys,
|
||||
}
|
||||
|
||||
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,
|
||||
@@ -18,6 +18,7 @@ SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
|
||||
file://CVE-2025-15661-3.patch \
|
||||
file://CVE-2026-66032.patch \
|
||||
file://CVE-2026-66033.patch \
|
||||
file://CVE-2026-66034.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7"
|
||||
|
||||
Reference in New Issue
Block a user