summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/libssh2/libssh2/CVE-2020-22218.patch34
-rw-r--r--meta/recipes-support/libssh2/libssh2_1.10.0.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-support/libssh2/libssh2/CVE-2020-22218.patch b/meta/recipes-support/libssh2/libssh2/CVE-2020-22218.patch
new file mode 100644
index 0000000000..066233fcae
--- /dev/null
+++ b/meta/recipes-support/libssh2/libssh2/CVE-2020-22218.patch
@@ -0,0 +1,34 @@
1CVE: CVE-2020-22218
2Upstream-Status: Backport [ https://github.com/libssh2/libssh2/commit/642eec48ff3adfdb7a9e562b6d7fc865d1733f45 ]
3Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
4
5
6From 642eec48ff3adfdb7a9e562b6d7fc865d1733f45 Mon Sep 17 00:00:00 2001
7From: lutianxiong <lutianxiong@huawei.com>
8Date: Fri, 29 May 2020 01:25:40 +0800
9Subject: [PATCH] transport.c: fix use-of-uninitialized-value (#476)
10
11file:transport.c
12
13notes:
14return error if malloc(0)
15
16credit:
17lutianxiong
18---
19 src/transport.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/src/transport.c b/src/transport.c
23index 96fca6b8cc..adf96c2437 100644
24--- a/src/transport.c
25+++ b/src/transport.c
26@@ -472,7 +472,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session)
27 /* Get a packet handle put data into. We get one to
28 hold all data, including padding and MAC. */
29 p->payload = LIBSSH2_ALLOC(session, total_num);
30- if(!p->payload) {
31+ if(total_num == 0 || !p->payload) {
32 return LIBSSH2_ERROR_ALLOC;
33 }
34 p->total_num = total_num;
diff --git a/meta/recipes-support/libssh2/libssh2_1.10.0.bb b/meta/recipes-support/libssh2/libssh2_1.10.0.bb
index d5513373b0..8483a292c2 100644
--- a/meta/recipes-support/libssh2/libssh2_1.10.0.bb
+++ b/meta/recipes-support/libssh2/libssh2_1.10.0.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3e089ad0cf27edf1e7f261dfcd06acc7"
10SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ 10SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
11 file://fix-ssh2-test.patch \ 11 file://fix-ssh2-test.patch \
12 file://run-ptest \ 12 file://run-ptest \
13 file://CVE-2020-22218.patch \
13 " 14 "
14 15
15SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51" 16SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51"