// https://syzkaller.appspot.com/bug?id=e37cd3116d37d681e7178d373040ec722896f0b4 // 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 #ifndef __NR_bpf #define __NR_bpf 321 #endif static unsigned long long procid; 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; } 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 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(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } } } uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } *(uint32_t*)0x200000000140 = 2; *(uint32_t*)0x200000000144 = 0x80; *(uint8_t*)0x200000000148 = 0x1b; *(uint8_t*)0x200000000149 = 1; *(uint8_t*)0x20000000014a = 0; *(uint8_t*)0x20000000014b = 0; *(uint32_t*)0x20000000014c = 0; *(uint64_t*)0x200000000150 = 0; *(uint64_t*)0x200000000158 = 0; *(uint64_t*)0x200000000160 = 0; STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 0, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 1, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 2, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 3, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 4, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 5, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 6, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 7, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 8, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 9, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 10, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 11, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 12, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 13, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 14, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 15, 2); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 17, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 18, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 19, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 20, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 21, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 22, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 23, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 24, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 25, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 26, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 27, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 28, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 29, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 30, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 31, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 32, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 33, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 34, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 35, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 36, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 37, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000168, 0, 38, 26); *(uint32_t*)0x200000000170 = 6; *(uint32_t*)0x200000000174 = 0; *(uint64_t*)0x200000000178 = 0; *(uint64_t*)0x200000000180 = 0; *(uint64_t*)0x200000000188 = 0x800; *(uint64_t*)0x200000000190 = 0; *(uint32_t*)0x200000000198 = 0; *(uint32_t*)0x20000000019c = 0; *(uint64_t*)0x2000000001a0 = 0; *(uint32_t*)0x2000000001a8 = 0; *(uint16_t*)0x2000000001ac = 0; *(uint16_t*)0x2000000001ae = 0; *(uint32_t*)0x2000000001b0 = 0; *(uint32_t*)0x2000000001b4 = 0; *(uint64_t*)0x2000000001b8 = 0x100000000000; res = syscall(__NR_perf_event_open, /*attr=*/0x200000000140ul, /*pid=*/0, /*cpu=*/0ul, /*group=*/(intptr_t)-1, /*flags=*/0ul); if (res != -1) r[0] = res; *(uint32_t*)0x200000000080 = 5; *(uint32_t*)0x200000000084 = 3; *(uint64_t*)0x200000000088 = 0x2000000001c0; memcpy( (void*)0x2000000001c0, "\x85\x00\x00\x00\x2a\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\x53" "\x35\xec\x47\x0d\xb2\xc6\x16\x1d\xba\x39\x21\x76\xdd\x29\x63\x03\x8e\x1d" "\x69\xba\x7e\xa9\x4c\x50\x0d\xc4\xef\x2f\xad\x96\xed\x40\x6f\x21\xbe\xf5" "\xad\xcf\x92\x05\x69\xc0\x0c\xc1\x19\x96\x84\xfa\x7c\x93\x83\x6d\x9e\xa2" "\xcf\xb0\xe6\x04\x36\xe0\x54\x25\xcc\x46\x86\xb0\x66\x70\x7d\xe9\x4a\x4f" "\x4d\x5f\xc7\x9c\x98\x7d\x66\x9f\x38\x1f\xac\xa0\xf9\xd9\xb2\x4b\xe4\x1a" "\x91\x69\xbd\xfa\xf1\x6d\xa9\x15\xb2\xe2\x49\xee\x1c\x6e\xee\x84\x30\x9e" "\x7a\x23\xc1\x9a\x39\x48\x48\x09\x53\x9f\xca\x4e\x0b\x6e\xab\x1a\xa7\xd5" "\x55\x45\xa3\x4e\xff\xa0\x77\xfa\xa5\x6d\x59\xe8\x82\x54\xf5\x40\x77\xf7" "\x99\xbf\x16\x83\x01\x00\x00\x00\xbf\x22\x55\xd6\xa0\x24\x4d\x35\xb2\x13" "\xbd\xa8\x4c\xc1\x72\xaf\xd8\xcc\x2e\x59\xa7\xd8\xb8\x5a\x5e\x3d\x77\xac" "\x46\x39\x20\xe2\x31\xb7\xae\x0d\xa8\x61\x6d\x2b\x79\x58\xf9\x1f\x5d\xa6" "\xc0\x25\xd0\xfa\xab\x18\x6d\x94\xaf\x98\xaf\x1d\xa2\xb5\x95\x2e\xb1\x58" "\x55\x93\x3a\x21\x23\x04\xe0\x35\xf7\xa3\x5d\xfc\x72\xc8\x12\x56\xa5\x5a" "\x25\xf8\xfe\x3b\x28\xd7\xe5\x3c\x78\xfb\xfe\x5a\xb0\x25\x5f\x34\x71\x60" "\xec\x83\x07\x00\x00\x00\x00\x00\x00\x40\x15\xcf\x10\x45\x3f\x6c\x0b\x97" "\x3b\x81\xa4\x84\xeb\xad\x04\x85\x9d\x92\x83\x65\xa7\xea\x3f\xab\x8b\x4b" "\x38\x0a\x00\xd7\x2b\xc0\x48\x0f\x94\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\x39\xf1\x11\x1f\x2d\xc5\xe4\x6a" "\xc1\xc6\x0a\x9b\x03\x00\x74\xbf\xbc\xd4\xb0\x90\x12\x17\x54\x84\x13\x5f" "\x0e\x51\x9f\x0b\x1e\x4a\xaa\x02\x6d\x57\x0e\xcb\x5e\x8c\xdd\xbe\xd6\x5f" "\xf7\x02\x00\x00\x00\xa3\xff\x4f\x8a\x4c\xf7\x96\xb0\x7a\x6f\xf6\x1c\x55" "\x52\x41\x7f\xd7\x03\xf7\xf1\x4d\x8b\x78\xa6\x02\xca\x3c\xdf\x6a\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\x32\x69\xaf\x3b\xe5\xfa\x6a\x9a\x5c\x24\xe3\x92\x95\x5f\x4e" "\x97\x9e\xa1\x32\x01\xba\xfe\x4f\x0f\x6e\xa5\x08\x00\x00\x00\xa0\xc5\x48" "\x55\x2b\x57\x1b\xed\x56\x47\x22\x3c\x78\xa9\x92\x81\x00\x00\x00\x05\x71" "\xcb\xb1\x7d\x9f\x37\x28\x24\x62\xf0\xe9\xc1\x47\xc0\xd4\x97\xc6\x14\x33" "\xc6\xcc\xc3\x56\x01\xee\xf9\x7e\xe6\x11\xbe\x8c\x97\xf4\x15\x1f\xfd\xf6" "\xf7\x82\x05\x49\xcd\xa6\xcb\x79\x9c\x6e\x92\x49\x66\xa7\xf9\x0b\xf8\xfd" "\x1e\x75\xee\x76\xbd\x72\x34\x6c\xfb\xb5\x26\x89\x0a\xa7\xfe\x5e\x68\x94" "\x9a\x3b\x30\x56\x7e\x54\xd3\x50\x47\x23\x17\x7d\x35\x6c\x46\x04\xbc\xa4" "\x92\xed\xe6\x2f\xc2\x88\x39\xb5\x30\x11\x60\xec\xec\x37\xe8\x3e\xfc\xee" "\xfd\x7c\xa2\x53\x36\x59\xed\xc8\xbe\x05\xcc\x85\x45\x1c\x6a\x14\x50\x74" "\x34\x3c\xae\xa5\xc4\xbf\x69\x04\x41\x97\x4b\x15\x5f\x5a\xdc\x68\x1a\x03" "\xc0\xbb\xb8\x35\x88\x56\x17\x5e\x2c\xe8\xb0\xcb\xbb\xe3\xc0\x33\xe5\x4f" "\xfc\xeb\xde\x1d\x9d\x3d\x35\xa1\x42\xa9\xec\x9a\x7a\x37\x55\xe0\xf2\x09" "\x15\x0a\x07\x68\x2c\x4e\x14\xe3\xa8\x35\x70\x1b\xea\x82\x40\x39\x9c\x56" "\xce\x8f\x58\xdf\x6f\x3f\xc9\x7f\x17\x30\xa1\x36\xbd\xee\x07\xe9\x8c\xb9" "\x84\xb2\xe2\x30\x4a\x1b\x63\xaf\xef\xdb\x63\x6e\x56\xbb\xaa\xe4\xe6\x21" "\x36\x57\x4b\xc6\x37\x1a\x0b\xb2\xbe\x1a\x96\x2a\xae\x9c\x12\x58\xda\x6e" "\xf5\x90\xe1\xd8\x5e\xa9\xe1\x2b\x30\x25\xf4\x3e\x7e\x08\xcc\xff\xc5\x06" "\x4d\xea\x4c\x39\xcf\x4b\x98\xe1\xfc\x6e\xfb\x59\x78\xf5\x1e\x16\xb6\x78" "\xec\xa0\xb6\x58\xa5\x60\x08\x94\x8e\x56\x1a\x98\x45\xe4\xff\x29\xe2\xbd" "\xb1\xd0\xb9\x23\xb2\x62\x34\x1c\x5e\x09\x3f\xd6\x6a\x29\x46\x50\x15\x59" "\x33\x57\x81\x09\x2c\xf8\xce\x3c\x7c\x56\xcd\x31\x12\x16\x24\xd7\x65\x17" "\xfd\x36\x66\x27\x6c\x3c\x0e\x81\x2b\x28\xe2\xf3\x0d\x03\x5c\xee\x5d\x0e" "\x77\xa3\xc7\x00\x08\xec\x65\x1c\xc0\xae\x63\x7f\xa4\x74\x81\x6b\xc5\x9d" "\x2e\x2a\x00\x09\x24\x19\x30\x4b\x33\x8a\x98\x7e\x9d\x30\x44\xd8\x56\xcf" "\x24\xf3\x70\x03\x0b\xe3\xb5\xf7\x9f\x03\x0b\x8d\x3e\xbc\xe6\x86\x63\xef" "\x5a\xf4\x69\xab\xe7\x53\x31\x4f\xae\x31\x65\x1e\x0e\xce\xa5\xec\xe8\xfb" "\x11\xa4\xee\x28\x8e\xb1\x49\xf1\xfa\x33\x66\x9c\xc8\xd9\x01\xfa\x8e\x46" "\x35\x4c\x9c\x3a\x04\x1a\x1e\x7b\x55\xc4\xe8\x1d\xba\x1e\x12\x28\x9e\xe3" "\x44\x63\xba\xf2\x83\x45\xbd\xe0\xc1\x95\xbc\x9f\x02\x1d\xa8\xf3\x02\x5e" "\xe9\xc8\xe3\x16\x8b\x41\x77\xce\x37\xed\x85\x46\x4c\x31\x67\x90\x53\xe7" "\xf9\xd0\x4b\xb5\xcb\x51\xda\x0b\x79\x58\x98\x9f\xd7\x0f\x24\x12\x62\xfa" "\x3f\x1d\xab\xeb\x4f\xc4\xbd\xa3\x45\x36\x02\x00\x00\x00\x01\xfb\xdd\xea" "\xcd\x3a\xda\xa4\xd2\x71\x5e\x21\xc7\x72\xcc\xd4\x43\x41\xf7\xfd\x53\xdf" "\x58\xae\x79\x1e\xe8\xb4\x89\xa7\xc9\xef\xe3\x62\x5a\x9d\x97\x1b\x59\x97" "\x48\x5d\x6a\x06\x3d\xc6\xf7\x35\x9e\x2e\xcc\xc2\xfb\x39\xd4\x19\xde\x1a" "\x7b\x5c\x9d\xc2\x2c\x96\x29\x5a\x46\x01\xad\xf5\x9d\x44\xe5\x8e\xb1\xc6" "\x0b\x34\x75\xbe\x31\xa9\xb7\xcf\x42\xb6\x40\x23\x12\xd2\x72\x5b\x8d\x9f" "\xa7\x00\xa8\x64\x07\xe7\x9a\xe2\x9d\x2c\x11\x7c\xa6\x5f\xc8\x6c\x2d\xce" "\x97\xaa\x03\x27\x9a\x66\xec\x87\x12\x22\x19\xb0\xf7\x96\xab\x92\xb1\xad" "\xec\xae\x50\xfd\xb4\x08\xc8\xa8\x0f\x7f\x02\xf7\x50\xd6\xc9\x77\xa1\x91" "\x9f\x9f\x69\xa6\xcf\xef\xdf\x87\x9d\x44\x7d\xf5\x3f\x3b\x9b\x70\xd1\x03" "\x55\xb0\x74\x66\xd1\xef\x00\x56\xb5\xaf\x55\x3d\x18\xa6\xcc\x50\xfe\xeb" "\x7b\xfa\xd9\xb7\xbe\x32\x83\xb6\x45\x0d\x01\x4e\x77\x12\xd2\xf1\xd7\x00" "\x45\x48\xb1\x91\x62\xce\xf0\x4d\x18\xd4\xf5\x98\x7b\xaa\xb9\x7a\x9b\xfb" "\xd8\xf1\x85\xb5\x67\x18\x20\x42\x0b\xf5\xb6\x52\x2c\x0e\x21\xc8\x82\xc6" "\x6f\x4f\x25\xff\xb6\xd9\x5e\x07\xde\x02\x20\x5f\xca\x4f\x18\xa2\xeb\x5b" "\x63\xe4\x5d\x5d\x80\xfe\x52\x73\x40\x93\xae\x5a\xa3\xc0\xb4\xf3\xf4\x5b" "\xff\xf2\x41\x8a\x18\x21\x77\x47\xae\x44\x2e\x31\x56\x0e\x5b\x74\x14\x45" "\xea\x2a\x1a\xce\xe2\xe9\x8c\x9f\x34\x27\x83\x4b\xa0\xa7\x65\xd2\x0b\x30" "\xf8\x7a\xf9\x76\xa4\x6f\x9a\x9a\x1a\xc7\xde\xa1\xea\x68\x45\xf9\xaa\x66" "\x23\x92\x0d\xac\xc1\x07\xf5\x32\x34\x8c\xc2\x11\x64\xef\xe7\x94\x87\x4e" "\xac\x73\x38\x1e\x96\x1f\x3d\x9c\x8c\x21\x57\x8f\xe3\x24\x50\x97\xc2\x80" "\xab\xe5\x14\x27\xa7\xf6\xcd\x72\xb5\xda\x6d\x02\x52\x80\x3c\x66\x73\x0c" "\xd5\xea\xc9\x07\xf0\x9b\x96\x95\x90\x63\x13\xf8\x87\x35\x22\x60\x8c\x6f" "\xc0\x1e\x1b\x9e\x16\x58\x7b\xb5\xf7\x21\x30\x3e\x6b\x89\xe5\xc5\x4d\x68" "\x0a\xc6\x6d\x09\xaf\x90\xdb\xf5\x0e\xe6\x9a\x39\x26\x59\x64\x27\x9d\x17" "\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x08\xad\x07\x31\xc4" "\xb8\x39\x68\x8b\x22\xc4\xda\x2a\x6b\x00\x00\x8a\x19\x49\xa6\xba\x49\xfb" "\xf9\x81\xf8\x26\x5e\x7f\x1f\x4c\x2d\x97\xf4\x68\x0b\x13\x5f\x87\xc2\x28" "\xce\x69\x41\x8a\x28\x2b\xff\xff\x24\x81\xa0\xdf\x17\x74\xfa\x7d\x94\x94" "\x4b\xb9\x2d\x2b\x89\xf7\x3f\x0e\x8b\x63\xf6\x31\x6c\x57\x62\xf3\x28\x8b" "\xc9\x70\x72\x0f\x48\xb5\x64\x7d\xd1\x77\xdb\x68\x10\xfa\xe0\x53\x34\xd5" "\xa4\x4a\x02\x00\x00\x00\x1c\x0d\x88\x2a\x56\x4d\x74\xa7\xc7\x2b\xf9\xa2" "\x15\x2b\x26\x1e\x58\xfe\xa6\xd2\xf9\x35\x89\xcf\xe2\x61\xdc\x04\x10\xb5" "\xcc\xc9\x2a\x5a\x0e\xab\x32\x7a\x33\x43\x1d\x62\xd2\xb7\xc7\x5c\xe6\x54" "\xd5\x56\xc9\xe1\x81\x7c\x1a\xbc\xa7\x62\xab\x53\xd4\x0d\xa5\x15\x60\x35" "\x1b\x67\x33\x63\x65\x2e\x1e\xcb\x56\xcf\xe4\xa7\x46\xa4\x5a\xb1\x3c\x60" "\x14\xe9\xf3\x61\xab\x68\x7d\x1c\xd1\x79\x5c\xe9\xe0\x5c\x81\x7b\x83\xd7" "\x60\x46\xbd\xb3\x70\x9d\xe5\xdf\x74\x99\xa0\x2d\x2f\x63\x6a\x45\x4b\x85" "\xb9\x87\x58\x0a\xda\x02\x5d\x83\xbd\x7b\x8d\xf2\x8a\x54\x0d\x5e\xc5\x53" "\x79\x42\xe7\x9f\x2f\x1a\xb2\x5e\xa5\xf5\x63\xbc\x77\xe4\xf9\x46\x8b\xd3" "\x09\x46\x98\x80\xc7\xe3\x41\x50\xca\x88\x6d\x1f\x9a\xc2\xf7\xe8\x2d\xbe" "\x29\x6c\x87\x7d\x92\x5c\x38\xc5\x4c\xc8\x13\x7b\x29\x02\x88\x54\xb6\xbd" "\x57\xca\x89\x39\x27\xc3\x31\x30\x0e\x16\xab\xa7\x92\x28\x9e\x13\x55\x89" "\xd9\x33\x02\xfc\x37\xc7\x3c\x30\x3e\x38\x3c\xdf\x8e\xf3\xf6\xd6\x26\x5f" "\xe5\xee\x01\x75\x9d\x24\x02\x74\x75\xc8\x90\x10\x39\xa8\x98\x58\x20\x22" "\xbc\x95\x99\x2b\x86\xdc\xe0\x71\x08\x87\xc8\xa6\x25\xd9\xcb\xb8\x97\xbd" "\xbf\xaf\x49\xa3\xf6\x42\xa1\x69\x82\x7a\x9b\xae\x4f\xcf\xa5\x21\x24\x61" "\xdb\x00\x00\x00\x00\x00\x00\xe6\xed\x75\xca\x8f\xcd\xa7\xef\x3e\xe3\x36" "\x18\x9f\xef\x3b\x3f\xfb\x9f\x38\xfe\xfc\x5f\xf3\x9c\x4e\x69\xe3\xfa\x1f" "\x8b\x10\xee\x97\x12\x3e\x99\xb6\x1e\xba\x06\x5b\x1a\xd6\x75\x30\xe7\xc4" "\xf1\x1f\x9d\xa7\xae\x00\x00\x02\x00\x00\x00\x61\x01\x01\xad\x7f\x79\xcb" "\x9b\xbf\x64\xa0\xfc\x10\x9f\x49\xfe\x87\x99\xfe\x26\x6e\x2c\xca\xc8\x0f" "\xef\xe7\x50\x15\x1f\x5d\xdf\xe5\x18\x33\xec\x65\xec\xe7\x0e\x07\xce\x8a" "\xb5\xd9\x7d\xb4\x7d\xa8\xf8\x00\x00\x66\x4d\xc0\xb8\x6a\xe2\xb3\xff\x9d" "\x4e\x22\x07\x52\xa6\xb2\xf3\xea\x9f\x79\x36\x12\x38\x64\x96\xdc\xa5\xaf" "\x7b\x89\x52\xaa\xfa\x79\x6e\xa7\xb1\x56\xd1\x96\x12\x29\x7c\x63\xbb\x20" "\xe1\xe0\x46\x9f\x76\x15\xf6\x7a\x92\x18\xcb\xac\xe3\x8f\x52\x36\x82\x13" "\x14\xf7\x63\x02\xb9\x8a\xfa\x93\x04\x4b\x83\x98\x93\x39\xca\x10\xe6\xae" "\x30\xe7\x0e\x17\xa8\x2f\x03\xe9\x15\xb8\x42\x5e\x8e\x7a\x91\x61\x43\x06" "\xd2\xae\x0b\xc3\x55\x0d\x85\x6f\x2d\x72\x93\x67\x2b\x56\x73\xd2\x64\xfc" "\x88\x6b\x0c\x8b\xdf\x43\x6a\x0f\xcd\x21\xbf\x9d\xa7\xbd\xca\x98\xe3\x4c" "\xd6\xe5\x9b\x0a\x7c\xe4\xba\x1b\x46\x65\x61\xaa\xa3\x54\x48\xdf\xf4\x7b" "\xb1\xd7\xdf\x23\xd4\x67\x68\x9a\x66\x69\xe4\x30\x0d\x5a\xcf\x12\xe4\xd0" "\xb3\x5a\xbf\x91\x56\x9f\x60\x5b\x2f\x6d\xf0\xd8\x61", 2209); *(uint64_t*)0x200000000090 = 0x200000000000; memcpy((void*)0x200000000000, "GPL\000", 4); *(uint32_t*)0x200000000098 = 5; *(uint32_t*)0x20000000009c = 0x252; *(uint64_t*)0x2000000000a0 = 0x20000000cf3d; *(uint32_t*)0x2000000000a8 = 0; *(uint32_t*)0x2000000000ac = 0; memset((void*)0x2000000000b0, 0, 16); *(uint32_t*)0x2000000000c0 = 0; *(uint32_t*)0x2000000000c4 = 0; *(uint32_t*)0x2000000000c8 = -1; *(uint32_t*)0x2000000000cc = 8; *(uint64_t*)0x2000000000d0 = 0; *(uint32_t*)0x2000000000d8 = 0; *(uint32_t*)0x2000000000dc = 0x10; *(uint64_t*)0x2000000000e0 = 0; *(uint32_t*)0x2000000000e8 = 0; *(uint32_t*)0x2000000000ec = 0; *(uint32_t*)0x2000000000f0 = -1; *(uint32_t*)0x2000000000f4 = 0; *(uint64_t*)0x2000000000f8 = 0; *(uint64_t*)0x200000000100 = 0; *(uint32_t*)0x200000000108 = 0x10; *(uint32_t*)0x20000000010c = 0; *(uint32_t*)0x200000000110 = 0; res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000000080ul, /*size=*/0x48ul); if (res != -1) r[1] = res; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40042408, /*prog=*/r[1]); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; for (procid = 0; procid < 5; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }