CVE-2026-98260 (exec: posix CPU timer UAF) - one-command temporary root for OnePlus 16 (PYB110) from uid 2000 shell, with KernelSU/FinaSU handover
一键式临时 root 工具包:只用 CVE-2026-98260 从普通 shell(uid=2000 / u:r:shell:s0)拿到 uid=0,
再把 root 交给 KernelSU 或 FinaSU 管理。
目标固件:
OnePlus 16 (PYB110)/ ColorOS 17 / Android 17 目标内核:6.18.21-android17-5-gf957accaf563-ab15926176-4k(<6.18.54,即修复前) 起点:仅adb可用的 raw shell,不需要解锁 BL、不需要刷任何东西
| 环节 | 状态 |
|---|---|
漏洞在位(begin_new_exec 未回移 posixtimer_exec) | ✅ 二进制逐条验证 |
UAF 触发(bail 后节点留在 rbtree,release_task 二次摘链) | ✅ kprobe 逐帧记录 |
零写原语(rb_erase 写 8 字节) | ✅ 实测 |
SELinux → Permissive(零写 selinux_state - 7) | ✅ 实测 |
uid=0(伪造 cred 指针写) | ✅ 实测 |
| KSU / FinaSU 移交 + 软重启存活 | ✅ 实测 |
| 全流程耗时 | ≈ 35–45 s(一次命中) |
实测设备:一加 16 / PYB110 / 6.18.21-android17-5-gf957accaf563-ab15926176-4k。
其它机型/内核未验证,syms.txt 与 bin/ 里的二进制都是这台机器的。
ROOT.bat /finasu /fast
无参数运行会询问管理器;/ksu 或 /finasu 直接指定。
ROOT.bat # 交互选择管理器
ROOT.bat /ksu /fast # KernelSU + fast 模式
ROOT.bat /finasu /reboot # 先整机重启再跑 FinaSU
ROOT.bat /recover # 软重启卡死后的急救
ROOT.bat /cleanup # 只清理推到设备上的文件
ROOT.bat /check # 只体检资产/设备/python
完整参数见 ROOT.bat 的 usage。
| STEP | 内容 |
|---|---|
| 0 | 检查设备 / python / 资产,push 并 chmod 755 |
| 1 | take_slide_fast.sh 采样 + slide_from_syms.py 投票求 KASLR slide |
| 1.5 | 开机负载门(看 /proc/loadavg 的 runnable,不看 load1) |
| 2 | 确认 slide:brm_plant 打印 [uaf] captured=2048 才算对 |
| 3 | 98260 主链:竞态 → bail → 丢弃页 → 8 KiB stream 抢回 → 假 rb_node → rb_erase 零写 |
| 4 | 加载内核模块(ksud insmod / late-load)+ 安装管理器 APK |
| 5 | su -c id 校验 + 重启管理器 + 180 s 存活观测窗口 |
| 6 | 清理设备上 push 的文件(/data/adb 保留) |
细节:docs/01-how-it-works.md。
ROOT.bat 一键入口(自适应路径,单条命令跑完 STEP 0–6)
scripts/
fastroot.ps1 主流程(PowerShell 5.1)
take_slide_fast.sh 内核化 trace 采样(设备侧)
slide_from_syms.py KASLR slide 投票(用 syms.txt 当 symbol 源)
ksu_load.sh KernelSU 移交
fina_load.sh FinaSU 移交
rootrun.sh 以 root 身份跑设备侧脚本的薄封装
patch_brm.py 把 brm_plant 的编译期常量换成目标机器的地址
docs/
01-how-it-works.md 原理与三要素
02-requirements.md 依赖、如何准备 syms.txt / 二进制
03-offsets.md 本机实测的偏移与常量表
04-troubleshooting.md 失败模式对照表
05-recovery.md 软重启卡死 / 死机急救
06-bugreport-findings.md bugreport 实证
tools/
fetch-deps.ps1 下载 python / adb / KernelSU / FinaSU
make-release.ps1 把 bin/ + syms.txt 打成一个完整可跑包
bin/、syms.txt、第三方 APK 不入库(体积 + 授权原因)。按 docs/02-requirements.md 准备:
brm_plant、pc98260_su、forker:见 docs/02 的构建说明(brm_plant 需要按目标机地址重编)syms.txt:从你自己手机的 boot_a_kernel.bin 提取,不能跨机型混用ksu-base.ko / ksud_official:KernelSU 官方 release(GPL-3.0)KernelSU / FinaSU APK:各自官方 release或直接跑 tools/fetch-deps.ps1。
slide 每 boot 变化,脚本会自动重算。ksud soft-reboot 会 stop 掉 framework 服务且不自动拉起,实测会把机器停死(见 docs/05-recovery.md)。要刷新界面用 am force-stop + am start。ctl.restart zygote 也会停死:ZN 的 zygote_next 一旦被 ctl.stop,init 不再拉起;只重启 zygote → framework 起不来 → init abort → 整机硬挂(连 USB 都掉)。脚本现在会自动检测 ZN 并跳过软重启,见 docs/09-zygisknext-freeze.md。panic_on_oops=1 + panic_on_rcu_stall=1:野写/搜页风暴会直接整机重启,脚本已做节流与熔断。LICENSE)ksud:GPL-3.0(上游)Zygisk Next、LSPosed 等模块:各自授权详见 NOTICE.md。
sganggs/CVE-2026-98260-BRM-AN00、zsw125/o3root、janewas/cve-2026-98260-vivo-gki-researchsu (FinaSU / KernelSU) without a soft rebootksud late-load needs both --kmi and --package-name, otherwise it silently does
nothing and you end up with the SU_NOT_READY_AFTER_15S failure:
/data/local/tmp/ksud_fina late-load --allow-shell \
--kmi android17-6.18 --package-name me.yuki.fina
That creates /system/bin/su (it is the late-load that creates it, not ksud install)
and su -c id then returns uid=0 ... context=u:r:ksu:s0. Details: docs/07-finasu-lateload.md.
The exploit source is included (exploit/), the machine-specific numbers are not.
Three steps, all local to you:
python tools/make-offsets.py --syms syms.txt --out exploit/offsets.h # 7 link addresses
powershell -ExecutionPolicy Bypass -File exploit\build.ps1 # -> bin\brm_plant
ROOT.bat /finasu # slide -> plant -> manager
syms.txt, exploit/offsets.h, slide values and the built binaries are git-ignored:
a fresh clone refuses to run until you derive your own. Full procedure, including how to
extract a symbol table from your own boot image and how to sanity-check the two
symbol + distance constants: docs/08-porting.md.
If you are on the exact same build (OnePlus 16 / PYB110 / 6.18.21-android17-5-gf957accaf563-ab15926176-4k),
a release with prebuilt brm_plant and pc98260_su is published:
Releases. slide is still passed at runtime, and the baked-in link
addresses only match that one kernel — anywhere else, build from source.