Eclipse ThreadX NetX Duo HTTP server chunked PUT request integer underflow vulnerability
An integer underflow in the HTTP server's PUT request handling allows an attacker to send a Content-Length smaller than the actual data in a subsequent packet, causing the server to write an excessively large file and exhaust file system resources. This leads to denial of service.
Originally disclosed on Cisco Talos
An integer underflow vulnerability exists in the HTTP server PUT request functionality of Eclipse ThreadX NetX Duo git commit 6c8e9d1. A specially crafted series of network requests can lead to denial of service.
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
Likely, the code subtracts the actual packet length from the declared Content-Length without checking if the packet length exceeds the remaining length, causing an unsigned integer underflow.
Impact
An attacker could cause a denial of service by consuming all file system resources.
What the attacker needed
Network access to the HTTP server; ability to send PUT requests
The fix
Developers should disable the processing of PUT requests by ending the processing of a PUT request in an application callback request notify function.
How it was found
- Send an HTTP PUT request with a Content-Length header value of 32 but no body data.
- Send a second packet containing 33 bytes of data.
- The server calculates length as -1, which becomes 0xffffffff, and continues writing data to the file.
- Keep sending data until the file system is exhausted.
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 trusts the size declared in the request header but then receives more data than declared. Because of a coding mistake, the remaining size becomes a huge number, so the server keeps writing data to a file until the disk is full. This stops the device from working normally.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.