summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHitendra Prajapati <hprajapati@mvista.com>2025-06-26 10:44:47 +0530
committerArmin Kuster <akuster808@gmail.com>2025-07-06 19:46:54 -0400
commitc32d12b95044db8f86f90d9f4d6c0f39e7884772 (patch)
tree35bfc550ef41381ab3ea67117069e3bd3ba737b4
parentf69d50cfe0358296cc7a457dc38ca99802b988c9 (diff)
downloadmeta-openembedded-c32d12b95044db8f86f90d9f4d6c0f39e7884772.tar.gz
libssh: fix CVE-2025-5318
Upstream-Status: Backport from https://git.libssh.org/projects/libssh.git/commit/?id=5f4ffda88770f95482fd0e66aa44106614dbf466 Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch31
-rw-r--r--meta-oe/recipes-support/libssh/libssh_0.10.6.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch b/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch
new file mode 100644
index 0000000000..02efc7a8f3
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch
@@ -0,0 +1,31 @@
1From 5f4ffda88770f95482fd0e66aa44106614dbf466 Mon Sep 17 00:00:00 2001
2From: Jakub Jelen <jjelen@redhat.com>
3Date: Tue, 22 Apr 2025 21:18:44 +0200
4Subject: CVE-2025-5318: sftpserver: Fix possible buffer overrun
5
6Signed-off-by: Jakub Jelen <jjelen@redhat.com>
7Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8
9Upstream-Status: Backport [https://git.libssh.org/projects/libssh.git/commit/?id=5f4ffda88770f95482fd0e66aa44106614dbf466]
10CVE: CVE-2025-5318
11Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
12---
13 src/sftpserver.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/sftpserver.c b/src/sftpserver.c
17index 9117f155..b3349e16 100644
18--- a/src/sftpserver.c
19+++ b/src/sftpserver.c
20@@ -538,7 +538,7 @@ void *sftp_handle(sftp_session sftp, ssh_string handle){
21
22 memcpy(&val, ssh_string_data(handle), sizeof(uint32_t));
23
24- if (val > SFTP_HANDLES) {
25+ if (val >= SFTP_HANDLES) {
26 return NULL;
27 }
28
29--
302.49.0
31
diff --git a/meta-oe/recipes-support/libssh/libssh_0.10.6.bb b/meta-oe/recipes-support/libssh/libssh_0.10.6.bb
index 31f29c1b7d..3123500f51 100644
--- a/meta-oe/recipes-support/libssh/libssh_0.10.6.bb
+++ b/meta-oe/recipes-support/libssh/libssh_0.10.6.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable
10 file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ 10 file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \
11 file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \ 11 file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \
12 file://run-ptest \ 12 file://run-ptest \
13 file://CVE-2025-5318.patch \
13 " 14 "
14SRCREV = "10e09e273f69e149389b3e0e5d44b8c221c2e7f6" 15SRCREV = "10e09e273f69e149389b3e0e5d44b8c221c2e7f6"
15 16