The Art of Exploiting UAF by Ret2bpf in Android Kernel
summary
A ten‑year Use‑After‑Free in xt_qtaguid (CVE‑2021‑0399) yields a real kernel exploit on an Android Pie 4.14 device by freeing a subtag then spraying eventfd and sequence_file objects to leak kernel pointers and hijack sequence operations. The chain builds a free/overwrite primitive, leaks addresses, and invokes arbitrary BPF instructions to bypass ARM64 UAO and gain kernel R/W and root; a working demo targets a Xiaomi Mi 9 and the authors demonstrate a successful privilege escalation. ret2bpf via BPF interpreter
AI-written summary · about
chapters (15)
- 0:00Introduction to UAF in BPF
- 3:54Past vulnerabilities in xt_qtaguid
- 6:01Exploiting CVE-2021-0399
- 10:13Kernel heap layout manipulation
- 13:46Sequence file structure hijacking
- 16:56Demo on Xiaomi Mi 9
- 17:17Second UAF vulnerability found
- 18:39Summary of CVE-2021-0399
- 19:00Android kernel mitigations
- 25:59Kernel defenses against UAF
- 26:43On-device protection features
- 28:08Server-side malware analysis
- 30:15Behavioral detection of exploits
- 31:39Generic Kernel Image benefits
- 32:00Acknowledgments and conclusion
