Skip to content
DoS Advisory Advanced CVE-2024-50594CVE-2024-50595

STMicroelectronics X-CUBE-AZRTOS-F7 HTTP server chunked PUT request integer underflow vulnerability

The HTTP server in NetX Duo, as shipped in several STMicroelectronics X-CUBE-AZRTOS packages, mishandles the Content-Length of a PUT request when the body arrives in a later packet that is larger than the declared length. An attacker could send such a sequence to make the device write an excessively large file and exhaust its file system resources, causing a denial of service.

Kelly Patterson Follow

Originally disclosed on Cisco Talos

Medium 4.3 View original

An integer underflow vulnerability exists in the HTTP server PUT request functionality of STMicroelectronics X-CUBE-AZRTOS-WL 2.0.0. A specially crafted series of network requests can lead to denial of service.

Kelly Patterson, on Cisco Talos

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 subtracts the size of a received packet from an unsigned remaining-length counter without checking that the packet is not larger than the remaining length, so the counter wraps to a very large value.

Impact

An attacker could consume all of the file system resources, causing a denial of service on the affected device.

What the attacker needed

Network access to the device's HTTP server; PUT request handling enabled

The fix

Developers should disable processing of PUT requests by ending them in an application callback request notify function, and the vendor released a patch.

How it was found

  1. Send an HTTP PUT request whose Content-Length header is 32 but which contains no body data.
  2. Send a second packet containing 33 bytes of data.
  3. The server subtracts 33 from 32, the unsigned counter wraps to 0xffffffff, and the write loop keeps running.
  4. Continue sending data so the server keeps writing to the requested file until file system resources are 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.

A small embedded web server accepts file uploads using the PUT method, and the request says how many bytes will follow. If the actual data that arrives is bigger than that stated number, a counter that is meant to be unsigned wraps around to a huge value instead of stopping. The server then keeps accepting and writing data far beyond what was intended, filling up the device's storage until it can no longer work properly.

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.

More by Kelly Patterson

View all

20 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.