Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

170 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/cmp_text.py

Python · 2,251 bytes
#!/usr/bin/env python3
import re,sys
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[int(p[0],16)]=(p[1],p[2])
            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[int(m.group(1),16)]=(m.group(2),m.group(3))
    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(tab)
    import bisect
    i=bisect.bisect_right(ks,va)-1
    nxt=ks[i+1] if i+1<len(ks) else va+0x4000
    return ks[i],nxt

want=['commit_creds','prepare_kernel_cred','override_creds','futex_requeue',
 'futex_wait_requeue_pi','rt_mutex_start_proxy_lock','task_blocks_on_rt_mutex',
 'rt_mutex_enqueue','rt_mutex_enqueue_pi','wake_up_process','try_to_wake_up',
 '__sched_setscheduler','__se_sys_sched_setattr','do_vfs_ioctl','__set_task_comm',
 'rt_mutex_adjust_pi','rt_mutex_adjust_prio_chain','remove_waiter',
 'rt_mutex_slowlock','futex_lock_pi','futex_cmp_requeue_pi','futex_wait_setup',
 'schedule()','__schedule','sched_setattr','SyS_sched_setattr','__se_sys_prctl',
 'sys_prctl','prctl_set_name','vfs_ioctl']
def find(tab,name):
    for a,(t,n) in tab.items():
        if n==name: return a
    return None
for n in want:
    ao=find(O,n); ah=find(H,n)
    if not ao or not ah:
        print(f'{n:38s} O={hex(ao) if ao else "MISS":>10} H={hex(ah) if ah else "MISS":>10}')
        continue
    o0,o1=bounds(O,ao); h0,h1=bounds(H,ah)
    lo=o1-o0; lh=h1-h0
    bo=oppo[o0-BASE:o1-BASE]; bh=hua[h0-BASE:h1-BASE]
    same = bo==bh
    print(f'{n:38s} O={ao:08x}(+0x{lo:x}) H={ah:08x}(+0x{lh:x}) {"IDENTICAL" if same else "DIFF len" if lo!=lh else "DIFF"}')
    if not same and lo==lh:
        diffs=[i for i in range(lo) if bo[i]!=bh[i]]
        if diffs:
            f=diffs[0]; l=diffs[-1]
            print(f'    first diff +0x{f:x}..+0x{l:x} ({len(diffs)} bytes)')