Weston Embedded uC-HTTP HTTP Server form boundary memory corruption vulnerability
The HTTP server does not check the length of the multipart form boundary string before using it as an index into a 72-byte heap buffer, so a long boundary causes a one-byte NULL overwrite. This corrupts a free-list pointer and can let an attacker allocate memory at an arbitrary address, potentially leading to code execution.
Originally disclosed on Cisco Talos
A memory corruption vulnerability exists in the HTTP Server form boundary functionality of Weston Embedded uC-HTTP v3.01.01. A specially crafted network packet can lead to code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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
The code uses the boundary length as an index into a fixed 72-byte heap buffer without checking that the length is less than the buffer size.
Impact
A specially crafted network packet could lead to code execution, though the CVSS vector notes high attack complexity.
What the attacker needed
Form or multipart form processing enabled; ability to send crafted HTTP requests
The fix
The vendor released a patch that rejects boundary strings of 72 bytes or more; disabling form and multipart form processing also mitigates the issue.
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.
The server stores a short piece of text from each request (the form boundary) in a fixed-size memory area. It never checks whether that text is too long, so a very long value writes past the end of the area and damages a pointer the memory manager uses to track free space. By carefully arranging memory, an attacker can turn that damage into writing data anywhere in the program, which can lead to running their own code.
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.