Codebase list curl / 6ff1853
Add 30_CVE-2018-16839.patch Alessandro Ghedini 5 years ago
2 changed file(s) with 33 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From 92acf6a2df83285a397919506a0a45a638564b9c Mon Sep 17 00:00:00 2001
1 From: Daniel Stenberg <daniel@haxx.se>
2 Date: Fri, 28 Sep 2018 16:08:16 +0200
3 Subject: [PATCH] Curl_auth_create_plain_message: fix too-large-input-check
4
5 Reported-by: Harry Sintonen
6 ---
7 lib/vauth/cleartext.c | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10 --- a/lib/vauth/cleartext.c
11 +++ b/lib/vauth/cleartext.c
12 @@ -73,16 +73,10 @@
13 ulen = strlen(userp);
14 plen = strlen(passwdp);
15
16 - /* Compute binary message length, checking for overflows. */
17 - plainlen = 2 * ulen;
18 - if(plainlen < ulen)
19 - return CURLE_OUT_OF_MEMORY;
20 - plainlen += plen;
21 - if(plainlen < plen)
22 - return CURLE_OUT_OF_MEMORY;
23 - plainlen += 2;
24 - if(plainlen < 2)
25 + /* Compute binary message length. Check for overflows. */
26 + if((ulen > SIZE_T_MAX/4) || (plen > (SIZE_T_MAX/2 - 2)))
27 return CURLE_OUT_OF_MEMORY;
28 + plainlen = 2 * ulen + plen + 2;
29
30 plainauth = malloc(plainlen);
31 if(!plainauth)
2323 27_CVE-2018-1000122.patch
2424 28_CVE-2018-1000301.patch
2525 29_CVE-2018-14618.patch
26 30_CVE-2018-16839.patch
2627
2728 # do not add patches below
2829 90_gnutls.patch