// https://syzkaller.appspot.com/bug?id=7349616606afa3c986c377792f7ccbf9daae1142 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } #define BITMASK(bf_off, bf_len) (((1ull << (bf_len)) - 1) << (bf_off)) #define STORE_BY_BITMASK(type, htobe, addr, val, bf_off, bf_len) \ *(type*)(addr) = \ htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | \ (((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len)))) static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } #define MAX_FDS 30 static void setup_common() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setsid(); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } static int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static void drop_caps(void) { struct __user_cap_header_struct cap_hdr = {}; struct __user_cap_data_struct cap_data[2] = {}; cap_hdr.version = _LINUX_CAPABILITY_VERSION_3; cap_hdr.pid = getpid(); if (syscall(SYS_capget, &cap_hdr, &cap_data)) exit(1); const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE); cap_data[0].effective &= ~drop; cap_data[0].permitted &= ~drop; cap_data[0].inheritable &= ~drop; if (syscall(SYS_capset, &cap_hdr, &cap_data)) exit(1); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); setup_common(); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } loop(); exit(1); } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); } static void close_fds() { for (int fd = 3; fd < MAX_FDS; fd++) close(fd); } static void setup_sysctl() { char mypid[32]; snprintf(mypid, sizeof(mypid), "%d", getpid()); struct { const char* name; const char* data; } files[] = { {"/sys/kernel/debug/x86/nmi_longest_ns", "10000000000"}, {"/proc/sys/kernel/hung_task_check_interval_secs", "20"}, {"/proc/sys/net/core/bpf_jit_kallsyms", "1"}, {"/proc/sys/net/core/bpf_jit_harden", "0"}, {"/proc/sys/kernel/kptr_restrict", "0"}, {"/proc/sys/kernel/softlockup_all_cpu_backtrace", "1"}, {"/proc/sys/fs/mount-max", "100"}, {"/proc/sys/vm/oom_dump_tasks", "0"}, {"/proc/sys/debug/exception-trace", "0"}, {"/proc/sys/kernel/printk", "7 4 1 3"}, {"/proc/sys/net/ipv4/ping_group_range", "0 65535"}, {"/proc/sys/kernel/keys/gc_delay", "1"}, {"/proc/sys/vm/oom_kill_allocating_task", "1"}, {"/proc/sys/kernel/ctrl-alt-del", "0"}, {"/proc/sys/kernel/cad_pid", mypid}, }; for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) { if (!write_file(files[i].name, files[i].data)) printf("write to %s failed: %s\n", files[i].name, strerror(errno)); } } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); close_fds(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } } } #ifndef __NR_bpf #define __NR_bpf 321 #endif uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; *(uint32_t*)0x20000300 = 2; *(uint32_t*)0x20000304 = 0x80; *(uint8_t*)0x20000308 = 0x15; *(uint8_t*)0x20000309 = 0; *(uint8_t*)0x2000030a = 0; *(uint8_t*)0x2000030b = 0; *(uint32_t*)0x2000030c = 0; *(uint64_t*)0x20000310 = 0; *(uint64_t*)0x20000318 = 0; *(uint64_t*)0x20000320 = 0; STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 0, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 1, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 2, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 3, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 4, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 5, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 6, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 7, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 8, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 9, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 10, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 11, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 12, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 13, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 14, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 15, 2); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 17, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 18, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 19, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 20, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 21, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 22, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 23, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 24, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 25, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 26, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 27, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 28, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 29, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 30, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 31, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 32, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 33, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 34, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 35, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 36, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 37, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 38, 26); *(uint32_t*)0x20000330 = 0; *(uint32_t*)0x20000334 = 0; *(uint64_t*)0x20000338 = 0; *(uint64_t*)0x20000340 = 0; *(uint64_t*)0x20000348 = 0; *(uint64_t*)0x20000350 = 0; *(uint32_t*)0x20000358 = 0; *(uint32_t*)0x2000035c = 0; *(uint64_t*)0x20000360 = 0; *(uint32_t*)0x20000368 = 0; *(uint16_t*)0x2000036c = 0; *(uint16_t*)0x2000036e = 0; *(uint32_t*)0x20000370 = 0; *(uint32_t*)0x20000374 = 0; *(uint64_t*)0x20000378 = 0; syscall(__NR_perf_event_open, 0x20000300ul, 0, 0ul, -1, 0ul); *(uint32_t*)0x20000300 = 2; *(uint32_t*)0x20000304 = 0x80; *(uint8_t*)0x20000308 = 0x15; *(uint8_t*)0x20000309 = 1; *(uint8_t*)0x2000030a = 0; *(uint8_t*)0x2000030b = 0; *(uint32_t*)0x2000030c = 0; *(uint64_t*)0x20000310 = 0; *(uint64_t*)0x20000318 = 0; *(uint64_t*)0x20000320 = 0; STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 0, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 1, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 2, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 3, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 4, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 5, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 6, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 7, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 8, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 9, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 10, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 11, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 12, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 13, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 14, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 15, 2); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 17, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 18, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 19, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 20, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 21, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 22, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 23, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 24, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 25, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 26, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 27, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 28, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 29, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 30, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 31, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 32, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 33, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 34, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 35, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 36, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 37, 1); STORE_BY_BITMASK(uint64_t, , 0x20000328, 0, 38, 26); *(uint32_t*)0x20000330 = 0; *(uint32_t*)0x20000334 = 0; *(uint64_t*)0x20000338 = 0; *(uint64_t*)0x20000340 = 0; *(uint64_t*)0x20000348 = 0; *(uint64_t*)0x20000350 = 0; *(uint32_t*)0x20000358 = 0; *(uint32_t*)0x2000035c = 0; *(uint64_t*)0x20000360 = 0; *(uint32_t*)0x20000368 = 0; *(uint16_t*)0x2000036c = 0; *(uint16_t*)0x2000036e = 0; *(uint32_t*)0x20000370 = 0; *(uint32_t*)0x20000374 = 0; *(uint64_t*)0x20000378 = 0; res = syscall(__NR_perf_event_open, 0x20000300ul, 0, 0ul, -1, 0ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000080 = 5; *(uint32_t*)0x20000084 = 3; *(uint64_t*)0x20000088 = 0x20004140; memcpy( (void*)0x20004140, "\x85\x00\x00\x00\x6d\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x95\x00" "\x00\x00\x00\x00\x00\x00\xaf\xcd\x48\xd6\x49\x4d\x61\x4d\xcc\x6f\xab\xec" "\x47\x0d\xb2\xc6\x16\x12\xba\x39\x21\x76\xdd\x29\x63\x22\x8e\x1d\x69\xba" "\x7e\xa9\x4c\x50\x0d\xc4\xef\x2f\xad\x96\xed\x40\x6f\x21\xca\xf5\x93\x83" "\x6d\x9e\xa2\xcf\xb0\xe6\x04\x36\xe0\x54\x25\x8c\x46\x86\xb0\x66\x70\x7d" "\xe9\x4a\x4f\x4d\x5f\xc7\x9c\x98\x7d\x66\x9f\xfa\x4a\xac\xa0\xf9\xd9\x92" "\x4b\xe4\x1a\x91\x69\xbd\xfa\xf1\x6d\x1c\x0b\x15\x39\x0b\xb8\xdd\x7f\x16" "\x57\x89\xc6\x91\xde\x6e\xee\x84\x30\x9e\x7a\x23\xc1\x9a\x39\x48\x48\x09" "\x53\x9f\xca\x4e\x0b\x6e\xc0\x15\xa7\xd5\x55\x45\xa3\x4e\xff\xa0\x77\xfa" "\xa5\x5c\x59\xe8\x82\x54\xf5\x40\x77\xf7\x99\xbf\x16\x83\x53\x7a\x8e\xa0" "\x24\x4d\x35\xb2\x13\xbd\xa8\x0c\xc1\x72\xaf\xd8\x0e\x36\x1b\xed\xd8\xb8" "\xcc\x57\x25\x5a\x5e\x3d\x77\xac\x46\x39\x20\xe2\x31\xb7\xae\x0d\xa8\x61" "\x6d\x2b\x79\x58\xf9\x1f\x5d\x82\x21\x75\xed\x60\xab\x38\x6d\x94\xaf\x98" "\xaf\x1d\xa2\xb5\x95\x25\xf8\xfe\x3b\x28\xd7\xe5\x3c\x78\xfb\xfe\x5a\xb0" "\x25\x5f\x34\x71\x60\xec\x83\x43\xe1\x49\x4d\xa4\x84\xeb\xad\x04\x07\xd9" "\x44\x0b\x69\xad\x9f\x19\xab\x8b\x4b\x38\x0a\x00\xd7\x2b\xc0\x48\x0f\x94" "\x9c\x47\x97\x57\x30\x67\x20\x39\x93\x79\xd9\x27\x1c\xf5\x55\xc1\x4d\x56" "\xb5\x1c\x22\x98\x23\x7b\xeb\xfc\x08\xe0\xd5\x97\x6a\x94\x2b\x84\x69\x70" "\xcf\xd9\x8b\x9d\x41\xa9\x02\xe5\x11\x1f\x2c\xc5\xe4\x6a\xc1\xc6\x0a\x9b" "\x10\xc0\x74\xbf\xbc\xd4\xb0\x90\x12\x17\x54\x84\x13\x5f\x0e\x51\x9f\x0b" "\x1c\x4a\xaa\x02\x6d\x57\x0e\xcb\x5e\x8c\xdd\xbe\xd6\x5f\xf7\x6f\xf6\x1c" "\x55\x52\x41\x7f\xd7\x03\xf7\xf1\x4d\x8b\x78\xa6\x02\xca\x3c\xdf\x6a\x66" "\x2d\x8b\xc9\xc8\x9c\x91\x20\x07\x2a\x5d\x00\xdc\xdd\x85\x95\x35\x6c\x9b" "\x24\x92\xaa\xf1\x26\x4d\x4e\xf4\xa4\x10\xc8\x82\x83\x48\x67\xbc\xd2\xb6" "\xe5\x59\xd1\x78\x79\x57\x0c\x8a\xd9\x43\xe3\x92\x95\x7b\x4f\x97\x9e\xa1" "\x71\x17\xa1\x32\x01\xba\xfe\x4f\x0f\x6e\xa5\xa6\xc9\x57\xad\xa0\xc5\x48" "\x55\x2b\x57\x1b\xed\x56\x4c\x0a\x2f\xcb\x6d\xa0\x06\xb5\xd0\xfe\x48\x86" "\xa9\xed\xee\x77\xf6\x98\x63\x19\xf8\x5d\xd0\x6a\x24\xc3\x7e\x58\x89\x59" "\xf3\x4d\x2c\x5f\x64\x9b\x85\xe5\xb0\xba\xad\xa5\xf1\xaa\xd4\x9d\xa9\x60" "\xf1\x0d\xdd\x86\xe2\xd1\x63\x8f\x90\xb7\x9c\x7f\x85\x26\xa1\x37\x02\xd6" "\x13\xdc\x88\x67\x0f\x34\x78\x18\x21\x36\xc7\x4d\x16\x37\x16\xba\x82\x19" "\x39\x2d\x65\x58\x2b\x33\xe7\xdf\xd2\x7e\x69\xd7\x1a\x19\xda\x16\xf2\xc3" "\xe6\x83\x17\x6d\x47\xc2\x59\x9d\x03\x00\x8c\x05\xc8\xce\x9e\xdd\x1e\xf5" "\xcc\x23\x69\x34\xac\x48\x3b\x8b\xf8\x07\x94\xec\xb7\xac\x00\xce\x45\x3c" "\x14\xd2\x9d\xab\x6d\xcf\x18\x55\xa1\xab\x3d\x7c\x2e\xe8\xd4\x3e\x47\x9f" "\x3a\x17\xa4\xac\x21\x3b\xfa\x47\x7f\x3d\xa4\x15\x64\xaa\xc2\x51\x92\xcb" "\x10\xe4\xe4\xdf\xc5\xcf\xbd\xef\x1d\x4c\xea\x17\x28\x6e\xc8\xf6\xdb\x16" "\xdc\x62\xb8\xca\x08\x67\x34\x22\x3c\xf7\x18\xc6\xbb\x21\xea\xe7\xec\xa3" "\xcb\x1b\xaa\x31\x05\xa3\x3c\xfc\x2c\xd9\x0a\xdf\x37\x20\xd1\x3c\xd1\x14" "\x69\x5f\xea\x0c\xd0\x17\x35\xa1\x6d\x3c\x4e\x10\x1a\xc6\x71\x3c\x63\x04" "\x45\x40\x2b\x02\xe3\x5e\x48\xf0\x49\xb4\x46\x31\x06\x2d\x46\x55\x06\xce" "\xec\x69\x47\xc7\x8f\xd2\xbb\x24\xc2\x88\xd7\x19\x66\x8a\x71\x2d\x52\x9d" "\x9d\x0b\xa7\xb0\xdb\x4c\xca\x20\x4c\x6f\xae\x33\xf6\x0c\x01\x55\x9e\xaf" "\xbe\xd8\x22\x03\xbf\x45\x78\x1e\x36\x81\xc0\xec\x1d\x75\xe6\x8b\xf9\x61" "\x9d\x86\xf9\x04\x1e\x18\xdd\xe1\xae\x90\x33\x94\x6a\x7a\xcf\x61\xd1\xc3" "\xbd\x1c\x98\x8a\xab\xea\x18\xa4\x02\xa9\x3e\x15\x6b\xcf\x4a\x40\x43\xbf" "\xe7\x57\x5a\x97\x7b\x0e\x0a\x76\x64\x7f\x94\x9e\xdd\x8e\x86\xb5\x87\x02" "\xe5\xed\xc9\x84\x05\xdb\x78\x24\x2b\x54\x2a\xb9\x41\x82\xdb\x71\xa0\xd5" "\xa0\x35\x4c\xeb\x43\x99\xaa\x35\xec\xfe\xd5\x52\x65\x2f\x93\xf6\x21\xbf" "\xeb\x4d\x35\x5a\x92\x40\x3f\xed\x00\x00\x00\x00\x00", 895); *(uint64_t*)0x20000090 = 0x20000000; memcpy((void*)0x20000000, "GPL\000", 4); *(uint32_t*)0x20000098 = 5; *(uint32_t*)0x2000009c = 0x252; *(uint64_t*)0x200000a0 = 0x2000cf3d; *(uint32_t*)0x200000a8 = 0; *(uint32_t*)0x200000ac = 0; memset((void*)0x200000b0, 0, 16); *(uint32_t*)0x200000c0 = 0; *(uint32_t*)0x200000c4 = 0; *(uint32_t*)0x200000c8 = -1; *(uint32_t*)0x200000cc = 8; *(uint64_t*)0x200000d0 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x200000d8 = 0; *(uint32_t*)0x200000dc = 0x10; *(uint64_t*)0x200000e0 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint32_t*)0x200000e8 = 0; *(uint32_t*)0x200000ec = 0; *(uint32_t*)0x200000f0 = -1; res = syscall(__NR_bpf, 5ul, 0x20000080ul, 0x48ul); if (res != -1) r[1] = res; syscall(__NR_ioctl, r[0], 0x40042408, r[1]); syscall(__NR_perf_event_open, 0ul, 0, 0xbul, r[0], 2ul); } int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); setup_sysctl(); do_sandbox_none(); return 0; }