aboutsummaryrefslogtreecommitdiffstats
path: root/main/curl/CVE-2014-0015.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/curl/CVE-2014-0015.patch')
-rw-r--r--main/curl/CVE-2014-0015.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/main/curl/CVE-2014-0015.patch b/main/curl/CVE-2014-0015.patch
new file mode 100644
index 0000000000..745db00e7b
--- /dev/null
+++ b/main/curl/CVE-2014-0015.patch
@@ -0,0 +1,47 @@
+From 8ae35102c43d8d06572c3a1292eb6e27e663c78d Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Tue, 7 Jan 2014 09:33:54 +0100
+Subject: [PATCH] ConnectionExists: fix NTLM check for new connection
+
+When the requested authentication bitmask includes NTLM, we cannot
+re-use a connection for another username/password as we then risk
+re-using NTLM (connection-based auth).
+
+This has the unfortunate downside that if you include NTLM as a possible
+auth, you cannot re-use connections for other usernames/passwords even
+if NTLM doesn't end up the auth type used.
+
+Reported-by: Paras S
+Patched-by: Paras S
+Bug: http://curl.haxx.se/mail/lib-2014-01/0046.html
+---
+ lib/url.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/url.c b/lib/url.c
+index 74d0893..3f85502 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
++ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -2886,8 +2886,8 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
+ struct connectdata *check;
+ struct connectdata *chosen = 0;
+ bool canPipeline = IsPipeliningPossible(data, needle);
+- bool wantNTLM = (data->state.authhost.want==CURLAUTH_NTLM) ||
+- (data->state.authhost.want==CURLAUTH_NTLM_WB) ? TRUE : FALSE;
++ bool wantNTLM = (data->state.authhost.want & CURLAUTH_NTLM) ||
++ (data->state.authhost.want & CURLAUTH_NTLM_WB) ? TRUE : FALSE;
+ struct connectbundle *bundle;
+
+ *force_reuse = FALSE;
+--
+1.8.5.1
+