
ADB/Termux runner for a CVE-2026-98260 Android kernel UAF exploit: KASLR calibration, fake cred injection, root verification, and optional KernelSU late-load.
CVE-2026-98260 的 adb 执行工具,包含原生实现、profile、校准与验证脚本。
脚本负责生成 profile blob、push、校准、注入、验证;核心是一个 aarch64 原生二进制。
仅用于你本人持有设备的授权安全研究。内核 UAF 时序错误会导致
panic/重启。
| 项 | 值 |
|---|---|
| 机型 | Xiaomi 2602BRT18C / REDMI Turbo 5 Max (dash) |
| 系统 | Android 17 / SDK 37 / arm64-v8a |
| 内核 | 6.6.118-android15-8-gb9cc6ec16bc8-abogki536571621-4k |
| 补丁 | 2026-10-01 |
| 平台 | MediaTek(mtk_printk_ctrl / MT6379) |
实测结果:
calibrate-a slide = 0x2487200000
calibrate-b page_offset = 0xffffff7f80000000 (127/133)
gkc 交叉验证 完全一致 (125/133)
exploit inject ok, C98260_ROOTD_READY=1
verify uid=0(root)
KSU kernelsu Live, 管理器「工作中 [越狱模式]」
Vulnerability confirmation method: extract the ROM's payload.bin -> boot.img -> Image, disassemble begin_new_exec,
posix_cpu_timers_exit is still after exec_task_namespaces (the vulnerable version's position), unfixed.
cd C:\Users\Wanten\repos\cve-2026-98260-adb
python run.py status # 确认设备/内核/uid
python run.py push # push 二进制与 profile
python run.py check # 确认 profile blob 被原生层加载
python run.py calib # 安全:只创建 timer + 读 tracefs
python run.py exploit --yes # 危险:内核 UAF
python run.py verify # 验证 su
python run.py ksu # 可选:KernelSU 接管
Run it all in one go (including KernelSU takeover):
python run.py all --yes
Only run up to verification, without loading KSU:
python run.py all --yes --no-ksu
The script automatically selects the only online adb device; when there are multiple devices, use --serial <serial>.
Push the repository to the phone from the PC:
.\scripts\push-termux.ps1
On the phone, run the two commands as prompted, then tap once using the Termux desktop widget (built into the Play version; for the F-Droid version, use Termux:Widget). See termux/README.md for details.
adb in PATH.adb shell is uid=2000.| Command | Purpose | Risk |
|---|---|---|
status | Print uid / kernel / SELinux / leftover processes | None |
push | Push the binary and profile to /data/local/tmp | None |
check | dump-config, confirm the blob fields are correct | None |
calib | KASLR slide + page_offset | None (read-only tracefs) |
calib2 | Cross-calibrate once using bin/gkc | None |
exploit | UAF + forged cred + rootd | Will panic/reboot |
verify | Execute su -c id via rootd | None |
ksu | ksud late-load takeover of KernelSU; if modules exist, enable them and soft-reboot once | Medium (loads kernel modules + soft reboot) |
all | push + calib + exploit + verify + KSU (soft-reboots if modules exist) | Will panic/reboot; the KSU stage loads kernel modules |
resume | Run only verify + KSU, without re-injecting | None (used to resume after all disconnects midway but injection already succeeded) |
all runs ksu by default after verify succeeds; add --no-ksu to skip it.
After ksu completes, it checks the installed KernelSU modules: if modules exist and are not activated, it enables them automatically,
and runs ksud soft-reboot to make Zygisk Next / Vector take effect; add --no-soft-reboot
to only enable them without soft-rebooting.
cve-2026-98260-adb/
├── run.py # 编排脚本
├── bin/
│ ├── gkc-native-static # 原生实现,静态构建(优先)
│ ├── gkc-native # 动态版
│ └── gkc # 交叉校准实现(只做 calib-a/b)
├── profiles/
│ ├── 6.6.118-...-4k.conf # 本机 profile
│ └── profile.bin # 4B 大端长度 + 308B blob
├── docs/
│ ├── PROFILE.md # profile 每个偏移怎么来的
│ ├── TROUBLESHOOTING.md # 失败码与处理
│ └── BUILD.md # 用 NDK 重新编译
├── scripts/build.ps1 # 一键重建
├── src/
│ ├── native/ # 原生实现(C 源码)
│ └── gkc.c # 交叉校准实现
└── README.md
calibrate-a: Create 2048 CLOCK_THREAD_CPUTIME_ID timers, read the kmem_cache_alloc records in
per_cpu/cpu0/trace_pipe_raw; the mode of
call_site - timer_link is the KASLR slide.
Calibration preferentially selects 2MiB-aligned slide candidates;
run.pyalso validates the score ofpage_offset, automatically retrying once if it is below 50%, and refusing to enter the injection phase if it still fails. The calibration result is also bound to the currentboot_id; after a reboot the old parameters automatically become invalid and recalibration is required.
calibrate-b: simultaneously capture the PFN allocated for order=1 pages and the virtual address of the k_itimer object,
and solve for the linear mapping base page_offset.
exploit:
fork leaks task_struct, setresuid leaks cred;execve + mprotect jitter + tgkill to create a k_itimer UAF;rb_node to write 0 and disable SELinux;cred (uid=0, all caps, init_user_ns, etc.), and after the child process has uid=0, fork rootd.verify: execute su -c id through rootd's UNIX socket.
ksu: run ksud late-load --kmi android15-6.6 as uid 0, and the module appears in /proc/modules.
gkc process or rootd. Force-killing the page with the forged cred may trigger a panic; if it fails, just reboot.ulimit -l is only 64 KB, so mlockall will fail (ENOMEM), and the forged cred page is not locked in memory.
After a successful injection, avoid memory pressure; once KSU takes over, this risk only affects parked child processes.late-load takes effect for a single boot only; the module disappears after a reboot. After rebooting, run all --yes again.run.py all will automatically recalibrate
(preferring a 2MiB-aligned slide and validating the score), with no need to manually edit slide.txt / page_offset.txt.ksud soft-reboot to activate them (Zygisk Next / Vector).
A soft reboot will shut down Termux/adb for a few seconds, but root will not be lost; after it comes back, do not re-inject, just verify with su -c id.
When the widget is tapped again, run.py will detect that KSU is already active and skip the UAF, performing only module checks / a soft reboot if necessary.Permissive; after a successful ksud late-load, the kernel will force it back to Enforcing,
and rootd's unlabeled socket will become invalid and exit accordingly; this is expected behavior.verifiedbootstate=green), so recovery is mainly via reboot;
the process only modifies kernel memory, and a reboot after a panic is usually enough to recover.Requires the Android NDK (r26/r27 both work). See docs/BUILD.md, or:
.\scripts\build.ps1 -Ndk C:\path\to\android-ndk-r27c
For security research on my own authorized devices only. Do not use it on others' devices or in any unauthorized scenario.