Skip to content
DoS Advisory Intermediate CVE-2017-2909

Cesanta Mongoose DNS Query Compressed Name Pointer Denial Of Service

The DNS name decompression routine in Cesanta Mongoose 6.8 does not validate compression pointers, so a pointer that refers back to itself causes an endless loop. An attacker can send such a packet over the network to pin the CPU at full load and deny service.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 7.5 View original

An infinite loop programming error exists in the DNS server functionality of Cesanta Mongoose 6.8 library. A specially crafted DNS request can cause an infinite loop resulting in high CPU usage and Denial Of Service.

Aleksandar Nikolic, 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 decompression loop follows DNS compression pointers without checking that the offset moves forward or that a pointer does not point to another pointer, so a self-referential pointer loops forever.

Impact

A remote, unauthenticated attacker can cause 100% CPU usage and deny service on any device running the affected library.

What the attacker needed

Network access to the DNS service; no authentication needed

The fix

The decompression routine should reject pointers that do not advance past the current position or that point to another pointer, so the loop always terminates.

How it was found

  1. Craft a DNS request whose name field begins with a compression pointer.
  2. Set the pointer offset so that it points back to the same position in the packet.
  3. Send the packet to the Mongoose DNS server.
  4. Observe the decompression routine looping and CPU usage reaching 100%.

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.

DNS packets can shorten repeated parts of a domain name by using a pointer that says 'the rest of the name is over there'. The library follows these pointers but never checks whether a pointer leads back to itself, so it keeps following the same pointer forever. A single crafted network packet therefore keeps the device busy and stops it serving other requests.

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 Aleksandar Nikolic

View all

147 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.