mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
00de17fa46
Upstream-Status: Backport [https://gitlab.com/libssh/libssh-mirror/-/commit/533d881b0f4b24c72b35ecc97fa35d295d063e53 & https://gitlab.com/libssh/libssh-mirror/-/commit/2782cb0495b7450bd8fe43ce4af886b66fea6c40 & https://gitlab.com/libssh/libssh-mirror/-/commit/10b3ebbe61a7031a3dae97f05834442220447181 & https://gitlab.com/libssh/libssh-mirror/-/commit/245ad744b5ab0582fef7cf3905a717b791d7e08b] Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From 533d881b0f4b24c72b35ecc97fa35d295d063e53 Mon Sep 17 00:00:00 2001
|
|
From: Andreas Schneider <asn@cryptomilk.org>
|
|
Date: Wed, 3 Jun 2020 10:04:09 +0200
|
|
Subject: [PATCH] sftpserver: Add missing NULL check for ssh_buffer_new()
|
|
|
|
Thanks to Ramin Farajpour Cami for spotting this.
|
|
|
|
Fixes T232
|
|
|
|
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
|
|
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
|
|
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
|
|
|
|
Upstream-Status: Backport [https://gitlab.com/libssh/libssh-mirror/-/commit/533d881b0f4b24c72b35ecc97fa35d295d063e53]
|
|
CVE: CVE-2020-16135
|
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
|
---
|
|
src/sftpserver.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/sftpserver.c b/src/sftpserver.c
|
|
index 5a2110e58..b639a2ce3 100644
|
|
--- a/src/sftpserver.c
|
|
+++ b/src/sftpserver.c
|
|
@@ -67,6 +67,12 @@ sftp_client_message sftp_get_client_message(sftp_session sftp) {
|
|
|
|
/* take a copy of the whole packet */
|
|
msg->complete_message = ssh_buffer_new();
|
|
+ if (msg->complete_message == NULL) {
|
|
+ ssh_set_error_oom(session);
|
|
+ sftp_client_message_free(msg);
|
|
+ return NULL;
|
|
+ }
|
|
+
|
|
ssh_buffer_add_data(msg->complete_message,
|
|
ssh_buffer_get(payload),
|
|
ssh_buffer_get_len(payload));
|
|
--
|
|
GitLab
|
|
|