diff options
author | Vijay Anusuri <vanusuri@mvista.com> | 2023-10-20 10:25:07 +0530 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2023-10-21 16:31:35 -0400 |
commit | 300be975359fdb3a3b2bf7c6fe15dea7acac575d (patch) | |
tree | b3a44b6428d535a36e4352235cf878b5c41539dc | |
parent | 0f10a0d394ddffeeb1db0ea94046d86792d704fe (diff) | |
download | meta-openembedded-300be975359fdb3a3b2bf7c6fe15dea7acac575d.tar.gz |
libssh2: Backport fix for CVE-2020-22218
Bug: https://github.com/libssh2/libssh2/pull/476
Upstream-Status: Backport [https://github.com/libssh2/libssh2/commit/642eec48ff3adfdb7a9e562b6d7fc865d1733f45
&
https://github.com/libssh2/libssh2/commit/0b44e558f311671f6e6d14c559bc1c9bda59b8df]
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch | 39 | ||||
-rw-r--r-- | meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch b/meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch new file mode 100644 index 000000000..49dbde737 --- /dev/null +++ b/meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 642eec48ff3adfdb7a9e562b6d7fc865d1733f45 Mon Sep 17 00:00:00 2001 | ||
2 | From: lutianxiong <lutianxiong@huawei.com> | ||
3 | Date: Fri, 29 May 2020 01:25:40 +0800 | ||
4 | Subject: [PATCH] transport.c: fix use-of-uninitialized-value (#476) | ||
5 | |||
6 | file:transport.c | ||
7 | |||
8 | notes: | ||
9 | return error if malloc(0) | ||
10 | |||
11 | credit: | ||
12 | lutianxiong | ||
13 | |||
14 | Bug: https://github.com/libssh2/libssh2/pull/476 | ||
15 | Upstream-Status: Backport [https://github.com/libssh2/libssh2/commit/642eec48ff3adfdb7a9e562b6d7fc865d1733f45 | ||
16 | & | ||
17 | https://github.com/libssh2/libssh2/commit/0b44e558f311671f6e6d14c559bc1c9bda59b8df] | ||
18 | CVE: CVE-2020-22218 | ||
19 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
20 | --- | ||
21 | src/transport.c | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/src/transport.c b/src/transport.c | ||
25 | index 45e445c..35e7df3 100644 | ||
26 | --- a/src/transport.c | ||
27 | +++ b/src/transport.c | ||
28 | @@ -465,7 +465,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) | ||
29 | * or less (including length, padding length, payload, | ||
30 | * padding, and MAC.)." | ||
31 | */ | ||
32 | - if(total_num > LIBSSH2_PACKET_MAXPAYLOAD) { | ||
33 | + if(total_num > LIBSSH2_PACKET_MAXPAYLOAD || total_num == 0) { | ||
34 | return LIBSSH2_ERROR_OUT_OF_BOUNDARY; | ||
35 | } | ||
36 | |||
37 | -- | ||
38 | 2.25.1 | ||
39 | |||
diff --git a/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb b/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb index c1f337a44..e11e66376 100644 --- a/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb +++ b/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb | |||
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c5cf34fc0acb44b082ef50ef5e4354ca" | |||
9 | 9 | ||
10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ | 10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ |
11 | file://CVE-2019-17498.patch \ | 11 | file://CVE-2019-17498.patch \ |
12 | file://CVE-2020-22218.patch \ | ||
12 | " | 13 | " |
13 | SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927" | 14 | SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927" |
14 | SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd" | 15 | SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd" |