diff options
| author | Chee Yang Lee <chee.yang.lee@intel.com> | 2023-09-04 18:03:10 +0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-09-08 16:09:41 -1000 |
| commit | 91ea1ab7c609a178a63a490b60e0aade309d10bb (patch) | |
| tree | 6f2e1100b3f39b5c7c013216d576fb8230222da7 /meta/recipes-support | |
| parent | 4c27009f166e20ca1a9ce51198158f43192d0cb7 (diff) | |
| download | poky-91ea1ab7c609a178a63a490b60e0aade309d10bb.tar.gz | |
libssh2: fix CVE-2020-22218
(From OE-Core rev: a0b41511766130883e93b5b8a07801a836beeb67)
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-support')
| -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" |
