Skip to content
Memory corruption Write-up Advanced

Exploiting DNS response parsing on the Wii U

The Wii U's DNS client contains a heap buffer overflow when processing PTR records in the additional section, because a size check was only applied to answer records. An attacker can exploit this to achieve remote code execution on the console.

garyodernichts.blogspot.com

Published on garyodernichts.blogspot.com

{{media:0}} |

The author, on garyodernichts.blogspot.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

Likely a missing bounds check when copying PTR record data in the additional section of a DNS response, as the check was only added for answer records.

Impact

An attacker could achieve remote code execution on the Wii U, leading to full kernel code execution.

What the attacker needed

Wii U on the same network as attacker; Attacker controls DNS server; Victim triggers DNS query

The fix

The vulnerability should be fixed by adding proper bounds checks to the dnc_set_answer call for additional records, as was done for answer records.

How it was found

  1. Set up a malicious DNS server that sends a crafted response with a PTR record in the additional section.
  2. Configure the Wii U to use this DNS server.
  3. Trigger a DNS query from the Wii U (e.g., via the connection test).
  4. The Wii U processes the response and the heap overflow occurs.

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.

A DNS client is the part of a device that looks up website addresses. The Wii U's DNS client had a bug: when it received a special type of DNS response, it copied data into a fixed-size memory area without checking if the data was too big. This could let an attacker take control of the console.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.