]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix remotely exploitable stack overflow in HTTP manager
authorMatthew Jordan <mjordan@digium.com>
Thu, 15 Mar 2012 19:01:22 +0000 (19:01 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 15 Mar 2012 19:01:22 +0000 (19:01 +0000)
commit4666efb84920d416d6b291d61389b0eb6941c7c4
treea7a235b22ace5938d1172d6c60bca74fd6a6f2cb
parent2073ca37b6cc80e7172971d578f954543b01a0b7
Fix remotely exploitable stack overflow in HTTP manager

There exists a remotely exploitable stack buffer overflow in HTTP digest
authentication handling in Asterisk.  The particular method in question
is only utilized by HTTP AMI.  When parsing the digest information, the
length of the string is not checked when it is copied into temporary buffers
allocated on the stack.

This patch fixes this behavior by parsing out pre-defined key/value pairs
and avoiding unnecessary copies to the stack.

(closes issue ASTERISK-19542)
Reported by: Russell Bryant
Tested by: Matt Jordan

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/utils.c