libssh2: Fix CVE-2025-15661
PATCH 1/1 libssh2: Fix CVE-2025-15661
Fix CVE-2025-15661[1] similiar to debian[2], two first commits identical, third commit fixes a return code regression introduced by CVE fix commit.
[1] https://nvd.nist.gov/vuln/detail/CVE-2025-15661
[2] https://sources.debian.org/patches/libssh2/1.11.1-4/
Signed-off-by David Nyström <[email protected]>
--- .../libssh2/libssh2/CVE-2025-15661-1.patch | 45 ++++++ .../libssh2/libssh2/CVE-2025-15661-2.patch | 131 ++++++++++++++++++ .../libssh2/libssh2/CVE-2025-15661-3.patch | 57 ++++++++ .../recipes-support/libssh2/libssh2_1.11.1.bb | 3 + 4 files changed, 236 insertions(+) create mode 100644 meta/recipes-support/libssh2/libssh2/CVE-2025-15661-1.patch create mode 100644 meta/recipes-support/libssh2/libssh2/CVE-2025-15661-2.patch create mode 100644 meta/recipes-support/libssh2/libssh2/CVE-2025-15661-3.patch
meta/recipes-support/libssh2/libssh2/CVE-2025-15661-1.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 95028b06d1875e07c99918145234a473e5e8521f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?David=20Nystr=C3=B6m?= <[email protected]> +Date: Thu, 9 Jul 2026 12:36:24 +0000 +Subject: [PATCH 1/3] sftp: add LIBSSH2_UNCONST() macro needed by + CVE-2025-15661 fix +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Needed by the fix for CVE-2025-15661. + +Extracted from upstream commit 606c102e52f8447de2b745dd6c5ddf418defc519 +(build: enable -Wcast-qual, fix fallouts) by Viktor Szakats. +Only the LIBSSH2_UNCONST() macro definition in libssh2_priv.h is +included; the remainder of that commit is not applicable to this +stable branch. + +Upstream-Status: Backport [https://github.com/libssh2/libssh2/commit/606c102e52f8447de2b745dd6c5ddf418defc519] +Signed-off-by: David Nyström <[email protected]> +--- + src/libssh2_priv.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h +index 9b8866dc..bb1f8ad3 100644 +--- a/src/libssh2_priv.h ++++ b/src/libssh2_priv.h +@@ -117,6 +117,14 @@ + #define UINT32_MAX 0xffffffffU + #endif + ++#ifdef _WIN64 ++#define LIBSSH2_UNCONST(p) ((void *)(libssh2_uint64_t)(const void *)(p)) ++#elif defined(_MSC_VER) ++#define LIBSSH2_UNCONST(p) ((void *)(unsigned int)(const void *)(p)) ++#else ++#define LIBSSH2_UNCONST(p) ((void *)(uintptr_t)(const void *)(p)) ++#endif ++ + #if (defined(__GNUC__) || defined(__clang__)) && \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(LIBSSH2_NO_FMT_CHECKS) +-- +2.43.0 +
meta/recipes-support/libssh2/libssh2/CVE-2025-15661-2.patch new file +131 -0
131 lines not on this page · raw message
meta/recipes-support/libssh2/libssh2/CVE-2025-15661-3.patch new file +57 -0
57 lines not on this page · raw message
meta/recipes-support/libssh2/libssh2_1.11.1.bb +3 -0
@@ -13,6 +13,9 @@ SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ file://CVE-2026-7598.patch \ file://CVE-2026-55200.patch \ file://CVE-2026-55199.patch \ + file://CVE-2025-15661-1.patch \ + file://CVE-2025-15661-2.patch \ + file://CVE-2025-15661-3.patch \ " SRC_URI[sha256sum] = "d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7"
Signature · 1 line
2.43.0