// https://syzkaller.appspot.com/bug?id=6c4f7674b11f12b5090211ab4216544407d8859e // 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; } 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 (;;) { 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; } } } uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; *(uint32_t*)0x20000b40 = 0x11; *(uint32_t*)0x20000b44 = 8; *(uint64_t*)0x20000b48 = 0x20000c00; memcpy( (void*)0x20000c00, "\x62\x0a\xf8\xff\x0c\x20\x00\x21\xbf\xa1\x00\x00\x00\x00\x00\x00\x07\x01" "\x00\x00\xf8\xff\xff\xff\xb7\x02\x00\x00\x03\x00\x00\x00\xbd\x12\x00\x00" "\x00\x00\x00\x00\x85\x00\x00\x00\x06\x00\x00\x00\xb7\x00\x00\x00\x00\x00" "\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00\x3f\xaf\x4f\x2a\xa3\xd9\xb1\x8e" "\xd8\x12\xa2\xe2\xc4\x9e\x80\x20\xa6\xf4\xe0\xe4\xf6\x98\x39\x3a\xa0\xf3" "\x88\x1f\x9c\x24\xaa\x56\xf1\x51\x99\xfa\xd0\x09\x3c\x59\xd6\x6b\x5e\xce" "\x9f\x36\xc7\x0d\x0f\x13\x90\x5e\xa2\x3c\x22\x62\x4c\x9f\x87\xf9\x79\x3f" "\x50\xbb\x54\x60\x00\x67\x7b\x0c\x50\x77\xda\x80\xfb\x98\x2c\x1e\x94\x00" "\xe6\x93\x14\x6c\xea\x48\x4a\x41\x5b\x76\x96\x61\x18\xb6\x4f\x75\x1a\x0f" "\x24\x1b\x07\x2e\x90\x08\x00\x08\x00\x2d\x75\x59\x3a\x28\x6c\xec\xc9\x3e" "\x64\xc2\x27\xc9\x5a\xa0\xb7\x84\x62\x57\x04\xf0\x7a\x72\xc2\x34\x66\x4c" "\x0a\xf9\x36\x0a\x1f\x7a\x5e\x6b\x60\x71\x30\xc8\x9f\x18\xc0\xc1\x08\x9d" "\x8b\x85\x32\x89\xd0\x1a\xa2\x7a\xe8\xb0\x9e\x00\xe7\x9a\xb2\x0b\x0b\x8e" "\x11\x48\xf4\x9f\xaf\x2a\xd0\x00\x00\x00\x00\x00\x00\x00\x6f\xa0\x3c\x64" "\x68\x97\x20\x89\xb3\x02\xd7\xbf\x60\x23\xcd\xce\xdb\x5e\x01\x25\xeb\xbc" "\x08\xde\xe5\x10\xcb\x23\x64\x14\x92\x15\x10\x83\x33\x71\x9a\xcd\x97\xcf" "\xa1\x07\xd4\x02\x24\xed\xc5\x46\x7a\x93\x2b\x77\x67\x4e\x80\x2a\x0d\x42" "\xbc\x60\x99\xad\x23\x8a\xf7\x70\xb5\xed\x89\x25\x16\x17\x29\x29\x87\x00" "\x00\x00\x80\x00\x6e\xf6\xc1\xff\x09\x00\x00\x00\x00\x00\x00\x10\xc6\x3a" "\x94\x8e\x8b\x79\x55\x39\x4f\xfa\x82\xb8\xe9\x42\xc8\x91\x12\xf4\xab\x87" "\xb1\xbf\xed\xa7\xbe\x58\x66\x02\xd9\x85\x43\x0c\xea\x01\x62\xab\x3f\xcf" "\x45\x91\xc9\x26\xab\xfb\x07\x67\x19\x23\x7c\x8d\x0e\x60\xb0\xee\xb1\x94" "\x8b\xf4\x2b\xc7\xfc\x2c\xb2\x74\x84\x9c\x95\x24\x15\x4f\xa2\x44\x92\xa6" "\x60\x58\x3e\xec\xdb\xf5\xbc\xd3\xde\x3a\x83\x20\x9d\xa1\x7a\x0f\xaf\x60" "\xfd\x6a\xd9\xb9\x7a\xa5\xfa\x68\x48\x03\x66\xc9\xc6\xfd\x6f\xa5\x04\x3a" "\xa3\x92\x6b\x81\xe3\xb5\x9c\x95\xc2\x5a\x57\x3d\xc2\xed\xca\xea\x2b\x1a" "\x52\x49\x6d\xfc\xaf\x99\x43\x14\x12\xfd\x13\x4a\x99\x63\x82\xa1\xa0\x4d" "\x5b\xb9\x24\xcf\xe5\xf3\x18\x54\x18\xd6\x05\xff\xff\x9c\x4d\x2e\xc7\xc3" "\x2f\x20\x95\xe6\x3c\x80\xaf\xf9\xfa\x74\x0b\x5b\x76\x32\xf3\x20\x30\x91" "\x6f\x89\xc6\xda\xd7\x60\x3f\x2b\xa2\xa7\x90\x00\x00\x00\x00\xc2\xfe\xd4" "\x4d\xa4\x92\x8b\x30\x14\x2b\xa1\x1d\xe6\xc5\xd5\x0b\x83\xba\xe6\x13\x40" "\x22\x16\xb5\x05\x4d\x1e\x7c\x13\xb1\x35\x5d\x6f\x4a\x82\x45\xff\xa4\x99" "\x7d\xa9\xc7\x7a\xf4\xc0\xeb\x97\xfc\xa5\x85\xec\x6b\xf5\x83\x51\xd5\x64" "\xbe\xb6\xd9\x52\xaa\xb9\xc7\x07\x64\xb0\xa8\xa7\x58\x3c\x90\xb3\x43\x3b" "\x80\x9b\x5b\x9f\xbd\x48\xbc\x87\x34\x95\xcb\xff\x8a\x32\x6e\xea\x31\x57" "\x20\xae\x4e\x0f\x75\x05\xeb\xf6\xc9\xd1\x33\x30\xca\x00\x6b\xce\x1a\x84" "\x52\x1f\x14\x51\x8c\x9b\x47\x6f\xcc\xbd\x6c\x71\x20\x16\x21\x98\x48\x62" "\x4b\x87\xce\xc2\xdb\xe9\x82\x23\xa0\xeb\x4f\xa3\x9f\x6b\x5c\x02\xe6\xd6" "\xd9\x07\x56\xff\x57\x74\x2a\x8f\x57\x00\x00\x00\x00\x97\x00\xcf\x0b\x4b" "\x8b\xc2\x29\x41\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x8b\xc0\xd9\x55\x97\x11" "\xe6\xe8\x86\x1c\x46\x49\x5b\xa5\x85\xa4\xb2\xd0\x2e\xdc\x3e\x28\xdd\x27" "\x1c\x89\x62\x49\xed\x39\x57\xf8\x13\x56\x7f\x7a\x95\x43\x5a\xc1\x5f\xc0" "\x28\x8d\x9b\x2a\x16\x9c\xdc\xac\xc4\x13\xb4\x8d\xaf\xb7\xa2\xc8\xcb\x48" "\x2b\xac\x0a\xc5\x59\xea\xf3\x90\x27\xce\xb3\x79\xa9\x02\xd9\xba\x96\xff" "\xff\xff\x7f\x00\x00\x10\x00\x00\x00\x00\x00\x00\x7d\x5a\xd8\x97\xef\x3b" "\x7c\xda\x42\x01\x3d\x53\x04\x6d\xa2\x1b\x40\x21\x6e\x14\xba\x2d\x6a\xd5" "\x65\x6b\xff\xf1\x7a\xdd\xae\xda\xb2\x5b\x30\x00\x2a\xbb\xba\x7f\xa7\x25" "\xf3\x84\x00\xbe\x7c\x1f\x00\x1b\x2c\xd3\x17\x90\x2f\x19\xe3\x85\xbe\x9e" "\x48\xdc\xcf\xf7\xa1\xef\x32\x82\x83\x06\x89\xda\x6b\x53\xb2\x63\x33\x98" "\x63\x29\x77\x71\x42\x9d\x12\x00\x00\x00\x33\x41\xbf\x4a\xba\xca\xc9\x45" "\x00\xfc\xa0\x49\x3c\xf2\x9b\x33\xdc\xc9\xff\xff\xff\xff\xff\xff\xff\xd3" "\x9f\x6c\xe0\xc6\xff\x01\x58\x96\x46\xef\xd1\xcf\x87\x0c\xd7\xbb\x23\x66" "\xfd\xf8\x70\xce\x5d\xfd\x34\x67\xde\xcb\x05\xcf\xd9\xfc\xb3\x2c\x8e\xd1" "\xdb\xd9\xd1\x0a\x64\xc1\x08\x3d\x5e\x71\xb5\x56\x5b\x17\x68\xee\x58\x96" "\x9c\x41\x59\x52\x29\xdf\x17\xbc\xad\x70\xfb\x40\x21\x42\x8c\xe9\x70\x27" "\x5d\x13\xb7\x81\x00\x78\x8f\x11\xf7\x61\x03\x8b\x75\xd4\xfe\x32\xb5\x61" "\xd4\x4e\xa3\xab\xe0\xfa\x4d\x30\xdc\x94\xef\x24\x18\x75\xf3\xb4\xce\x02" "\x32\xfc\xea\x69\xc2\x71\xd7\xfa\x29\x82\x2a\xea\x68\xa6\x60\xe7\x17\xa0" "\x4b\xec\xff\x0f\x71\x91\x97\x72\x4f\x4f\xce\x12\x93\xb6\x2d\x7e\x8c\x71" "\x23\xd8\xec\x57\x1b\xe5\x4c\x72\xd9\x78\xcf\x90\x6d\xf0\x04\x2e\x36\xac" "\xd3\x7d\x7f\x9e\x11\x9f\x2c\x06\xf8\x15\x31\x2e\x0c\xfe\x22\x2a\x06\xf5" "\x6d\xd0\x00\xc0\x74\xeb\x8a\x32\x2f\xb0\xbf\x47\xc0\xa8\xd1\x54\xb4\x05" "\xc3\x7f\xea\xf3\xdd\x95\xf6\xef\x2a\xcd\x1f\xe5\x82\x78\x61\x05\xc7\xdf" "\x8b\xe5\x87\x70\x50\xc9\x13\x01\xfb\x99\x73\x16\xdb\xf1\x78\x66\xfb\x84" "\xd4\x17\x37\x31\xef\xe8\x95\xff\x2e\x1c\x55\xef\x08\x23\x5a\x01\x26\xe0" "\x12\x54\xc4\x40\x60\x92\x6e\x90\x10\x9b\x59\x85\x02\xd3\xe9\x59\xef\xc7" "\x1f\x66\x5c\x4d\x75\xcf\x24\x58\xe3\x54\x2c\x90\x62\xec\xe8\x4c\x99\xa8" "\x61\x88\x7a\x20\x63\x9b\x41\xc8\xc1\x2e\xe8\x6c\x50\x80\x40\x42\xb3\xea" "\xc1\xf8\x79\xb1\x36\x34\x5c\xf6\x7c\xa3\xfb\x5a\xac\x51\x8a\x75\xf9\xe7" "\xd7\x10\x1d\x5e\x18\x6c\x48\x9b\x3a\x06\xfb\x99\xe0\xaa\x7f\x23\xa0\x54" "\xde\x2f\x4d\x92\xd6\xbd\x72\xee\x2c\x9f\xdc\x74\xaa\xaf\x1e\x3e\x48\x3b" "\x4a\xd0\x55\x73\xaf\x40\x32\x69\x93\x94\x7d\x9a\x63\x1b\xcb\xf3\x58\x37" "\x84\xac\xbd\xa2\x16\x55\x0d\x7a\xd3\x33\x54\x57\x94\x32\x7a\xc9\xec\xc3" "\x4f\x24\xc9\xae\x15\x3e\xc6\x0a\xc0\x69\x4d\xc5\x5b\xff\x9f\x5f\x4d\xf9" "\x04\x00\x00\x00\x00\x00\x00\x00\xd6\xb2\xc5\xea\x13\x93\x76\xf2\x42\x85" "\xbf\x16\xb9\x9c\x9c\xc0\xad\x18\x57\x21\x6f\x1a\x98\x5f\x36\x91\x91\xae" "\x95\x4f\xeb\xb3\xdf\x46\x4b\xfe\x0f\x7f\x3e\xe9\xaf\xe7\xbe\xfb\x89\xd2" "\x77\x73\x99\xf5\x87\x4c\x55\x3a\xeb\x37\x29\xcf\xfe\x86\xe6\x69\x64\xae" "\x09\xbb\x6d\x16\x31\x18\xe4\xcb\xe0\x24\xfd\x45\x00\xf8\xff\x07\x00\x00" "\x00\x1e\x48\x41\x80\x46\xc2\x16\xc1\xf8\x95\x77\x8c\xb2\x51\x72\x17\x37" "\x39\x0c\xbf\x3a\x74\xcb\x20\x03\x01\x6f\x15\x14\x21\x6b\xdf\x57\xd2\xa4" "\x0d\x40\xb5\x1a\xb6\x3e\x96\xec\x84\xac\x35\x71\xf0\x2f\x64\x7b\x33\x85" "\xb3\xb8\xa8\xc9\xae\x3d\x14\xf9\x31\x00\xc2\xe0\x89\x38\x62\xee\xf5\x52" "\xfc\xde\x29\x81\xf4\x8c\x48\x2b\xde\x8a\x16\x8c\x3f\x5d\xb2\xfe\xa6\xf2" "\x6e\x4a\x43\x04\xe5\x0c\x34\x9f\x4f\x9e\xce\xe2\x7d\xef\xc9\x38\x71\xc5" "\xf9\x9b\x35\x5b\x72\xd5\x38\xba\x2f\x58\xea\x8e\x4a\xa3\x70\x94\x19\x1e" "\x10\x09\x6e\x7e\x60\xfc\x35\x41\xa2\xc9\x05\xa1\xa9\x5e\x95\x71\xbf\x38" "\xae\x19\x81\xc4\x23\x8e\xca\xee\x6f\x75\xcd\x0a\x68\x81\xbd\x15\x17\xa8" "\x25\x0d\xf9\x86\x74\x15\x17\xab\xf1\x13\x89\xb7\x51\xf4\xe1\x09\xb6\x00" "\x00\x00\x00\x00\x00\x00\x00\xd6\xd5\x21\x0d\x75\x60\xeb\x92\xd6\xa9\x7a" "\x27\x60\x2b\x81\xf7\x63\x86\xf1\x53\x5b\xef\x14\x97\xf9\x21\x86\x08\x6e" "\x29\xc6\xbc\x5a\x1f\xad\x6e\xc9\xa3\x11\x37\xab\xf9\xa4\x04\xab\xde\x77" "\x50\x89\x8b\x1b\xd6\x27\xe8\x73\x06\x70\x3b\xe8\x67\x2d\x70\xd1\xab\x57" "\x07\x52\x28\xa9\xf4\x6e\xd9\xbd\x1f\x08\xfb\x81\x91\xbb\xab\x2d\xc5\x1d" "\xe3\xa6\x1f\x08\x68\xaf\xc4\x29\x48\x59\x32\x3e\x7a\x45\x31\x9f\x18\x10" "\x12\x88\xd1\x39\xbd\x3d\xa2\x30\xed\x05\xa8\xfe\x64\x68\x0b\x0a\x3f\x9f" "\x2d\xd7\x04\xe4\x21\x4d\xe5\x94\x69\x12\xd6\xc9\x8c\xd1\xa9\xfb\xe1\xe7" "\xd5\x8c\x08\xac\xaf\x30\x23\x5b\x91\x00\x00\x00\x00\xa5\x5f\x74\xa2\x36" "\x41\xf6\x1f\x2d\x5b\x30\x8c\xf0\xd0\x31\xb0\xc7\xf0\xce\xd6\x99\x93\xe9" "\x96\x0f\xf5\xf7\x60\x15\xe6\x00\x97\x56\x23\x7b\xad\xf4\xe7\x96\x5b\xbe" "\x27\x77\xe8\x08\xfc\xba\x82\x15\x16\x1a\x77\xc3\x96\x09\xff\x85\x43\x56" "\xcb\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\xfe\xe3" "\x0a\x3f\x7a\x85\xd1\xb2\x9e\x58\xc7\x76\xf4\xb4\xce\x07\xe1\xc6\xfa\x66" "\xfc\xfc\x7a\x22\x88\x05\xf7\x67\x85\xef\xc0\xce\xb1\xc8\xe5\x72\x9c\x66" "\x41\x8d\x16\x9f\xc0\x3a\xa1\x88\x54\x69\x3a\xd2\xa1\x82\x06\x8e\x1e\x3a" "\x0e\x25\x05\xbc\x7f\x41\x01\x96\x45\x46\x6a\xc9\x6e\x0d\x4b\x3b\xc1\x9f" "\xaa\x54\x49\x20\x9b\x08\x3d\xbd\x33\x4b\x47\xf0\x67\xbb\xab\x40\x74\x3b" "\x2a\x42\x8f\x1d\xa1\xf6\x8d\xf7\x5c\xf4\x3f\x8e\xcc\x8d\x37\x26\x60\x21" "\x11\xb4\x0e\x76\x1f\xd2\x10\x81\x92\x03\x82\xf1\x4d\x12\xca\x3c\x34\x31" "\xee\x97\x47\x1c\x78\x68\xdc\xda\x7e\x47\x89\x50\xaa\x69\xeb\x7f\x7f\x80" "\x57\x2f\xdd\x11\xbb\x1d\x0d\x12\x80\xfb\xc2\x2b\xf7\x34\x68\x78\x8d\xf5" "\x17\x10\xd7\xd3\x1c\x63\x2f\xc5\xed\x17\x62\xeb\x0b\x42\x8e\xe7\x51\xc4" "\x7d\x8e\x89\x4f\x74\x5a\x86\x84\x85\x3a\xbf\x35\xf0\x12\x10\x08\xb7\x22" "\xb1\xea\xa6\xae\xdf\xa1\xbf\x2e\x7c\xcb\x2d\x61\xd5\xd7\x63\x31\x94\x5e" "\x20\xfa\x26\xb8\x47\x1d\x42\x64\x52\x88\xd7\x22\x6b\xbd\x9c\x9e\x9e\x1c" "\xc9\xeb\x3d\x54\x1e\x40\x7c\xc2\xda\xe5\xe6\x90\xcd\x62\x8a\xb8\x48\x75" "\x32\x03\xb4\x58\xb9\x7e\xc1\xaf\xb0\x79\xb4\xb4\xba\x68\x6f\xcd\xf2\x40" "\x43\x0a\x53\x7a\x39\x5d\xc7\x3b\xda\x36\x7b\xf1\x2c\xb7\xd8\x16\x91\xa5" "\xfe\x8c\x47\xbe\x39\x56\x56\xa2\x97\xe9\xdf\x0e\x71\xf9\x67\x56\xea\x5c" "\xce\x7d\xb3\xc4\xbe\x29\x01\x59\xf6\xbc\xd7\x5f\x0d\xda\x9d\xe5\x53\x2e" "\x71\xae\x9e\x48\xb0\xed\x12\x54\xa8\x31\x00\x00\x00\x00\xf6\xfb\xb8\x69" "\x60\x4d\x51\xa3\x6a\x54\xc8\x32\xe4\x5b\x25\x69\xdc\x0d\x90\xb0\x75\x22" "\x5f\xde\x44\xc4\xe0\x97\x31\x71\xad\x47\xd6\xb7\x0e\xbc\x66\x03\x09\xe1" "\xe2\x45\xb0\xfd\xf9\x74\x3a\xf9\x32\xcd\x6d\xb4\x9a\x47\x61\x38\x08\xba" "\xd9\x59\x71\x9c\x00\x00\x00\x00\x00\x37\x8a\xc2\xe2\x05\xb8\x5e\x1a\x5a" "\x27\xf2\x36\x17\xe8\xa5\x1c\xab\x4c\x7e\x80\x00\x03\xc9\xe8\x09\x5e\x02" "\x98\x5f\x28\xe6\x78\xf6\x64\x22\x43\x6f\x94\x9e\x2a\xb8\xf1\x62\xd7\xe3" "\xf8\x55\xe3\x78\xf4\xa1\xf4\x0b\x0c\x6f\xb2\xd4\xb2\x05\xa8\x00\xb6\xd7" "\x13\xac\xeb\xc5\xb0\x14\xe6\x1a\x54\x3a\x5a\x19\x4f\x9a\xc1\x8d\x76\xb5" "\x44\x0e\x3b\x1a\x56\x9e\x73\x97\xf6\xca\x04\x00\x96\x6d\x7b\xa1\x9e\x72" "\x04\x13\x26\x7a\x6c\xce\xa9\xc4\x39\x67\x1d\x2c\x68\x0f\x27\x53\xca\x18" "\x4e\xee\xb8\x43\x45\x03\x68\xac\xb4\x38\x3a\x01\xd2\x5e\xb3\xd1\xe2\x3e" "\x0f\x26\x45\xd1\xcd\xfa\x9f\xa4\x10\x63\x2f\x95\xa5\xf6\x22\xf8\x51\xc6" "\x6e\xe7\xe3\x03\x01\x08\x00\x00\x00\x00\x00\x00\xc4\xf9\x3c\x09\x84\xb5" "\xc2\xd4\x52\x34\x97\xe4\xd6\x4f\x95\xf0\x84\x93\x56\x4a\x1d\xf8\x71\x11" "\xc9\xbf\xfe\xf9\x7d\xce\xcc\x46\x7a\xce\x45\x65\x97\x68\x5c\x58\x70\xd0" "\x5f\x88\xa0\xf4\x63\xdb\x88\xd3\x77\x44\x2e\x13\x49\xac\xaf\x76\x62\x18" "\xb5\x4a\x9d\x62\x47\x78\xe1\xc4\xcb\xa6\xe6\x39\x0a\x9f\x30\x2c\x6e\xb2" "\xdf\x77\x66\x41\x1b\xef\x0e\xbb\x50\x00\x00\x00\x00\x00\x60\x65\xd6\x73" "\x5e\xb7\xa0\x0e\x12\x7c\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\xbf" "\xb0\xbb\xa7\x93\x44\x64\x3b\x1d\x8d\xaa\x9f\x38\xe4\xb6\x2c\x1e\x2a\xf6" "\x8c\x6f\x50\x00\x00\x01\x00\x00\x00\x00\x00\x94\x4e\x45\x05\xda\x48\x5a" "\x3a\x41\x54\x38\x7a\x0a\x88\x37\x0d\x9e\xd9\x46\x7b\x09\xc5\x88\x8a\x06" "\x43\x1d\xf3\xf6\x8a\xbf\x0b\x36\x6c\x4d\x5f\x8b\xea\x7b\x29\xc2\x57\xed" "\x75\x6d\xff\x7a\x21\xc6\xb6\x61\xcb\xdd\x43\xde\x65\xaf\xd7\xf6\x61\xd5" "\xc8\x4f\x91\x5c\x90\xe3\xd6\xea\x01\x2b\x68\xb7\x87\xeb\x01\xd8\x32\x00" "\x00\x00\x00\x00\x00\x00\x60\x17\x6d\xac\xba\x0e\xc5\x03\xa3\x7f\xae\x6b" "\x47\x2e\xc3\x69\xc7\x9e\xe6\xa4\x20\xc0\xfd\x8d\x8d\x82\xfe\x13\x6d\x5a" "\xf6\xc3\x0b\xfe\xb0\xa7\x27\x5b\xab\xfd\xb9\x6a\x12\x7a\xa9\x38\x6e\x06" "\xf1\xc6\x45\x42\x45\xa1\x8c\x1c\x8c\x49\x55\x2c\xff\x5d\x27\xb5\x47\xcd" "\xc3\x4c\x08\x58\xc7\x7a\x47\xa9\xff\x86\xee\x9f\xbd\x9c\xed\xa4\x28\x71" "\x6a\x42\x18\x82\x11\x76\xd8\x06\x79\x97\x52\x72\x30\xfa\x67\xd2\x69\x50" "\xd3\xe4\xf2\x75\x0f\xa7\xc8\x72\x87\x4a\xd3\xa2\xd1\x1f\x9f\x6e\xb0\x8e" "\x6d\x7b\x6f\xa2\x57\xb0\x4d\x8c\xe3\x63\x60\xf5\x24\xe3\xdf\xd2\x21\x16" "\x41\xf3\xd2\x63\x7d\x86\xb8\x06\x81\xec\xa5\x0c\xe0\xee\xca\xfd\xd2\x2d" "\x41\xfa\x51\x5c\x15\x59\x1e\x70\xde\xd4\xb7\x0e\xfa\xc3\xcb\x42\xfb\x35" "\x2d\x82\xe8\xf7\x57\x3e\x8e\xd8\x24\x8d\xa3\x56\xfa\x91\xa2\x52\x97\x6d" "\x3a\x4d\x8c\x18\x43\xa8\xd5\xbb\x7f\x5f\x10\x28\x45\x3a\x05\x62\xa3\xea" "\x93\x11\x70\x76\xdd\x49\x40\xb7\xdf\x50\xd7\x82\x89\xfe\x66\x19\x75\x25" "\xf6\x09\x5f\x86\x62\xd2\x32\x97\x0b\xef\x61\xb0\x3f\xa8\x30\x27\x96\x3a" "\x1a\x2e\x07\xcf\xee\x30\xc0\xd0\xb4\xc5\x87\x7f\x93\x07\x63\x7c\xa2\x1e" "\xab\x5a\xfc\xf5\xd4\x63\x8d\xfe\x8f\x92\x02\xaa\xad\x51\xc9\x79\x04\x9d" "\xd7\x6d\x65\x36\x8c\xbd\x41\x87\xd9\xf7\x42\x57\xc7\xc4\xa2\x3a\xc4\xa3" "\x4e\xec\x5a\xa1\x7e\x78\xc5\x16\x72\x16\xf5\xe7\x21\x38\xd2\x0f\x83\x25" "\xdd\x5f\x8f\x96\xc3\x21\x89\xc9\x04\xea\xef\x58\x09\x87\xf1\xce\x60\x1a" "\x7c\xdc\x35\x46\x1d\xb9\x98\x1a\xc4\x2f\x9e\x24\xb0\x69\x9b\xbe\x4e\x3d" "\x98\x6e\x38\x95\x2b\x0b\x79\x38\xee\xfd\x9e\x7a\x29\x2b\xbb\x66\x36\x7a" "\xd7\x70\x45\xfd\xc1\x88\x55\xc8\x1c\x03\x1d\xed\xd1\x85\xc7\x23\x23\x83" "\x73\xfc\x69\x8d\x67\x67\x91\xd0\x4f\x1f\xf5\xf0\x82\x5a\x66\x19\xe8\x44" "\x89\x2f\x31\xed\x19\x02\x33\xd5\x8e\xce\xe9\x49\xe3\x10\xbf\x2b\x1a\x51" "\xb8\xa3\x3a\xe6\x5a\x06\xd2\xb6\xad\x38\x6b\xf8\x5a\x18\xaf\x7e\xfc\x3c" "\x0f\x20\xe3\x2f\x84\xf6\xaa\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x13\xa6\xc6\x6b\xce\x74\xa8\xfb\x90\x92\x02\x3d\xf6\x95\xda\x27\x14" "\xa7\x93\x3d\x69\x9d\x42\xde\x2b\xc4\xa8\x5e\x0a\x0e\x22\x22\x82\x90\xa7" "\xa7\x55\x3a\xb9\x3a\x16\xe4\x24\x53\xed\x86\x86\x9a\x02\xdf\x2f\x47\xd4" "\x08\x8f\xac\x17\x72\xd3\xcd\x95\x5c\x81\xcb\xf9\x1c\x2c\xa7\x94\x29\x42" "\xf6\x17\x23\xb5\x58\x07\x9b\x82\x54\x78\x44\xf9\x2d\xf2\x49\x9c\x4b\x2c" "\x2e\xf2\x53\x9e\x5d\xaa\x8d\x87\x27\xba\xaa\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\xeb\x73", 3226); *(uint64_t*)0x20000b50 = 0x20000100; memcpy((void*)0x20000100, "GPL\000", 4); *(uint32_t*)0x20000b58 = 0; *(uint32_t*)0x20000b5c = 0; *(uint64_t*)0x20000b60 = 0; *(uint32_t*)0x20000b68 = 0; *(uint32_t*)0x20000b6c = 0; memset((void*)0x20000b70, 0, 16); *(uint32_t*)0x20000b80 = 0; *(uint32_t*)0x20000b84 = 0; *(uint32_t*)0x20000b88 = -1; *(uint32_t*)0x20000b8c = 8; *(uint64_t*)0x20000b90 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000b98 = 0; *(uint32_t*)0x20000b9c = 0x10; *(uint64_t*)0x20000ba0 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint32_t*)0x20000ba8 = 0xffffff7e; *(uint32_t*)0x20000bac = 0; *(uint32_t*)0x20000bb0 = -1; *(uint32_t*)0x20000bb4 = 0; *(uint64_t*)0x20000bb8 = 0; *(uint64_t*)0x20000bc0 = 0; *(uint32_t*)0x20000bc8 = 0x10; *(uint32_t*)0x20000bcc = 0; res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x20000b40ul, /*size=*/0x48ul); if (res != -1) r[0] = res; *(uint64_t*)0x20000400 = 0x200003c0; memcpy((void*)0x200003c0, "mm_page_alloc\000", 14); *(uint32_t*)0x20000408 = r[0]; syscall(__NR_bpf, /*cmd=*/0x11ul, /*arg=*/0x20000400ul, /*size=*/0x10ul); *(uint32_t*)0x20000340 = 2; *(uint32_t*)0x20000344 = 4; *(uint32_t*)0x20000348 = 8; *(uint32_t*)0x2000034c = 1; *(uint32_t*)0x20000350 = 0x80; *(uint32_t*)0x20000354 = -1; *(uint32_t*)0x20000358 = 0; memset((void*)0x2000035c, 0, 16); *(uint32_t*)0x2000036c = 0; *(uint32_t*)0x20000370 = -1; *(uint32_t*)0x20000374 = 0; *(uint32_t*)0x20000378 = 0; *(uint32_t*)0x2000037c = 0; *(uint64_t*)0x20000380 = 0; res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x20000340ul, /*size=*/0x48ul); if (res != -1) r[1] = res; *(uint32_t*)0x20000480 = r[1]; syscall(__NR_bpf, /*cmd=*/0x16ul, /*arg=*/0x20000480ul, /*size=*/4ul); *(uint32_t*)0x200004c0 = 0x11; *(uint32_t*)0x200004c4 = 0x18; *(uint64_t*)0x200004c8 = 0x200001c0; memcpy((void*)0x200001c0, "\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7" "\x08\x00\x00\x00\x00\x00\x00\x7b\x8a\xf8\xff\x00\x00\x00\x00\xb7\x08" "\x00\x00\x00\x00\x00\x00\x7b\x8a\xf0\xff\x00\x00\x00\x00\xbf\xa1\x00" "\x00\x00\x00\x00\x00\x07\x01\x00\x00\xf8\xff\xff\xff\xbf\xa4\x00\x00" "\x00\x00\x00\x00\x07\x04\x00\x00\xf0\xff\xff\xff\xb7\x02\x00\x00\x00" "\x00\x00\x00\x18\x23\x00\x00", 92); *(uint32_t*)0x2000021c = r[1]; memcpy( (void*)0x20000220, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x05\x00\x00\x00\x00\x00\x00\x85\x00" "\x00\x00\xa5\x00\x00\x00\x18\x01\x00\x00\x20\x20\x64\x05\x00\x00\x00\x00" "\x00\x20\x20\x20\x7b\x1a\xf8\xff\x00\x00\x00\x00\xbf\xa1\x00\x00\x00\x00" "\x00\x00\x07\x01\x00\x00\xf8\xff\xff\xff\xb7\x02\x00\x00\x08\x00\x00\x00" "\xb7\x03\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x08\x00\x00\x00\x95", 89); *(uint64_t*)0x200004d0 = 0x20000600; memcpy((void*)0x20000600, "GPL\000", 4); *(uint32_t*)0x200004d8 = 0; *(uint32_t*)0x200004dc = 0; *(uint64_t*)0x200004e0 = 0; *(uint32_t*)0x200004e8 = 0; *(uint32_t*)0x200004ec = 0; memset((void*)0x200004f0, 0, 16); *(uint32_t*)0x20000500 = 0; *(uint32_t*)0x20000504 = 0; *(uint32_t*)0x20000508 = 0; *(uint32_t*)0x2000050c = 0; *(uint64_t*)0x20000510 = 0; *(uint32_t*)0x20000518 = 0; *(uint32_t*)0x2000051c = 0; *(uint64_t*)0x20000520 = 0; *(uint32_t*)0x20000528 = 0; *(uint32_t*)0x2000052c = 0; *(uint32_t*)0x20000530 = 0; *(uint32_t*)0x20000534 = 0; *(uint64_t*)0x20000538 = 0; *(uint64_t*)0x20000540 = 0; *(uint32_t*)0x20000548 = 0; *(uint32_t*)0x2000054c = 0; res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200004c0ul, /*size=*/0x90ul); if (res != -1) r[2] = res; *(uint64_t*)0x200002c0 = 0x20000000; memcpy((void*)0x20000000, "kmem_cache_free\000", 16); *(uint32_t*)0x200002c8 = r[2]; syscall(__NR_bpf, /*cmd=*/0x11ul, /*arg=*/0x200002c0ul, /*size=*/0x10ul); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); for (procid = 0; procid < 5; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }