SPDY heap buffer overflow
A heap buffer overflow existed in nginx's experimental SPDY module when processing a specially crafted request. An attacker could potentially cause a worker process to crash or execute arbitrary code.
- Fixed in 26 hours
- Paid in under an hour
- Disclosed after under an hour
A bug in the experimental SPDY implementation in nginx was found, which might allow an attacker to cause a heap memory buffer overflow in a worker process by using a specially crafted request, potentially resulting in arbitrary code execution (CVE-2014-0133).
The problem affects nginx 1.3.15 - 1.5.11, compiled with the ngx_http_spdy_module module (which is not compiled by default) and without --with-debug configure option, if the "spdy" option of the "listen" directive is used in a configuration file.
The problem is fixed in nginx 1.5.12, 1.4.7.
Patch for the problem can be found here:
http://nginx.org/download/patch.2014.spdy2.txt
Thanks to Lucas Molas, researcher at Programa STIC, Fundación Dr. Manuel Sadosky, Buenos Aires, Argentina.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a missing bounds check in the SPDY request parsing code allowed a crafted request to overflow a heap buffer.
Impact
An attacker could potentially cause a heap buffer overflow in a worker process, leading to arbitrary code execution, but only on servers using the non-default SPDY module without debug mode.
What the attacker needed
Nginx 1.3.15 - 1.5.11; SPDY module compiled in; spdy listen option enabled; debug option not used
The fix
The problem was fixed in nginx 1.5.12 and 1.4.7.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A heap buffer overflow is a memory safety bug where a program writes more data than a memory buffer can hold, potentially letting an attacker control what happens next. In this case, nginx's optional SPDY feature mishandled a crafted request, which could crash the server or allow code execution.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.