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 files148
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
Next files →

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

workspace/qemu/glA/obs_eadeadlk5.py

Python · 3,497 bytes
import gdb, threading
gdb.execute("file /root/kern/vmlinux.clang")
gdb.execute("target remote :5652")
# Window A (post EDEADLK rollback) + Window B (after 6s timeout cleanup).
# clang: pi_blocked_on=+0x4a0; START_PROXY=c03a9368; wrapper ret=c03f2390;
# cleanup via global symbol rt_mutex_cleanup_proxy_lock (c03a9748).
LOG=open('/tmp/gdb_obs5.log','w')
def log(s):
    LOG.write(s+'\n'); LOG.flush()
PBO=0x4a0
START_PROXY=0xc03a9368
RET_SITE=0xc03f2390
last={'lock':0,'sw':0,'task':0,'i':0,'dumped':0,'timer':False,'cleanup_seen':0}

def rd32(a):
    return int(gdb.parse_and_eval('*(unsigned int*)0x%x'%(a&0xffffffff)))&0xffffffff
def cur_task():
    sp=int(gdb.parse_and_eval('$sp'))&0xffffffff
    return rd32((sp&~0x1fff)+12)
def words(p,cnt):
    try: return ' '.join('%08x'%rd32(p+4*i) for i in range(cnt))
    except Exception as e: return 'rd-err %r'%e

def schedule_window_b():
    if last['timer']: return
    last['timer']=True
    def task():
        try: gdb.execute('interrupt')
        except Exception as e: log('interrupt err %r'%e)
        W=last['task']; sw=last['sw']
        if not W: log('WINDOW B: no task'); return
        pbo=rd32(W+PBO)
        log('=== WINDOW B (after 6s timeout/cleanup) current=%08x cleanup_seen=%d ==='%(
            cur_task(),last['cleanup_seen']))
        log('  W=%08x W.pi_blocked_on=%08x sw=%08x  %s'%(W,pbo,sw,
            '*** STILL DANGLING == STACK waiter ***' if pbo==sw
            else ('CLEARED (0)' if pbo==0 else 'other=%08x'%pbo)))
        log('  stack_waiter words: '+words(sw,12))
    threading.Timer(9.0, lambda: gdb.post_event(task)).start()
    log('scheduled window-B interrupt at +9s')

class StartBP(gdb.Breakpoint):
    def __init__(self): gdb.Breakpoint.__init__(self,'*0x%x'%START_PROXY,gdb.BP_BREAKPOINT)
    def stop(self):
        last['lock']=int(gdb.parse_and_eval('$r0'))&0xffffffff
        last['sw']  =int(gdb.parse_and_eval('$r1'))&0xffffffff
        last['task']=int(gdb.parse_and_eval('$r2'))&0xffffffff
        last['i']+=1
        log('START_PROXY #%d lock=%08x sw=%08x task=%08x'%(last['i'],last['lock'],last['sw'],last['task']))
        return False

class RetBP(gdb.Breakpoint):
    def __init__(self): gdb.Breakpoint.__init__(self,'*0x%x'%RET_SITE,gdb.BP_BREAKPOINT)
    def stop(self):
        if not last['task'] or last['dumped']>=last['i']: return False
        last['dumped']+=1
        ret=int(gdb.parse_and_eval('$r0'))&0xffffffff
        rets=ret-0x100000000 if ret&0x80000000 else ret
        sw=last['sw']; W=last['task']; pbo=rd32(W+PBO)
        log('--- WINDOW A: wrapper ret=%d  W.pi_blocked_on=%08x %s'%(
            rets,pbo,'== STACK waiter (DANGLING)' if pbo==sw else str(pbo)))
        schedule_window_b()
        return False

class CleanupBP(gdb.Breakpoint):
    def __init__(self): gdb.Breakpoint.__init__(self,'rt_mutex_cleanup_proxy_lock',gdb.BP_BREAKPOINT)
    def stop(self):
        r0=int(gdb.parse_and_eval('$r0'))&0xffffffff
        r1=int(gdb.parse_and_eval('$r1'))&0xffffffff
        cur=cur_task()
        if last['sw'] and r1==last['sw']:
            last['cleanup_seen']+=1
            log('cleanup_proxy_lock ENTER #%d lock=%08x waiter=sw current=%08x (W=%08x %s)'%(
                last['cleanup_seen'],r0,cur,last['task'],
                'current==waiter' if cur==last['task'] else 'current!=waiter'))
            log('  pre-cleanup waiter words: '+words(last['sw'],12))
        return False

StartBP(); RetBP(); CleanupBP()
log('obs5 armed')
gdb.execute('continue')