DFRoot is an Android rooting tool that exploits CVE-2026-43284 (DirtyFrag) — a kernel page cache write primitive — to load a custom kernel module without requiring an unlocked bootloader. It is intentionally designed to be SU Manager agnostic and works with any KernelSU-compatible SU manager.
Important
Before hitting that fork button, consider making a pull request instead :)
Q: Log says patching failed and that my device isn't vulnerable
A: Sorry, there is no fix. Either:
- Your device's kernel is too new
- Your device manufacturer backported the official mitigation
- Accidental mitigation (typically seen on kernel 6.1)
Q: Log says "SUCCESS" or "ksud exited with error", but I don't have root
A: First, try disabling "Auto Soft Reboot" in DFRoot settings if you have it enabled, otherwise #69
Q: I installed a module and now I can't launch root without crashing
A: Toggle "Disable KSU Modules" in DFRoot settings
Q: I installed a module and have "Start at Boot" enabled and now I am bootlooping
A: Typically Android will detect bootloops and boot you into Safe Mode, otherwise you can usually hold the Volume Down button during boot to enter safe mode. From there, disable "Start on Boot" and enable "Disable KSU Modules" in DFRoot settings or just uninstall DFRoot until you stabilize.
Warning
I am not responsible for any damage to your device.
- Install DFRoot
- Install a SU Manager from below:
- Samsung:
- Other:
If you have a custom KernelSU fork for a specific manufacturer, please make a pull request to add it here.
- Start on Boot
- Automatic soft reboot (if
late-load --soft-rebootsupported by your SU Manager) - RO Partition Protection
- Disable all KernelSU modules, to recover from a broken one
- Shizuku not needed — regain root without WiFi!
The Android kernel decrypts AES-CBC ESP packets directly into the page cache of files open for splice(). By crafting IV = AES_ECB_DEC(key, current_content) ⊕ desired_content, any 16-byte-aligned block in a mapped shared library can be overwritten without write permission and without copy-on-write.
The exploit uses this primitive to patch shellcode into libc++.so in the kernel's page cache. The next privileged call to the hooked function runs the shellcode, which loads our custom kernel module via insmod.
-
IpSec transform — App allocates a
UdpEncapsulationSocket+ SPI and builds an AES-CBC/HMAC-SHA256 ESP transform viaIpSecManager. -
splicehelper → crash_dump64 — The splicehelper binary is spliced into
crash_dump64via the CBC primitive.crash_dump64runs in thecrash_dumpSELinux domain (via exec label transition), which can openvendor_filelabeled files (untrusted_app context cannot read these files so we need this bridge). The splicehelper serves two modes: splice mode (pipe a 16-byte page chunk out to the parent for write) and read mode (argv[3]="r", write 16 bytes of file content to a pipe fd for IV computation). -
dfroot.ko → vendor_file — The kernel module is written via the crash_dump bridge (splicehelper splice mode) into a
vendor_file-labeled file. -
libc++ hook (fires in init, uid=0, tid=1) — Shellcode is patched into
libc++.soatstd::ostream::sentry::sentry()(_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_). Triggered by:createOrphanProcess()double-forks so the grandchild is adopted by PID 1 (init); when init reaps the orphan its main thread (tid=1) calls through the hooked function. The shellcode:- Checks
getuid()==0andgettid()==1; returns immediately otherwise - Creates
/dev/dfas a one-shot mutex (O_CREAT|O_EXCL) to prevent re-entry - Clones a worker child (parent returns to init immediately)
- Worker forks a grandchild; grandchild writes
u:r:vendor_modprobe:s0to/proc/self/attr/execthen execs/vendor/bin/insmod <ko_target>
- Checks
-
dfroot.ko init (runs as
vendor_modprobe, uid=0) — The KO is loaded byinsmodin thevendor_modprobeSELinux domain:- Writes
falsetoselinux_state(global permissive) - Bypasses DEFEX via kprobes (if applicable)
- Calls
call_usermodehelperto run our custom bootstrap code
- Writes
-
bootstrap.c — performs various functions and finally launches the su daemon from your installed SU Manager.
make- Original PoC and various code: https://github.com/lsposed/lspromise
- SELinux Permissive kernel modules and various code: https://github.com/polygraphene/DFReroot
- Unprivileged XFRM socket method: https://github.com/combeng6th/DirtyInit