Tinysvcmdns Multi-label DNS mdns_parse_qn Denial Of Service Vulnerability
A NULL pointer dereference in tinysvcmdns occurs when a DNS query packet has no question section, causing uncompress_nlabel to return NULL which is stored and later dereferenced. An attacker can send a crafted packet to crash the daemon, leading to denial of service.
Originally disclosed on Cisco Talos
An exploitable NULL pointer dereference vulnerability exists in the tinysvcmdns library version 2017-11-05. A specially crafted packet can make the library dereference a NULL pointer leading to server crash and 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
The return value of uncompress_nlabel is not checked for NULL before being stored and later dereferenced.
What the attacker needed
Network access to the mDNS service
How it was found
- Send a UDP packet to port 5353 with a DNS header indicating one question but no question data.
- The packet is received and passed to mdns_parse_pkt.
- mdns_parse_qn calls uncompress_nlabel with an offset equal to the packet length, which returns NULL.
- The NULL is stored in rr->name and later dereferenced in nlabel_to_str, causing a crash.
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.
This is a bug in a small DNS server library. When it receives a network packet that is missing expected data, it tries to use a 'null' value as if it were real, which crashes the program. An attacker can send such a packet to make the service stop working.
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.