hn.today

Firecracker VM Escape: PwnEscape Part 2

pwn.ai281 points133 comments
Screenshot of Firecracker VM Escape: PwnEscape Part 2

Firecracker runs each virtual CPU in a host thread that repeatedly enters KVM and returns to userspace. Building on a guest-to-host memory primitive, the researchers used access to selected host physical memory to identify the live Firecracker process and redirect one of its vCPU threads. They first placed a recognizable nonce in a guest page, found its host address through EPT translations, and reverse-mapped it to the host process’s page tables. Validating Firecracker’s executable and its load address let them locate relevant code. They then searched for the thread’s saved register frame, checking that it matched an active KVM_RUN ioctl, the expected instruction pointer and stack, and valid userspace state.

To demonstrate control, they changed the saved registers so that the thread would call Firecracker’s write wrapper on return from KVM, printing an eight-byte marker to stderr. A short return sequence cleared the call’s result and sent execution back to the original ioctl continuation; the guest triggered the return with a serial-port write. The marker appeared exactly as expected, the exploit restored the three stack words it had temporarily changed, and Firecracker continued running with guest SSH still responsive. The central finding is that a guest with the described memory primitive can take over a live host thread and execute code as root on the host without terminating the VM.

Read on pwn.ai133 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.