Skip to content
Memory corruption Write-up Advanced

Can You Get Root With Only a Cigarette Lighter?

A researcher used a piezo-electric cigarette lighter to inject electromagnetic faults into a laptop's DDR memory bus, flipping a chosen bit during reads and writes. By spraying page tables and glitching a page-table entry, they gained read/write access to physical memory and replaced the cached first page of the setuid root su binary with their own code, achieving local privilege escalation to root.

da.vidbuchanan.co.uk

Published on da.vidbuchanan.co.uk

Before you can write an exploit, you need a bug. When there are no bugs, we have to get creative—that's where Fault Injection comes in.

The author, on da.vidbuchanan.co.uk

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 absence of any hardware fault-injection countermeasures on the DDR3 memory bus, combined with the kernel trusting cached executable pages, allowed a single bit-flip in a page-table entry to grant arbitrary physical memory access.

Impact

An attacker with physical access and the cheap lighter tool could escalate from an unprivileged user to root, though reliability was only around 20% at a graphical shell and several attempts crashed the whole system.

What the attacker needed

Physical access to the laptop; a piezo-electric lighter; a wire soldered to a DRAM data pin; unprivileged local user account

How it was found

  1. Solder a wire antenna (and optional resistor) to a data pin on the SODIMM to pick up electromagnetic interference.
  2. Click a piezo-electric lighter near the antenna to induce a repeatable single-bit memory error, confirmed under memtest.
  3. Spray roughly half of physical memory with level-0 page tables by mapping a memfd many times with MAP_FIXED at 2MiB alignment.
  4. Loop over read/write mappings that exceed the TLB size, forcing page-table walks, and wait for a glitch that corrupts a level-0 PTE.
  5. Detect the corrupted PTE, then modify it and flush the TLB by touching many mappings to identify which virtual address it maps.
  6. Use the resulting physical memory read/write to find and overwrite the cached first page of the setuid su binary with a small ELF that spawns a root shell.

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 author wanted to become the all-powerful 'root' user on a laptop without using a software bug. Instead they used a cheap lighter that creates a spark to disturb the electrical signals travelling between the processor and memory, causing a single bit of data to flip at random moments. By arranging memory carefully and repeating the attack, they eventually tricked the system into letting them rewrite a privileged program and get a root shell.

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.