Bad io_uring: A New Era of Rooting for Android
This talk demonstrates a novel kernel exploitation technique targeting the Linux io_uring subsystem on Android devices. The researchers introduce the 'DirtyPage' technique, which leverages page spraying to achieve arbitrary read/write primitives in the kernel heap. This method effectively bypasses existing security mitigations like KASLR and Samsung's KNOX integrity checks. The presentation includes a live demonstration of privilege escalation on Google Pixel 6 and Samsung S22 devices.
Rooting Android via io_uring: The DirtyPage Technique
TLDR: Researchers at Black Hat 2023 demonstrated that the Linux io_uring subsystem is a massive, under-audited attack surface on Android. By using a novel "DirtyPage" technique, they achieved arbitrary kernel read/write primitives, effectively bypassing KASLR and Samsung’s KNOX integrity protections. This research proves that restricting access to io_uring is insufficient, as privilege escalation remains trivial from privileged contexts.
The Linux kernel’s io_uring subsystem was designed to solve the overhead of traditional asynchronous I/O, but its rapid evolution has turned it into a goldmine for kernel researchers. While developers appreciate the performance gains, the sheer complexity of the implementation has introduced a steady stream of vulnerabilities. If you are auditing Android kernels or hunting for bugs in the mobile ecosystem, ignoring io_uring is no longer an option. The research presented at Black Hat 2023 confirms that this subsystem is not just a desktop concern; it is a primary vector for privilege escalation on modern mobile devices.
The Mechanics of the DirtyPage Technique
At the heart of this research is the "DirtyPage" technique, a method for achieving arbitrary kernel read/write primitives by manipulating the kernel heap. The core issue lies in how io_uring manages memory and how that memory can be reclaimed by other kernel objects.
When an io_uring request is submitted, the kernel allocates memory for it. If an attacker can trigger a use-after-free (UAF) condition on an io_uring_task object, they can force the kernel to free that memory while the subsystem still holds a reference to it. The DirtyPage technique takes this further by using page spraying. By spraying user-space pages that the kernel then recycles for its own slab allocations, an attacker can place their own data exactly where the kernel expects to find its internal structures.
This is not just a theoretical exploit. The researchers demonstrated that by spraying pipe_buffer objects, they could reclaim the memory previously occupied by the io_uring_task. Because pipe_buffer is an elastic object, it is perfect for heap spraying. Once the memory is reclaimed, the attacker can use the pipe_buffer to read and write kernel memory directly from user space. This effectively turns a UAF into a powerful read/write primitive, bypassing KASLR because the attacker can leak the necessary pointers to calculate the kernel base address.
Bypassing Samsung KNOX
One of the most impressive aspects of this research is how it handles hardened targets like Samsung devices. Samsung’s KNOX security suite is designed to protect the integrity of the kernel, specifically the cred structure that defines a process's privileges.
Typically, an attacker would try to overwrite the uid field of their process's cred structure to gain root. KNOX prevents this by ensuring that the cred structure is read-only and by performing cross-checks between the task structure and the cred structure at every system call entry.
The researchers bypassed this by forging a root cred structure and then tampering with the slab_cache pointer in the page. By confusing the kernel into believing the forged cred structure originated from a protected slab cache, they successfully tricked the integrity check. This demonstrates that even with hardware-backed protections, if the underlying memory management logic is flawed, the entire security model can be subverted.
Real-World Impact for Pentesters
For those performing mobile penetration tests or participating in bug bounty programs, this research changes the threat model for Android. You can no longer assume that a device is secure simply because it has the latest patches or because you lack direct access to the kernel.
If you find a way to interact with the io_uring subsystem—even from a restricted context—you have a viable path to privilege escalation. The researchers used syzbot to identify many of these bugs, which is a testament to the effectiveness of automated fuzzing in this area. If you are not already using syzkaller to target kernel subsystems, you are missing out on the most effective way to find these types of vulnerabilities.
Defensive Considerations
Defending against these attacks is difficult because the vulnerability is architectural. While Google has taken steps to restrict access to io_uring on Android, these measures are often incomplete. The best defense is to minimize the attack surface by disabling unnecessary kernel features and ensuring that the kernel is compiled with the latest security mitigations. However, as this research shows, even these measures can be bypassed if the attacker has a solid understanding of the kernel's memory management.
The takeaway for the community is clear: io_uring is a high-value target. Whether you are a researcher looking for your next CVE or a pentester trying to elevate privileges on a locked-down device, focus your efforts on the intersection of memory management and subsystem complexity. The "DirtyPage" technique is just the beginning, and there are undoubtedly more vulnerabilities waiting to be discovered in the depths of the Linux kernel. Keep digging, keep fuzzing, and do not let the complexity of the code intimidate you.
Vulnerability Classes
Tools Used
Target Technologies
Attack Techniques
All Tags
Up Next From This Conference

Chained to Hit: Discovering New Vectors to Gain Remote and Root Access in SAP Enterprise Software

Zero-Touch-Pwn: Abusing Zoom's Zero Touch Provisioning for Remote Attacks on Desk Phones

ODDFuzz: Hunting Java Deserialization Gadget Chains via Structure-Aware Directed Greybox Fuzzing
Similar Talks

Inside the FBI's Secret Encrypted Phone Company 'Anom'

Unsaflock: Unlocking Millions of Hotel Locks

