Skip to content
Memory corruption Write-up Advanced

Analysis of the PS3 hypervisor exploit

The PS3 hypervisor could be compromised by a voltage glitch that desynchronises its memory management, allowing the attacker to overwrite the hashed page table and gain read/write access to all memory, including the hypervisor itself. This gives full control over the console's memory and the ability to monitor or control less privileged code.

rdist.root.org

Published on rdist.root.org

George Hotz, previously known as an iPhone hacker, announced that he hacked the Playstation 3 and then provided exploit details. Various articles have been written about this but none of them appear to have analyzed the actual code.

The author, on rdist.root.org

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 the hypervisor did not verify that its memory-management writes (such as deallocating page-table mappings) actually succeeded, so a glitch that caused a write to fail left a stale mapping that the attacker could exploit.

Impact

An attacker could gain full read/write access to all console memory, including the hypervisor, and could monitor and control less privileged code; however, this does not by itself allow running pirated games, as additional steps such as extracting per-game decryption keys are required.

What the attacker needed

Linux installed via OtherOS; Physical access to the console; FPGA connected to the memory bus; User presses the glitch trigger button

The fix

The hypervisor should read back the state of each mapping after changing it and halt if the write failed.

How it was found

  1. Allocate a buffer in the guest Linux kernel.
  2. Ask the hypervisor to create many duplicate HTAB mappings to that buffer.
  3. Deallocate the buffer without releasing all mappings, then trigger the voltage glitch while the hypervisor is deallocating mappings.
  4. Create virtual segments until one has its HTAB located in the freed buffer's address range.
  5. Write HTAB entries that grant full access to the main memory segment.
  6. Install two syscalls that provide direct read/write access to any memory address.

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.

The PS3 uses a small, privileged program called a hypervisor to enforce security and stop normal software from touching certain hardware. The attacker used a hardware trick to briefly disrupt the console's memory writes at just the right moment, so the hypervisor lost track of which memory was free. That mistake let the attacker take control of the memory map and, from there, read and write any part of the console's memory.

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.