Skip to content
DoS Write-up Intermediate

A deep look at BIND9 CVE-2015-5477

A flaw in BIND9's handling of TKEY queries caused an assertion failure and crash when a query included a non-TKEY record with the same name in the additional section. An attacker could crash the server with a single packet.

blog.cloudflare.com

Published on blog.cloudflare.com

Last week ISC published a patch for a critical remotely exploitable vulnerability in the BIND9 DNS server capable of causing a crash with a single packet.

The author, on blog.cloudflare.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The code reused a pointer variable without resetting it to NULL before a second call to a function that required it to be NULL, leading to an assertion failure.

Impact

A remote attacker could crash the BIND server with a single packet, causing a denial of service.

What the attacker needed

Target runs vulnerable BIND9; attacker can send DNS queries

The fix

The fix was to add 'name = NULL;' before the second call to dns_message_findname.

How it was found

  1. Send a query for type TKEY to the BIND server.
  2. Include a record with the same name as the query in the additional section, but not of type TKEY.
  3. The server processes the query, calls dns_message_findname on the additional section, finds the name but not the type, and sets the name pointer.
  4. The server then calls dns_message_findname on the answer section with the now non-NULL name pointer, triggering an assertion failure and crashing.

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 write-up has not been written yet. The Original tab links to the source.

BIND9 is a DNS server that translates domain names to IP addresses. A TKEY query is a special type of DNS request used for authentication between servers. The bug meant that a crafted TKEY query could make the server crash because of a programming error in how it checked for certain records.

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.

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.