summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2026-03-12 09:57:28 +0530
committerGyorgy Sarvari <skandigraun@gmail.com>2026-03-12 06:22:26 +0100
commit8af1978e4802efa0b6df5f8944747dbfa1e5349d (patch)
treefbc1a15e853215eac18b7bf1c8a6ff554ea0d9cb
parent9b589197320f46631100fc25c9591a2c6fd307f7 (diff)
downloadmeta-openembedded-8af1978e4802efa0b6df5f8944747dbfa1e5349d.tar.gz
libssh: Fix CVE-2026-3731
Pick commit according to [1] [1] https://security-tracker.debian.org/tracker/CVE-2026-3731 [2] https://www.libssh.org/security/advisories/libssh-2026-sftp-extensions.txt Skip the test file change as it's not available in libssh-0.8.9 Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
-rw-r--r--meta-oe/recipes-support/libssh/libssh/CVE-2026-3731.patch44
-rw-r--r--meta-oe/recipes-support/libssh/libssh_0.8.9.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libssh/libssh/CVE-2026-3731.patch b/meta-oe/recipes-support/libssh/libssh/CVE-2026-3731.patch
new file mode 100644
index 0000000000..89c2bd552b
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/libssh/CVE-2026-3731.patch
@@ -0,0 +1,44 @@
1From f80670a7aba86cbb442c9b115c9eaf4ca04601b8 Mon Sep 17 00:00:00 2001
2From: Jakub Jelen <jjelen@redhat.com>
3Date: Thu, 11 Dec 2025 13:22:44 +0100
4Subject: [PATCH] sftp: Fix out-of-bound read from sftp extensions
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Signed-off-by: Jakub Jelen <jjelen@redhat.com>
10Reviewed-by: Pavol Žá�ik <pzacik@redhat.com>
11(cherry picked from commit 855a0853ad3abd4a6cd85ce06fce6d8d4c7a0b60)
12
13Upstream-Status: Backport [https://git.libssh.org/projects/libssh.git/commit/?id=f80670a7aba86cbb442c9b115c9eaf4ca04601b8]
14CVE: CVE-2026-3731
15Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
16---
17 src/sftp.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/src/sftp.c b/src/sftp.c
21index 43eb1ad6..be473793 100644
22--- a/src/sftp.c
23+++ b/src/sftp.c
24@@ -686,7 +686,7 @@ const char *sftp_extensions_get_name(sftp_session sftp, unsigned int idx) {
25 return NULL;
26 }
27
28- if (idx > sftp->ext->count) {
29+ if (idx >= sftp->ext->count) {
30 ssh_set_error_invalid(sftp->session);
31 return NULL;
32 }
33@@ -702,7 +702,7 @@ const char *sftp_extensions_get_data(sftp_session sftp, unsigned int idx) {
34 return NULL;
35 }
36
37- if (idx > sftp->ext->count) {
38+ if (idx >= sftp->ext->count) {
39 ssh_set_error_invalid(sftp->session);
40 return NULL;
41 }
42--
432.25.1
44
diff --git a/meta-oe/recipes-support/libssh/libssh_0.8.9.bb b/meta-oe/recipes-support/libssh/libssh_0.8.9.bb
index 3781b501cd..a1fc64446c 100644
--- a/meta-oe/recipes-support/libssh/libssh_0.8.9.bb
+++ b/meta-oe/recipes-support/libssh/libssh_0.8.9.bb
@@ -28,6 +28,7 @@ SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable
28 file://CVE-2025-8277-2.patch \ 28 file://CVE-2025-8277-2.patch \
29 file://CVE-2025-8277-3.patch \ 29 file://CVE-2025-8277-3.patch \
30 file://CVE-2025-8114.patch \ 30 file://CVE-2025-8114.patch \
31 file://CVE-2026-3731.patch \
31 " 32 "
32SRCREV = "04685a74df9ce1db1bc116a83a0da78b4f4fa1f8" 33SRCREV = "04685a74df9ce1db1bc116a83a0da78b4f4fa1f8"
33 34