diff options
-rw-r--r-- | meta/recipes-support/libssh2/libssh2/CVE-2020-22218.patch | 34 | ||||
-rw-r--r-- | meta/recipes-support/libssh2/libssh2_1.10.0.bb | 1 |
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 @@ | |||
1 | CVE: CVE-2020-22218 | ||
2 | Upstream-Status: Backport [ https://github.com/libssh2/libssh2/commit/642eec48ff3adfdb7a9e562b6d7fc865d1733f45 ] | ||
3 | Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> | ||
4 | |||
5 | |||
6 | From 642eec48ff3adfdb7a9e562b6d7fc865d1733f45 Mon Sep 17 00:00:00 2001 | ||
7 | From: lutianxiong <lutianxiong@huawei.com> | ||
8 | Date: Fri, 29 May 2020 01:25:40 +0800 | ||
9 | Subject: [PATCH] transport.c: fix use-of-uninitialized-value (#476) | ||
10 | |||
11 | file:transport.c | ||
12 | |||
13 | notes: | ||
14 | return error if malloc(0) | ||
15 | |||
16 | credit: | ||
17 | lutianxiong | ||
18 | --- | ||
19 | src/transport.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/src/transport.c b/src/transport.c | ||
23 | index 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" | |||
10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ | 10 | SRC_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 | ||
15 | SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51" | 16 | SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51" |