Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

168 sources

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

Repository files678
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
Next files →

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

analysis/find_setprio_callers.py

Python · 2,104 bytes
#!/usr/bin/env python3
"""Search for sched_setattr syscall and trace how it triggers PI chain walk.
Also look at __sched_setscheduler to find calls to adjust_prio_chain or rt_mutex_setprio.
"""
import struct
from capstone import *

KERNEL = r"F:\phone\ow251\全量包\kernel_raw.bin"
BASE_VADDR = 0xC0008000

with open(KERNEL, "rb") as f:
    data = f.read()

md = Cs(CS_ARCH_ARM, CS_MODE_ARM | CS_MODE_LITTLE_ENDIAN)

# Search for calls to rt_mutex_setprio (0xc0158ab4)
target = 0xc0158ab4
callers_setprio = []
for off in range(0, len(data) - 4, 4):
    insn = struct.unpack_from("<I", data, off)[0]
    if (insn & 0xFF000000) == 0xEB000000:
        offset = insn & 0x00FFFFFF
        if offset & 0x00800000:
            offset -= 0x01000000
        pc = BASE_VADDR + off + 8
        t = pc + offset * 4
        if t == target:
            callers_setprio.append(BASE_VADDR + off)

print(f"=== Callers of rt_mutex_setprio ({len(callers_setprio)}) ===")
for c in callers_setprio:
    print(f"  0x{c:08x}")

# For each caller, find function start
for c in callers_setprio:
    off = c - BASE_VADDR
    # Search backwards for function prologue
    func_start = None
    for search in range(off, max(0, off - 16384), -4):
        w = struct.unpack_from("<I", data, search)[0]
        if (w & 0xFFFF0000) == 0xE92D0000 and (w & 0xFFFF) & 0x4000:
            if search >= 4:
                prev = struct.unpack_from("<I", data, search - 4)[0]
                if ((prev & 0xFFFF0000) == 0xE8BD0000 and (prev & 0xFFFF) & 0x8000) or prev == 0xE12FFF1E:
                    func_start = search
                    break

    if func_start:
        func_vaddr = BASE_VADDR + func_start
        print(f"\n=== rt_mutex_setprio called from 0x{c:08x} in function 0x{func_vaddr:08x} ===")
        # Disassemble 200 bytes around the call
        start = max(func_start, off - 200)
        code = data[start:off + 40]
        for insn in md.disasm(code, BASE_VADDR + start):
            marker = " <<<" if insn.address == c else ""
            print(f"  0x{insn.address:08x}: {insn.mnemonic:10s} {insn.op_str}{marker}")