summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl/curl/CVE-2018-16890.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/curl/curl/CVE-2018-16890.patch')
-rw-r--r--meta/recipes-support/curl/curl/CVE-2018-16890.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2018-16890.patch b/meta/recipes-support/curl/curl/CVE-2018-16890.patch
new file mode 100644
index 0000000000..3776f362bc
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2018-16890.patch
@@ -0,0 +1,50 @@
1From 53d3c2f92b4a7561b1006494badf8cf2ef9110c0 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Wed, 2 Jan 2019 20:33:08 +0100
4Subject: [PATCH 1/3] NTLM: fix size check condition for type2 received data
5
6Bug: https://curl.haxx.se/docs/CVE-2018-16890.html
7Reported-by: Wenxiang Qian
8CVE-2018-16890
9
10Upstream-Status: Backport
11[https://github.com/curl/curl/commit
12/b780b30d1377adb10bbe774835f49e9b237fb9bb]
13
14CVE: CVE-2018-16890
15
16Signed-off-by: Kevin Weng <t-keweng@microsoft.com>
17---
18 lib/vauth/ntlm.c | 7 ++++---
19 1 file changed, 4 insertions(+), 3 deletions(-)
20
21diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c
22index cdb8d8f0d..0212756ab 100644
23--- a/lib/vauth/ntlm.c
24+++ b/lib/vauth/ntlm.c
25@@ -5,7 +5,7 @@
26 * | (__| |_| | _ <| |___
27 * \___|\___/|_| \_\_____|
28 *
29- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
30+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
31 *
32 * This software is licensed as described in the file COPYING, which
33 * you should have received as part of this distribution. The terms
34@@ -182,10 +182,11 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
35 target_info_len = Curl_read16_le(&buffer[40]);
36 target_info_offset = Curl_read32_le(&buffer[44]);
37 if(target_info_len > 0) {
38- if(((target_info_offset + target_info_len) > size) ||
39+ if((target_info_offset >= size) ||
40+ ((target_info_offset + target_info_len) > size) ||
41 (target_info_offset < 48)) {
42 infof(data, "NTLM handshake failure (bad type-2 message). "
43- "Target Info Offset Len is set incorrect by the peer\n");
44+ "Target Info Offset Len is set incorrect by the peer\n");
45 return CURLE_BAD_CONTENT_ENCODING;
46 }
47
48--
492.22.0
50