Curl_sasl_create_digest_md5_message: fix buffer overflow
authorEldar Zaitov <kyprizel@volema.com>
Wed, 30 Jan 2013 22:22:27 +0000 (23:22 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 6 Feb 2013 10:06:33 +0000 (11:06 +0100)
commitf206d6c055d1008f0edb6d5d5920f0f300b9983a
treef882b5787378cb8e4c1d9cf2c9944c24a454c465
parentadd37cc49f241212bc29d19f9f80700458df6794
Curl_sasl_create_digest_md5_message: fix buffer overflow

When negotiating SASL DIGEST-MD5 authentication, the function
Curl_sasl_create_digest_md5_message() uses the data provided from the
server without doing the proper length checks and that data is then
appended to a local fixed-size buffer on the stack.

This vulnerability can be exploited by someone who is in control of a
server that a libcurl based program is accessing with POP3, SMTP or
IMAP. For applications that accept user provided URLs, it is also
thinkable that a malicious user would feed an application with a URL to
a server hosting code targetting this flaw.

Bug: http://curl.haxx.se/docs/adv_20130206.html
lib/curl_sasl.c