]> git.ipfire.org Git - thirdparty/asterisk.git/commit
AST-2018-009: Fix crash processing websocket HTTP Upgrade requests 14.7
authorSean Bright <sean.bright@gmail.com>
Thu, 16 Aug 2018 15:45:53 +0000 (11:45 -0400)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 20 Sep 2018 16:19:42 +0000 (11:19 -0500)
commit31bde103516240cdc98cf7fa591ea16d6b6b677a
tree85c69549ecd18ecec4ec83252659f447ae1ea93f
parentb67fe624c6174b394e821c6b0c6d33fbcd88aa26
AST-2018-009: Fix crash processing websocket HTTP Upgrade requests

The HTTP request processing in res_http_websocket allocates additional
space on the stack for various headers received during an Upgrade request.
An attacker could send a specially crafted request that causes this code
to overflow the stack, resulting in a crash.

* No longer allocate memory from the stack in a loop to parse the header
values.  NOTE: There is a slight API change when using the passed in
strings as is.  We now require the passed in strings to no longer have
leading or trailing whitespace.  This isn't a problem as the only callers
have already done this before passing the strings to the affected
function.

ASTERISK-28013 #close

Change-Id: Ia564825a8a95e085fd17e658cb777fe1afa8091a
res/res_http_websocket.c