Exploit databaseDownload repository ZIP
GH-b6dd3288ac75829caf44c376b6a83fb5
forxiucn/nginx-cve-2026-42945-poc
Sources for CVE-2026-42945
32 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files68
forxiucn/nginx-cve-2026-42945-pocRevision 4987d77b19a4
- ↑..Parent directory
- ngx_alloc.c
- ngx_alloc.h
- ngx_atomic.h
- ngx_channel.c
- ngx_channel.h
- ngx_daemon.c
- ngx_darwin.h
- ngx_darwin_config.h
- ngx_darwin_init.c
- ngx_darwin_sendfile_chain.c
- ngx_dlopen.c
- ngx_dlopen.h
- ngx_errno.c
- ngx_errno.h
- ngx_file_aio_read.c
- ngx_files.c
- ngx_files.h
- ngx_freebsd.h
- ngx_freebsd_config.h
- ngx_freebsd_init.c
- ngx_freebsd_sendfile_chain.c
- ngx_gcc_atomic_amd64.h
- ngx_gcc_atomic_ppc.h
- ngx_gcc_atomic_sparc64.h
- ngx_gcc_atomic_x86.h
- ngx_linux.h
- ngx_linux_aio_read.c
- ngx_linux_config.h
- ngx_linux_init.c
- ngx_linux_sendfile_chain.c
- ngx_os.h
- ngx_posix_config.h
- ngx_posix_init.c
- ngx_process.c
- ngx_process.h
- ngx_process_cycle.c
- ngx_process_cycle.h
- ngx_readv_chain.c
- ngx_recv.c
- ngx_send.c
- ngx_setaffinity.c
- ngx_setaffinity.h
- ngx_setproctitle.c
- ngx_setproctitle.h
- ngx_shmem.c
- ngx_shmem.h
- ngx_socket.c
- ngx_socket.h
- ngx_solaris.h
- ngx_solaris_config.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/nginx-1.26.3/src/os/unix/ngx_setaffinity.c
C · 1,213 bytes
/*
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#if (NGX_HAVE_CPUSET_SETAFFINITY)
void
ngx_setaffinity(ngx_cpuset_t *cpu_affinity, ngx_log_t *log)
{
ngx_uint_t i;
for (i = 0; i < CPU_SETSIZE; i++) {
if (CPU_ISSET(i, cpu_affinity)) {
ngx_log_error(NGX_LOG_NOTICE, log, 0,
"cpuset_setaffinity(): using cpu #%ui", i);
}
}
if (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
sizeof(cpuset_t), cpu_affinity) == -1)
{
ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
"cpuset_setaffinity() failed");
}
}
#elif (NGX_HAVE_SCHED_SETAFFINITY)
void
ngx_setaffinity(ngx_cpuset_t *cpu_affinity, ngx_log_t *log)
{
ngx_uint_t i;
for (i = 0; i < CPU_SETSIZE; i++) {
if (CPU_ISSET(i, cpu_affinity)) {
ngx_log_error(NGX_LOG_NOTICE, log, 0,
"sched_setaffinity(): using cpu #%ui", i);
}
}
if (sched_setaffinity(0, sizeof(cpu_set_t), cpu_affinity) == -1) {
ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
"sched_setaffinity() failed");
}
}
#endif