diff options
| author | Zhixiong Chi <zhixiong.chi@windriver.com> | 2018-09-18 01:46:17 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 16:33:09 +0000 |
| commit | b949a00e767a282a87eb7c5e2ce16ef0c73416cf (patch) | |
| tree | c90458167f1b73e50d03546298dcad32e076b3c1 | |
| parent | 6f0d13a19eba35cd5871fb4ba16d6ee39ff29426 (diff) | |
| download | poky-b949a00e767a282a87eb7c5e2ce16ef0c73416cf.tar.gz | |
curl: CVE-2018-14618
Backport the CVE patch from the upstream
https://github.com/curl/curl/commit/57d299a499155d4b327e341c6024e293b0418243.patch
https://curl.haxx.se/docs/CVE-2018-14618.html
https://nvd.nist.gov/vuln/detail/CVE-2018-14618
(From OE-Core rev: b76903b4b7bfec71be0a8a14e2cab4e2ec852222)
(From OE-Core rev: 4c51e82e43cbcc74d9bcabe24b778aae3cf123ca)
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2018-14618.patch | 37 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_7.61.0.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2018-14618.patch b/meta/recipes-support/curl/curl/CVE-2018-14618.patch new file mode 100644 index 0000000000..db07b436d3 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2018-14618.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 57d299a499155d4b327e341c6024e293b0418243 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Stenberg <daniel@haxx.se> | ||
| 3 | Date: Mon, 13 Aug 2018 10:35:52 +0200 | ||
| 4 | Subject: [PATCH] Curl_ntlm_core_mk_nt_hash: return error on too long password | ||
| 5 | |||
| 6 | ... since it would cause an integer overflow if longer than (max size_t | ||
| 7 | / 2). | ||
| 8 | |||
| 9 | This is CVE-2018-14618 | ||
| 10 | |||
| 11 | Bug: https://curl.haxx.se/docs/CVE-2018-14618.html | ||
| 12 | Closes #2756 | ||
| 13 | Reported-by: Zhaoyang Wu | ||
| 14 | |||
| 15 | CVE: CVE-2018-14618 | ||
| 16 | Upstream-Status: Backport | ||
| 17 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> | ||
| 18 | --- | ||
| 19 | lib/curl_ntlm_core.c | 5 ++++- | ||
| 20 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c | ||
| 23 | index e27cab353c..922e85a926 100644 | ||
| 24 | --- a/lib/curl_ntlm_core.c | ||
| 25 | +++ b/lib/curl_ntlm_core.c | ||
| 26 | @@ -557,8 +557,11 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, | ||
| 27 | unsigned char *ntbuffer /* 21 bytes */) | ||
| 28 | { | ||
| 29 | size_t len = strlen(password); | ||
| 30 | - unsigned char *pw = len ? malloc(len * 2) : strdup(""); | ||
| 31 | + unsigned char *pw; | ||
| 32 | CURLcode result; | ||
| 33 | + if(len > SIZE_T_MAX/2) /* avoid integer overflow */ | ||
| 34 | + return CURLE_OUT_OF_MEMORY; | ||
| 35 | + pw = len ? malloc(len * 2) : strdup(""); | ||
| 36 | if(!pw) | ||
| 37 | return CURLE_OUT_OF_MEMORY; | ||
diff --git a/meta/recipes-support/curl/curl_7.61.0.bb b/meta/recipes-support/curl/curl_7.61.0.bb index 7ac0583359..02ff904e62 100644 --- a/meta/recipes-support/curl/curl_7.61.0.bb +++ b/meta/recipes-support/curl/curl_7.61.0.bb | |||
| @@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e66 | |||
| 7 | 7 | ||
| 8 | SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ | 8 | SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ |
| 9 | file://0001-replace-krb5-config-with-pkg-config.patch \ | 9 | file://0001-replace-krb5-config-with-pkg-config.patch \ |
| 10 | file://CVE-2018-14618.patch \ | ||
| 10 | " | 11 | " |
| 11 | 12 | ||
| 12 | SRC_URI[md5sum] = "31d0a9f48dc796a7db351898a1e5058a" | 13 | SRC_URI[md5sum] = "31d0a9f48dc796a7db351898a1e5058a" |
