Skip to content
DoS Advisory Beginner CVE-2017-12130

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.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.5 View original

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.

Claudio Bozzato, Yves Younan, Lilith Wyatt <(^_^)> and 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 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

  1. Send a UDP packet to port 5353 with a DNS header indicating one question but no question data.
  2. The packet is received and passed to mdns_parse_pkt.
  3. mdns_parse_qn calls uncompress_nlabel with an offset equal to the packet length, which returns NULL.
  4. 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.

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.