CVE-2019-0196: mod_http2 with scoreboard Use-After-Free (Read)
A crafted HTTP/2 request could cause mod_http2 to read request data from a memory pool after it had been freed. The freed memory was then used to build a string, so the request string could be filled with unintended data, potentially crashing the process or leaking data.
- Triaged in 4 days
- Fixed in 5 months
- Paid in 5 months
- Disclosed after 5 months
A crafted HTTP2 request can trigger reference to request data from a memory pool after its destruction. This memory is subsequently used as input to an sprintf type function for constructing a string value. This unsafe memory access ultimately means that the r->the_request string is poisoned with unintended data.
To reproduce the problem, I have attached a script that will download/compile Apache httpd and reproduce the behavior with ASAN enabled. The archive also contains a nice ASAN output from the event.
Impact
This is an unsafe memory access. It could lead to process crashes, assist in other exploits, or reveal confidential data through unexplored interactions with other httpd modules.
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 use-after-free in mod_http2 where request data from a destroyed memory pool was still referenced and passed into a string formatting function.
Impact
This could lead to process crashes, assist in other exploits, or reveal confidential data through unexplored interactions with other httpd modules.
What the attacker needed
Server running mod_http2; attacker can send HTTP/2 requests
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.
When a program finishes with a chunk of memory it should hand it back and stop using it. Here the HTTP/2 module kept reading from that memory after it was released, so whatever was written there next got treated as real request data. That can crash the server or, in the worst case, expose information.
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.