Date: 5 Jan 2005 16:32:25 +0200
From: SecuriTeam <support@securiteam.com.>
To: [email protected]Subject: [UNIX] Apache "htdigest" Buffer Overflow
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Apache "htdigest" Buffer Overflow
------------------------------------------------------------------------
SUMMARY
htdigest is "a utility included with Apache Web Server, useful to create
and update usernames, realms and passwords for digest authentication of
HTTP users".
Due improper testing of bounds by the htdigest program, an attacker that
is able to invoke the program can cause it to execute arbitrary code.
DETAILS
The htdigest program does not perform any bounds checking when it copies
the "user" and "realm" supplied as arguments to htdigest into local
buffers. Therefore by sending an overly long buffer, an attacker can
trigger a buffer overflow in the program. This overflow can be exploited
to cause htdigest to execute arbitrary code. This issue can become serious
if htdigest is called from a CGI script available to remote users.
Proof of Concept:
# pwd
/root/httpd-2.0.52/support
# ./htdigest -c file `perl -e 'print "A" x 9999'` user
Adding password for user in realm AAAAAAAAAAAAAAAAA.............AAAAA
New password:
Re-type new password:
Segmentation fault
ADDITIONAL INFORMATION
The information has been provided by <mailto:luca.ercoli@inwind.it.> Luca
Ercoli.
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: [email protected]
In order to subscribe to the mailing list, simply forward this email to: [email protected]
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.