summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl/curl/CVE-2015-3143.patch
blob: 745e9456f3ff1dda8e62204edf89946ea7b8e44a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From d7d1bc8f08eea1a85ab0d794bc1561659462d937 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Thu, 16 Apr 2015 13:26:46 +0200
Subject: [PATCH] ConnectionExists: for NTLM re-use, require credentials to
 match

Upstream-Status: Backport

CVE-2015-3143

Bug: http://curl.haxx.se/docs/adv_20150422A.html
Reported-by: Paras Sethia
Signed-off-by: Daniel Stenberg <daniel@haxx.se>
Signed-off-by: Maxin B. John <maxin.john@enea.com>
---
 lib/url.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/url.c b/lib/url.c
index 018bb88..ee3d176 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3207,11 +3207,11 @@ ConnectionExists(struct SessionHandle *data,
            strcmp(check->localdev, needle->localdev))
           continue;
       }
 
       if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
-         wantNTLMhttp) {
+         (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
         /* This protocol requires credentials per connection or is HTTP+NTLM,
            so verify that we're using the same name and password as well */
         if(!strequal(needle->user, check->user) ||
            !strequal(needle->passwd, check->passwd)) {
           /* one of them was different */
-- 
2.1.4