010-CVE-2015-3143.patch 904 B

12345678910111213141516171819202122232425262728
  1. From d7d1bc8f08eea1a85ab0d794bc1561659462d937 Mon Sep 17 00:00:00 2001
  2. From: Daniel Stenberg <daniel@haxx.se>
  3. Date: Thu, 16 Apr 2015 13:26:46 +0200
  4. Subject: [PATCH] ConnectionExists: for NTLM re-use, require credentials to
  5. match
  6. CVE-2015-3143
  7. Bug: http://curl.haxx.se/docs/adv_20150422A.html
  8. Reported-by: Paras Sethia
  9. ---
  10. lib/url.c | 2 +-
  11. 1 file changed, 1 insertion(+), 1 deletion(-)
  12. --- a/lib/url.c
  13. +++ b/lib/url.c
  14. @@ -3184,7 +3184,11 @@ ConnectionExists(struct SessionHandle *d
  15. }
  16. if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
  17. +#if defined(USE_NTLM)
  18. + (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
  19. +#else
  20. wantNTLMhttp) {
  21. +#endif
  22. /* This protocol requires credentials per connection or is HTTP+NTLM,
  23. so verify that we're using the same name and password as well */
  24. if(!strequal(needle->user, check->user) ||