// https://syzkaller.appspot.com/bug?id=ca6caa0592f51d1206b3365b25f6fc01815360a8 // 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 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 (;;) { 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[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; *(uint32_t*)0x20000200 = 0xc; *(uint32_t*)0x20000204 = 0xe; *(uint64_t*)0x20000208 = 0x20000940; memcpy( (void*)0x20000940, "\xb7\x02\x00\x00\x01\x00\x00\x00\xbf\xa3\x00\x00\x00\x00\x00\x00\x07\x03" "\x00\x00\x00\xfe\xff\xff\x7a\x0a\xf0\xff\xf8\xff\xff\xff\x79\xa4\xf0\xff" "\x00\x00\x00\x00\xb7\x06\x00\x00\xff\xff\xff\xff\x2d\x64\x05\x00\x00\x00" "\x00\x00\x65\x04\x04\x00\x01\x00\x00\x00\x04\x04\x00\x00\x01\x00\x7d\x60" "\xb7\x03\x00\x00\x01\x00\x00\x00\x6a\x0a\x00\xfe\x00\x00\x00\x00\x85\x00" "\x00\x00\x0d\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00" "\x00\x00\x00\x00\x49\x6c\xf2\x82\x7f\xb4\x78\x28\x37\xf8\xc8\x90\x3a\x43" "\x1c\xa7\x11\xfc\xd0\xcd\xf2\x14\x6e\xc5\x03\x79\x58\xe2\x71\xf6\x0d\x25" "\xb7\xff\x01\x00\x00\x05\x00\x5a\xf0\x6c\x83\x92\x3d\xd2\x9c\x03\x40\x55" "\xb6\x7d\xaf\xe6\xc8\xdc\x21\x5d\x78\x7a\x74\xa0\x09\xdc\x02\x00\xf3\x02" "\xfb\xbb\x7d\xb6\x06\x1f\xf1\x10\x02\x6e\x67\xe2\x6d\x2e\xfe\x31\xab\x7e" "\xa0\xc3\x4f\x17\xe3\xad\x6e\xa4\x06\x62\x20\x03\xb5\x38\xdf\xd8\xe0\x12" "\xe7\x95\x78\xe5\x1b\xc5\x30\x99\xe9\x0f\x45\x80\xd7\x60\x55\x1b\x5b\x34" "\x1a\x2d\x7c\xbd\xb9\xcd\x38\xbd\xb2\xca\x8e\xeb\x9c\x15\xab\x3a\x14\x81" "\x7a\xc6\x1e\x4d\xd1\x11\x83\xa1\x34\x77\xbf\x7e\x06\x0e\x36\x70\xef\x0e" "\x78\x9f\x65\xf1\x32\x8d\x67\x04\x90\x2c\xbe\x7b\xc0\x4b\x82\xd2\x78\x9c" "\xb1\x32\xb8\x66\x7c\x21\x43\x66\x19\xf2\x8d\x99\x61\xb6\x3e\x1a\x9c\xf6" "\xc2\xa6\x60\xa1\x7e\x3c\x18\x4b\x75\x1c\x51\x16\x0f\xbc\xbb\xf3\x5b\x1e" "\x7b\xe6\x14\x8b\xa5\x32\xe6\x08\x3b\xe8\x93\x58\xb2\x05\x00\x21\x79\x7e" "\xea\x09\xc3\x46\xdf\x9e\x85\xf8\x0d\x44\xa4\x79\x13\x17\x00\x00\x00\x00" "\x00\x00\x00\x33\x4d\x83\xac\xe8\xbe\x6e\x80\xe7\x11\x13\x61\x0e\x10\xd8" "\x58\xe8\x32\x7a\xf0\x1f\xb6\xc8\x6a\xda\xc1\x22\x33\xf9\xa1\xfb\x9c\x2a" "\xec\x61\xce\x63\xa3\x8d\x2f\xb4\x00\x00\x00\x00\x00\x00\x5f\xdd\xee\xa0" "\xc6\xe9\x57\x67\xd4\x2b\x4e\x54\x86\x1d\x02\x27\xdb\xfd\x24\x6d\x7f\x71" "\x5a\x7f\x3d\xea\xdd\x02\x00\x00\x00\x00\x00\x00\x00\x37\x67\xd2\xe2\x4f" "\x29\x6e\xa0\x18\x2b\xab\xc1\x8c\xae\x2e\xd4\xb4\x39\x0a\xf8\xa9\xce\xaf" "\xd0\x7e\xd0\x0b\x00\x00\x97\x27\x80\x87\x00\x14\x60\x00\x00\x00\x00\x00" "\x00\x00\xfa\x00\x89\xea\xfd\x9a\x54\x6b\xfa\x8e\x2b\xdf\xf1\x2b\xcd\x78" "\x0e\xed\x26\x07\xdb\x46\xe1\x08\x11\xa4\xe7\x8e\x80\xa6\x3f\x27\x53\x9b" "\x4e\x39\x68\xbf\x93\x14\x62\xbc\xbc\x5a\x6f\x33\x07\x8e\x7e\xb5\x95\x00" "\x00\x00\x00\x01\x00\x00\x00\xcb\x8b\xea\x4b\x40\x55\x91\x69\xeb\xb5\xf3" "\x66\x78\x95\x05\x00\x00\x00\x00\x00\x00\x00\x38\x34\x4e\x12\xd5\x0e\xa5" "\x9c\x5f\x03\x21\x9d\x29\x99\x9b\xa9\xb6\x01\x7e\x05\x06\xe8\xe6\xdb\xd7" "\xe8\xb1\xe2\xdd\x0d\x3c\xbd\x3c\xf0\x60\xd5\xef\xb6\xcf\x86\x64\xc3\x7f" "\x74\x75\x3b\x2c\x0f\xac\x82\x3e\x4c\x83\xd7\x8b\xfe\xbb\x64\xdb\xeb\x16" "\xb2\x9f\x92\x45\x71\x92\x3d\x3b\xff\xa8\x0a\x42\x3c\xce\xaf\xa2\x43\x86" "\x11\x08\x97\xe1\x47\xb7\xb8\x78\xdf\x1b\xa7\xd8\x87\xd0\x2e\x48\x02\x00" "\x00\x00\x00\x00\x00\x00\xa9\x7c\x3b\x5a\x00\xcc\x01\x4b\x01\x71\xe5\x35" "\x69\x9e\x9b\xe0\x7d\x62\x46\xde\x8d\xe2\xc5\x7b\xc1\xda\x71\x94\x2d\xf9" "\x87\xae\x3e\xec\x9e\x1f\x4b\xd5\xc8\x73\x34\x3e\x44\x34\x05\xab\xf4\xc1" "\x2e\x95\x83\x0a\xfc\x42\x55\x5c\xb1\x9f\xcd\x90\x46\x09\x9c\x2c\x24\x60" "\x3e\xce\x05\xcf\xd0\x07\x00\x45\xd9\xc6\x9b\xfb\x4f\x79\x13\x06\x3f\x3c" "\x25\x34\x26\x98\x2d\x78\xf0\x10\xb8\xf8\x0b\xb3\xc8\x3d\x09\x1b\xc1\xbe" "\xc6\x38\x84\x2e\xae\x3b\xce\xd4\x9a\x24\x64\x4c\x23\x7d\xce\x13\x48\x53" "\x52\xe7\xf7\xc3\x01\x00\x00\x00\x00\x00\x00\x39\x2d\x8b\x8b\x95\xfb\xfb" "\xec\x94\xcc\xf3\xfd\x7f\x85\xc1\xab\x56\x01\x85\xcb\xe9\xe3\x4b\xd1\xa3" "\x04\x94\x49\xd2\xd3\x93\xd2\x3d\x20\x1e\xe7\x3f\x3d\x6b\xd0\xa2\xf3\x22" "\x5d\x68\x4e\x34\x5d\xa1\x68\xfb\x46\x85\xdf\xd2\x01\x00\x00\x00\xe0\x1b" "\xe6\x43\x75\xb4\x00\x3c\x68\x9e\xbc\x54\x03\xa4\xe8\x75\x10\xc0\x60\xd1" "\x6c\x40\x4b\x93\x1b\x19\x8f\xa3\xf9\x7d\x66\xe5\x45\xdc\x74\x6b\x1d\xf5" "\xfc\xef\x67\x35\xfc\x6f\xa0\xfb\x09\x00\x00\x00\x00\x95\x61\x63\xdc\x37" "\x1d\x17\x7e\x94\x4c\xe0\x1a\x77\x31\x31\x9a\xda\xbc\xb2\x77\x81\xca\x0b" "\x36\x93\xdd\xb6\xb2\xe4\x03\x7a\x9e\x74\xde\xa8\xb4\x30\x91\x1e\x24\xe5" "\x8f\xe7\x99\x96\xfd\x47\xd7\x72\xfd\xc9\x59\xf6\x10\xdc\x3f\xc2\x64\x27" "\x96\xbf\x2b\xac\xd3\x87\x70\xf7\x9c\xe5\x33\xca\x9f\x43\xa8\xdc\x1b\xa1" "\x2d\x41\x42\xb4\xc5\x56\x20\xdb\x71\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\xf7\x41\x63\x52\xa6\x6c\x11\xe9\x5f\x36\xac\xb5\x4b\x3c\xb2\xab" "\x84\x91\x70\xf7\x2c\x70\xf8\xe6\x2c\xe0\x94\x76\xb7\xb6\x6a\xe7\xdd\x1d" "\x5c\xf2\xbd\xce\xa9\xf4\xbe\x23\xc9\xd8\x47\x2a\x5c\x50\x67\x1f\xf0\xbb" "\x57\xce\x86\x5c\x6b\x63\xe6\xdf\xa6\xad\x24\xd0\xf5\xde\x01\x37\xa5\xce" "\xf1\x2a\x71\x23\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x28\xf8" "\x83\x5d\x54\xb2\x5a\x46\xeb\xb7\xf1\xb6\x79\x77\x64\x94\xb1\x29\x79\x13" "\x2c\x4f\xbd\xee\xe7\x2e\xdb\x5a\xc5\xa5\x07\x80\xfc\x75\x05\x25\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x52\xd6\xc3\xd8\x55\x82" "\x88\x3a\x8e\x13\x85\x59\x6f\x23\x28\x73\xda\x20\x5a\x8f\xd4\x81\x7e\x44" "\x1e\xd7\x67\xf0\x32\x61\x56\x0b\x86\x6a\x4d\x72\xa4\xb9\xe8\xcb\x0c\x45" "\xad\xce\xdd\xbf\x8b\x4f\x7b\xe7\xf0\x05\xf9\x4c\x0c\x67\xc4\xa4\xc4\x74" "\x08\xfd\x25\xc2\xac\xab\x97\x58\x8e\x02\x3b\x4d\xab\x6e\xc5\xf3\x08\x00" "\x00\x00\x25\xe1\xa2\x4c\xf0\xac\x44\x3e\xf8\x42\x7a\x03\xe2\x2e\xa5\xd8" "\x88\xf0\x70\x02\xef\x6d\x94\x47\x08\xcd\xab\x88\x97\x95\x2e\x5e\x5e\xcc" "\x10\xc7\xe8\xb7\xb3\xe0\xb6\x84\x70\x1c\x7f\x38\xe2\xf2\x19\x2a\x5b\xf5" "\x8c\x43\x12\x7c\xf1\x44\xe4\xf6\xee\x5f\xfc\xcd\x2a\xb4\xe3\x80\x03\x00" "\x8d\x4e\x9d\xb9\x10\xfb\x6d\x73\x67\x85\xe3\xb2\x01\x83\x22\xbd\xdc\x39" "\x59\x43\x61\x3f\xdc\x06\xe9\x59\x7c\x8b\xbb\xc6\x45\x85\x0c\x20\xf6\x5b" "\xc7\xaf\x5a\x14\xff\x30\x88\x5d\x1b\x07\xab\x52\x0c\x19\x9f\xac\x3b\xbf" "\x03\x83\x7a\x1d\xc9\x57\xf1\x0f\xf0\xd0\xaa\xf8\x3f\xbb\x96\x12\x0c\xe2" "\x08\x05\x53\x9a\xc7\xc1\x53\xe4\x76\xb7\xc5\xf9\xbf\xec\x77\x0e\xcd\xb7" "\xca\xe6\xcf\x30\x26\x79\xbd\x4c\x2e\xbe\x72\xe3\x5c\x15\x43\xad\x3c\xa1" "\x9c\x1c\x03\xd8\xca\x26\xcb\x74\x71\xa0\x22\x4d\x68\xfa\x45\x57\xce\x13" "\xa6\x8f\xf1\x82\x63\x9b\xdf\x19\x33\x9d\x8a\xa0\x36\x00\x8e\x80\x72\x20" "\x97\x1f\xd7\x38\x53\x5f\xb6\xf1\xfe\x04\x4b\xad\xbe\x8b\xd3\xbf\x02\xbe" "\xac\x85\xf2\x00\x00\x00\x00\xb3\xc0\x19\x32\xbc\x3a\xbe\x76\x29\x96\x64" "\xde\x9d\x4c\xe8\x7c\xbc\xab\x27\x31\x8e\xe3\x38\x9e\x7c\xe7\x34\x21\x29" "\x32\xfd\x9f\x0f\x1c\x0c\xdf\xba\x0b\xd4\x04\xbf\x17\xb1\xd6\xb4\xe0\x49" "\x21\x0a\xfe\xaa\x63\x70\x5a\x76\x6f\xfa\xc1\x04\x86\xc5\x5f\xc7\xfe\xf7" "\xe8\xe3\x50\x28\x3b\x19\xd3\x33\xa4\x65\x77\x7e\xf9\xd3\xd8\xaa\x95\x2d" "\x0b\x64\x6e\x52\xde\x23\x4b\x13\xb1\xa2\x01\x3c\x00\xdc\xe9\x8e\x56\x9f" "\x12\xab\xc1\x24\x4f\x81\x07\x2b\x1f\x06\x52\x6d\x4b\xc0\x5f\xb6\x9b\x95" "\x6e\x38\x25\x82\xef\x97\xcc\xae\xcc\x44\x3b\x1a\xcc\x9b\x58\x97\x36\x9f" "\x1f\x9f\x45\x7c\x82\x48\x5c\x5c\xda\x82\xc9\x8b\xee\x96\x1b\x02\xfb\x93" "\x89\x53\x67\x89\xc3\xde\x90\x2f\x91\xae\xab\xab\x34\x4c\xa0\x63\xe8\xc1" "\xbc\x65\x39\xa3\xd8\xc5\xa7\x00\x94\x6d\x0d\xbf\x04\x0c\x16\xae\xf4\x82" "\xa0\xd6\x3c\xd9\x03\x5c\x58\xef\xf4\x72\xaf\x4d\x94\x55\x9f\xad\xa1\xb0" "\x2c\xd0\x1a\xc1\x33\x97\xe0\xdd\x05\x6a\x70\x84\xfe\x9c\x84\x09\x12\xe1" "\xc6\xc8\x7c\xe9\xcf\xc0\x85\xa4\x12\x82\x9b\xbc\x5b\x39\x9c\xfc\xbc\x70" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\xde\x97" "\xe5\xb9\x4f\x5a\x9e\x31\xa5\x9c\x4b\x84\x47\xd9\xdc\xba\xe0\xa3\x07\x06" "\xb7\x96\x85\xdd\x65\xca\x75\x03\xd1\x83\x9a\x32\xdc\x48\xf1\xb3\x06\xe4" "\xc0\x08\x65\xde\x35\x94\xc6\xd4\x45\xd2\x02\xc9\x3e\x3f\x3f\xd3\xdf\xfa" "\xfb\xc7\xbc\x9e\x26\x5a\x2e\x29\x3b\xa8\xe9\x5e\x53\x7d\x64\x76\xc6\x28" "\x83\x69\x39\xbf\xb7\xc4\xc5\xc7\x6d\xc9\x0a\xb3\x8a\x72\xeb\xca\x64\x6c" "\xfb\xf7\x49\x8e\xad\x3e\x40\x16\xfb\x17\xd2\x37\xec\x86\xc5\xc0\x09\xd4" "\x82\x75\xd6\xa5\xbb\xab\x4c\x48\x60\x31\x71\xda\x91\xcb\xd2\x45\x07\xa3" "\x81\xc6\xac\x7b\x10\xfb\x42\x2a\xec\xcb\x05\xa4\x6d\x4c\xe0\x03\xa2\x4d" "\x85\x0d\x6d\x16\x41\xeb\xd2\xb5\xf8\xa5\xf1\x29\x11\x16\xe0\x76\x5f\x80" "\x20\x10\x09\x1b\xc4\xad\x50\x7f\xf8\xdc\xb6\xb8\x39\x5c\x1d\xae\x31\x49" "\x77\x6e\x29\xe7\xbf\x89\x0c\x44\x31\x82\x19\xc1\x22\x0c\xe8\x3f\x0d\xa5" "\x3c\xc9\xf1\x13\x84\x19\xc3\xd5\x22\xa9\x86\xb3\xbf\xd7\xfd\xd2\xb1\x79" "\xd0\xb8\xaa\x27\x60\xca\xdf\xd1\x41\x87\x73\x74\x2d\x79\xce\xa6\x36\x37" "\xdb\xb9\x41\x9b\x1a\xfd\xf5\xd1\xff\x39\x88\x16\xa7\xc6\x6b\x8e\x56\x0d" "\x7e\xa2\x47\x08\x3b\xc4\x78\x2a\x69\xf2\x33\x16\x5f\xc0\xb9\x6e\x41\xdd" "\xf8\xa3\xe2\x94\x2f\xf2\x6a\x2a\x95\xe4\x66\x7e\xd6", 2011); *(uint64_t*)0x20000210 = 0x20000340; memcpy((void*)0x20000340, "syzkaller\000", 10); *(uint32_t*)0x20000218 = 0; *(uint32_t*)0x2000021c = 0; *(uint64_t*)0x20000220 = 0; *(uint32_t*)0x20000228 = 0; *(uint32_t*)0x2000022c = 0; memset((void*)0x20000230, 0, 16); *(uint32_t*)0x20000240 = 0; *(uint32_t*)0x20000244 = 0; *(uint32_t*)0x20000248 = -1; *(uint32_t*)0x2000024c = 8; *(uint64_t*)0x20000250 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000258 = 0; *(uint32_t*)0x2000025c = 0x10; *(uint64_t*)0x20000260 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint32_t*)0x20000268 = 0xffffffd0; *(uint32_t*)0x2000026c = 0; *(uint32_t*)0x20000270 = -1; *(uint32_t*)0x20000274 = 0; *(uint64_t*)0x20000278 = 0; res = syscall(__NR_bpf, 5ul, 0x20000200ul, 0x48ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000080 = r[0]; *(uint32_t*)0x20000084 = 0x2a0; *(uint32_t*)0x20000088 = 0x10; *(uint32_t*)0x2000008c = 0xfffffe8d; *(uint64_t*)0x20000090 = 0x20000500; memcpy((void*)0x20000500, "\xb9\xff\x03\x00\x60\x0d\x69\x8c\xb8\x9e\x14\xf0\x43\x08\x1f\xff\xff" "\xff\x00\x07\x40\x00\x63\x2f\x77\xfb\x05\x14\x14\x0e\xe9\x34\xa0\xa6" "\x62\x07\x9f\x4b\x4d\x2f\x87\xe5\xfe\xca\x6a\xab\x84\x50\x13\xf2\x32" "\x5f\x1a\x39\x05\x01\x08\x03\x8d\xa1\x92\x44\x25\x18\x1a\xa5", 66); *(uint64_t*)0x20000098 = 0; *(uint32_t*)0x200000a0 = 0x66; *(uint32_t*)0x200000a4 = 0x60000000; *(uint32_t*)0x200000a8 = 0xb20c; *(uint32_t*)0x200000ac = 0xfffffe09; *(uint64_t*)0x200000b0 = 0x20000040; memcpy((void*)0x20000040, "\x3f\x58\x26\x6c\x79\x97\x26\x86\x5b\xf7\x83\x0e\x37\x73\xdc\xe9\xaa" "\x7e\x76\xbe\xcc\x18\x91\x0b\x7b\x50\xb8\x0d\xbe\xd5\xf7\x57\xc2\xa0" "\x44\x67\x67\x1d\x72\xf7\x16\x59\x5f\xf4\x22\xe7\x1a\x25\xd9\x06\xdc" "\xc8\xc7\x00\x7c\x06\x05\xa0\xff\xff\xff\xff", 62); *(uint64_t*)0x200000b8 = 0x20000000; *(uint32_t*)0x200000c0 = 0; *(uint32_t*)0x200000c4 = 0; syscall(__NR_bpf, 0xaul, 0x20000080ul, 0x28ul); res = syscall(__NR_socket, 0x10ul, 3ul, 0); if (res != -1) r[1] = res; *(uint32_t*)0x20000180 = 6; *(uint32_t*)0x20000184 = 4; *(uint64_t*)0x20000188 = 0x20000200; memcpy((void*)0x20000200, "\x18\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x85" "\x00\x00\x00\x2c\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00", 32); *(uint64_t*)0x20000190 = 0x200000c0; memcpy((void*)0x200000c0, "GPL\000", 4); *(uint32_t*)0x20000198 = 0; *(uint32_t*)0x2000019c = 0x1000; *(uint64_t*)0x200001a0 = 0x20001400; *(uint32_t*)0x200001a8 = 0; *(uint32_t*)0x200001ac = 0; memset((void*)0x200001b0, 0, 16); *(uint32_t*)0x200001c0 = 0; *(uint32_t*)0x200001c4 = 0; *(uint32_t*)0x200001c8 = -1; *(uint32_t*)0x200001cc = 8; *(uint64_t*)0x200001d0 = 0; *(uint32_t*)0x200001d8 = 0; *(uint32_t*)0x200001dc = 0x10; *(uint64_t*)0x200001e0 = 0; *(uint32_t*)0x200001e8 = 0; *(uint32_t*)0x200001ec = 0; *(uint32_t*)0x200001f0 = -1; *(uint32_t*)0x200001f4 = 0; *(uint64_t*)0x200001f8 = 0; res = syscall(__NR_bpf, 5ul, 0x20000180ul, 0x18ul); if (res != -1) r[2] = res; *(uint64_t*)0x20000140 = 0; *(uint32_t*)0x20000148 = 0; *(uint64_t*)0x20000150 = 0x20000080; *(uint64_t*)0x20000080 = 0x20000000; *(uint32_t*)0x20000000 = 0x34; *(uint16_t*)0x20000004 = 0x10; *(uint16_t*)0x20000006 = 0x801; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint8_t*)0x20000010 = 0; *(uint8_t*)0x20000011 = 0x60; *(uint16_t*)0x20000012 = 0; *(uint32_t*)0x20000014 = 0; *(uint32_t*)0x20000018 = 0; *(uint32_t*)0x2000001c = 0; *(uint16_t*)0x20000020 = 0xc; STORE_BY_BITMASK(uint16_t, , 0x20000022, 0x2b, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000023, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000023, 1, 7, 1); *(uint16_t*)0x20000024 = 8; *(uint16_t*)0x20000026 = 1; *(uint32_t*)0x20000028 = r[2]; *(uint16_t*)0x2000002c = 8; *(uint16_t*)0x2000002e = 0x1b; *(uint32_t*)0x20000030 = 0; *(uint64_t*)0x20000088 = 0x34; *(uint64_t*)0x20000158 = 1; *(uint64_t*)0x20000160 = 0; *(uint64_t*)0x20000168 = 0; *(uint32_t*)0x20000170 = 0; syscall(__NR_sendmsg, r[1], 0x20000140ul, 0ul); } 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); loop(); return 0; }