Video summary

I hacked macOS!!!【Lina & Cyan Nyan】

Main summary

Key takeaways

Technology

Summary

Lina Asahi and Cyan Nyan explain how Lina discovered and reported a macOS vulnerability while developing an Apple Silicon GPU driver. The bug was assigned CVE-2022-32947 and earned Lina a $150,000 Apple bug bounty. The vulnerability was fixed; the exploit shown is a retrospective technical demonstration targeting a specific macOS 13 beta environment.

How the exploit worked

  • GPU and memory architecture: The presentation introduces Apple Silicon’s GPU, its firmware-running co-processor, and the GPU’s command buffers. Apple Silicon uses unified memory, so the CPU and GPU share physical RAM while using separate virtual address spaces and page tables.
  • Virtual memory: Lina explains how page tables translate virtual addresses to physical memory, how user and kernel address spaces are separated, and how page-table permissions restrict access.
  • The vulnerability: While examining GPU page-table permissions, Lina found that GPU command-buffer memory—normally protected from GPU access—was mapped with permissions that allowed it to be written. A separate oversight in Apple’s GPU micro-page-protection mechanism, microPPL, allowed the exploit to alter the GPU’s translation-table base for a context.
  • Building the exploit: The exploit uses a custom GPU “micro-sequence” as a small programming language, then uses return-oriented programming (ROP) gadgets in the GPU firmware to invoke the privileged microPPL operation. The resulting page-table changes give GPU shaders access to physical memory, including kernel memory.
  • Getting root: The shader locates the kernel and its page tables, translates kernel virtual addresses, and modifies the current process’s credentials. The demonstration ends with a root shell.
  • Scope and implications: Lina says the exploit works through a Metal shader and could be especially concerning if paired with another vulnerability that allowed malicious shaders to run. She did not pursue a WebGL or browser route. The exploit is specific to the affected software and hardware setup, not a general method for compromising current Macs.

Technical topics and demonstrations

This educational presentation includes:

  1. A working root-shell demonstration.
  2. Explanations of GPU scheduling, firmware, unified memory, page tables, and permissions.
  3. A walkthrough of micro-sequences, ROP, and firmware gadgets.
  4. A custom JavaScript emulator used to step through the exploit and inspect its state.
  5. A look at Lina’s hypervisor and reverse-engineering tools for debugging macOS and GPU memory.

Lina says she submitted Apple a detailed report and source code. She also discusses how the work grew out of her Apple Silicon GPU-driver development for Asahi Linux. Linux’s GPU driver was not affected by this particular kernel-driver bug.

Main speakers and sources

  • Lina Asahi (星乃リナ): Main presenter, Apple Silicon GPU-driver developer, and exploit author.
  • Cyan Nyan: Co-host who asks questions and helps explain the material.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video