Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

166 sources

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

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

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

workspace/ota/func_diff.py

Python · 2,358 bytes
#!/usr/bin/env python3
# Byte-level diff of key functions between OPPO and Huawei kernels.
import re,bisect
BASE=0xc0008000
oppo=open('/mnt/d/project/ow/ota/kernel_raw.bin','rb').read()
hua=open('/mnt/d/project/ow/ghostlock-cve-2026-43499/kernel/kernel_raw.bin','rb').read()
def parse_finder(path):
    d={}
    for line in open(path):
        p=line.split()
        if len(p)>=3:
            try: d[p[2]]=(int(p[0],16),p[1])
            except: pass
    return d
def parse_parsed(path):
    d={}
    for line in open(path):
        m=re.match(r'0x([0-9a-f]+)\s+([A-Za-z?])(.*)',line.strip())
        if m: d[m.group(3)]=(int(m.group(1),16),m.group(2))
    return d
O=parse_finder('/mnt/d/project/ow/ota/kallsyms_finder.log')
H=parse_parsed('/mnt/d/project/ow/ghostlock-cve-2026-43499/kernel/kallsyms_parsed.txt')
def bounds(tab,va):
    ks=sorted(a for a,_ in tab.values())
    i=bisect.bisect_right(ks,va)-1
    return ks[i],ks[i+1]
for name in ['futex_requeue','do_futex','rt_mutex_start_proxy_lock','__rt_mutex_start_proxy_lock',
             'remove_waiter','rt_mutex_adjust_pi','adjust_prio_chain','task_blocks_on_rt_mutex',
             'rt_mutex_wait_proxy_lock','rt_mutex_cleanup_proxy_lock','futex_wait_requeue_pi']:
    if name not in O or name not in H:
        print(f'{name}: missing (O={name in O}, H={name in H})'); continue
    va=O[name][0]
    if va!=H[name][0]:
        print(f'{name}: ADDR DIFF O={O[name][0]:#x} H={H[name][0]:#x}'); continue
    a0,a1=bounds(O,va); b0,b1=bounds(H,va)
    so=oppo[a0-BASE:a1-BASE]; sh=hua[b0-BASE:b1-BASE]
    if len(so)!=len(sh):
        print(f'{name} @{va:#x}: SIZE DIFF O={len(so)} H={len(sh)} (next sym O={a1:#x} H={b1:#x})')
    if so==sh:
        print(f'{name} @{va:#x} len={len(so)}: BYTE-IDENTICAL')
    else:
        diffs=[i for i in range(min(len(so),len(sh))) if so[i]!=sh[i]]
        print(f'{name} @{va:#x} len={len(so)}/{len(sh)}: {len(diffs)} byte diffs, first ranges:')
        # group into word (4-byte) diffs
        wd=sorted(set(d//4 for d in diffs))
        groups=[]
        for w in wd:
            if groups and w==groups[-1][-1]+1: groups[-1].append(w)
            else: groups.append([w])
        for g in groups[:12]:
            for w in g:
                off=w*4
                print(f'   +{off:#06x} (va {a0+off:#x}): O={so[off:off+4].hex()} H={sh[off:off+4].hex()}')