Skip to content
Snippets Groups Projects
Commit 19f66c75 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Thanks for the notification iDEFENCE. We are the "initial vendor" and we sure

got no notification, no mail, no nothing.

You didn't even bother to mail us when you went public with this. Cool.

NTLM buffer overflow fix, as reported here:

http://www.securityfocus.com/archive/1/391042
parent b7721deb
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,6 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn, ...@@ -103,7 +103,6 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn,
header++; header++;
if(checkprefix("NTLM", header)) { if(checkprefix("NTLM", header)) {
unsigned char buffer[256];
header += strlen("NTLM"); header += strlen("NTLM");
while(*header && isspace((int)*header)) while(*header && isspace((int)*header))
...@@ -123,8 +122,12 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn, ...@@ -123,8 +122,12 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn,
(40) Target Information (optional) security buffer(*) (40) Target Information (optional) security buffer(*)
32 (48) start of data block 32 (48) start of data block
*/ */
size_t size;
unsigned char *buffer = (unsigned char *)malloc(strlen(header));
if (buffer == NULL)
return CURLNTLM_BAD;
size_t size = Curl_base64_decode(header, (char *)buffer); size = Curl_base64_decode(header, (char *)buffer);
ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */ ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */
...@@ -134,6 +137,7 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn, ...@@ -134,6 +137,7 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn,
/* at index decimal 20, there's a 32bit NTLM flag field */ /* at index decimal 20, there's a 32bit NTLM flag field */
free(buffer);
} }
else { else {
if(ntlm->state >= NTLMSTATE_TYPE1) if(ntlm->state >= NTLMSTATE_TYPE1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment