// https://syzkaller.appspot.com/bug?id=94100cff4d9a032b284ae1f06f9a8baaddf0a419 // 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 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 void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); if (pthread_create(&th, &attr, fn, arg)) exit(1); pthread_attr_destroy(&attr); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; for (;;) { uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts); if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; now = current_time_ms(); if (now - start > timeout) return 0; } } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); int i; for (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) { } } #define SYZ_HAVE_SETUP_TEST 1 static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); } #define SYZ_HAVE_RESET_TEST 1 static void reset_test() { int fd; for (fd = 3; fd < 30; fd++) close(fd); } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 8; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 45); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); reset_test(); 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 < 5 * 1000) continue; kill_and_wait(pid, &status); break; } } } uint64_t r[2] = {0xffffffffffffffff, 0x0}; void execute_call(int call) { long res; switch (call) { case 0: res = syscall(__NR_socket, 0xa, 1, 0); if (res != -1) r[0] = res; break; case 1: syscall(__NR_clone, 0x2102001fff, 0, 0x9999999999999999, 0x20000040, -1); break; case 2: *(uint32_t*)0x20000000 = 0; *(uint16_t*)0x20000008 = 0xa; *(uint16_t*)0x2000000a = htobe16(0); *(uint32_t*)0x2000000c = 0; *(uint8_t*)0x20000010 = -1; *(uint8_t*)0x20000011 = 1; *(uint8_t*)0x20000012 = 0; *(uint8_t*)0x20000013 = 0; *(uint8_t*)0x20000014 = 0; *(uint8_t*)0x20000015 = 0; *(uint8_t*)0x20000016 = 0; *(uint8_t*)0x20000017 = 0; *(uint8_t*)0x20000018 = 0; *(uint8_t*)0x20000019 = 0; *(uint8_t*)0x2000001a = 0; *(uint8_t*)0x2000001b = 0; *(uint8_t*)0x2000001c = 0; *(uint8_t*)0x2000001d = 0; *(uint8_t*)0x2000001e = 0; *(uint8_t*)0x2000001f = 1; *(uint32_t*)0x20000020 = 0; *(uint16_t*)0x20000088 = 0xa; *(uint16_t*)0x2000008a = htobe16(0); *(uint32_t*)0x2000008c = 0; *(uint8_t*)0x20000090 = 0; *(uint8_t*)0x20000091 = 0; *(uint8_t*)0x20000092 = 0; *(uint8_t*)0x20000093 = 0; *(uint8_t*)0x20000094 = 0; *(uint8_t*)0x20000095 = 0; *(uint8_t*)0x20000096 = 0; *(uint8_t*)0x20000097 = 0; *(uint8_t*)0x20000098 = 0; *(uint8_t*)0x20000099 = 0; *(uint8_t*)0x2000009a = 0; *(uint8_t*)0x2000009b = 0; *(uint8_t*)0x2000009c = 0; *(uint8_t*)0x2000009d = 0; *(uint8_t*)0x2000009e = 0; *(uint8_t*)0x2000009f = 0; *(uint32_t*)0x200000a0 = 0; syscall(__NR_setsockopt, r[0], 0x29, 0x2e, 0x20000000, 0x108); break; case 3: *(uint32_t*)0x20000800 = 0xe8; res = syscall(__NR_getsockopt, r[0], 0x29, 0x23, 0x20000700, 0x20000800); if (res != -1) r[1] = *(uint32_t*)0x20000734; break; case 4: *(uint8_t*)0x20000840 = 0xac; *(uint8_t*)0x20000841 = 0x14; *(uint8_t*)0x20000842 = 0x14; *(uint8_t*)0x20000843 = 0xbb; *(uint8_t*)0x20000850 = 0xac; *(uint8_t*)0x20000851 = 0x14; *(uint8_t*)0x20000852 = 0x14; *(uint8_t*)0x20000853 = 0x19; *(uint16_t*)0x20000860 = htobe16(0x4e22); *(uint16_t*)0x20000862 = htobe16(0x7f4); *(uint16_t*)0x20000864 = htobe16(0x4e23); *(uint16_t*)0x20000866 = htobe16(0); *(uint16_t*)0x20000868 = 0; *(uint8_t*)0x2000086a = 0xa0; *(uint8_t*)0x2000086b = 0x20; *(uint8_t*)0x2000086c = 0xaf; *(uint32_t*)0x20000870 = 0; *(uint32_t*)0x20000874 = r[1]; *(uint64_t*)0x20000878 = 0x1f; *(uint64_t*)0x20000880 = 0xfff; *(uint64_t*)0x20000888 = 1; *(uint64_t*)0x20000890 = 7; *(uint64_t*)0x20000898 = 0; *(uint64_t*)0x200008a0 = 0x298; *(uint64_t*)0x200008a8 = 0x401; *(uint64_t*)0x200008b0 = 0x457c; *(uint64_t*)0x200008b8 = 0x24; *(uint64_t*)0x200008c0 = 0xfffffffffffffff8; *(uint64_t*)0x200008c8 = 9; *(uint64_t*)0x200008d0 = 0xff; *(uint32_t*)0x200008d8 = 6; *(uint32_t*)0x200008dc = 0x6e6bc0; *(uint8_t*)0x200008e0 = 0xb7; *(uint8_t*)0x200008e1 = 0; *(uint8_t*)0x200008e2 = 2; *(uint8_t*)0x200008e3 = 3; *(uint8_t*)0x200008e8 = -1; *(uint8_t*)0x200008e9 = 1; *(uint8_t*)0x200008ea = 0; *(uint8_t*)0x200008eb = 0; *(uint8_t*)0x200008ec = 0; *(uint8_t*)0x200008ed = 0; *(uint8_t*)0x200008ee = 0; *(uint8_t*)0x200008ef = 0; *(uint8_t*)0x200008f0 = 0; *(uint8_t*)0x200008f1 = 0; *(uint8_t*)0x200008f2 = 0; *(uint8_t*)0x200008f3 = 0; *(uint8_t*)0x200008f4 = 0; *(uint8_t*)0x200008f5 = 0; *(uint8_t*)0x200008f6 = 0; *(uint8_t*)0x200008f7 = 1; *(uint32_t*)0x200008f8 = htobe32(0x4d5); *(uint8_t*)0x200008fc = 0x32; *(uint16_t*)0x20000900 = 2; *(uint32_t*)0x20000904 = htobe32(0); *(uint32_t*)0x20000914 = 0x3504; *(uint8_t*)0x20000918 = 1; *(uint8_t*)0x20000919 = 0; *(uint8_t*)0x2000091a = 6; *(uint32_t*)0x2000091c = 6; *(uint32_t*)0x20000920 = 4; *(uint32_t*)0x20000924 = 0xce; syscall(__NR_setsockopt, r[0], 0x29, 0x23, 0x20000840, 0xe8); break; case 5: memcpy((void*)0x20001280, "\x6e\x61\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x1b\x00\x00\x00\x05\x00\x00\x00\x78\xff\xff\xff\x7f\x02\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\xa8\x06\x00\x00\xa8\x06\x00\x00\xa8\x06\x00\x00\xa8\x06\x00\x00" "\xa8\x06\x00\x00\x05\x00\x00\x00\xc9\xbb\xa8\xc0\x90\xe9\xe6\x62" "\xd0\xff\x7a\xaf\xd6\x4d\x4b\x92\x0b\x4d\x44\x35\x61\xde\xb7\x99" "\xb6\xa7\x96\x47\x24\x32\x4e\xdf\x12\x22\x82\xfa\x4b\x4d\x8b\x78" "\x78\x4d\x00\x00\x02\x97\x5d\xd9\x19\x7c\x2b\xbc\xd6\x1a\xe9\x49" "\xbf\x7a\xc6\x1a\xff\xed\x8e\xb8\x41\x8e\xd9\x36\x4c\x7a\x3a\x52" "\xe2\xb1\x75\x24\x2d\x4b\x24\xf4\xdb\x8c\xe7\x24\x84\xf5\x37\xea" "\xb2\xfe\x7f\x45\xc5\x3a\xd0\x21\x77\xf5\x6e\x19\x4f\x67\x82\x25" "\x4a\xe6\x97\x5e\x96\x6d\x28\xa9\x74\xc9\xdf\x30\x64\x43\xd6\x0b" "\x3f\x9d\x6f\xb7\x87\x0a\xd0\x17\x65\x95\x2f\x8b\xd1\x21\xb4\xe5" "\x6c\xf0\xe3\x46\x17\x7e\xff\x7a\x65\x34\x00\x40\x4b\x81\x79\x00" "\xdb\x96\xcb\x2e\x39\x84\xbc\x92\xd2\x1a\xf3\x01\x63\x0a\xf9\xe1" "\x6d\x69\x56\xde\x68\xa0\xce\x67\x6e\xff\x3e\x41\xc3\x0b\x97\x17" "\x4f\xe5\x0d\xbc\xbb\x99\x85\xf7\xb7\x4b\x5e\x16\x6e\x47\x35\x43" "\x49\xa9\x1c\xc5\xec\xcd\x69\x2c\xfc\x42\x02\xf0\xfa\x15\x9f\xe5" "\xdc\xe2\x68\x7f\x19\xbc\x7c\x4e\x99\x8f\x17\xc0\x11\x9a\x6f\xdf" "\x46\x42\xab\x85\x37\x70\xdb\x00\x60\xf7\xb6\x6c\x17\x1c\x3b\x9c" "\x76\x5d\x2a\xbb\x4f\x11\xd0\xf4\x9a\x3b\xac\x8b\xd7\x44\x69\xf7" "\x08\x4f\xca\x11\x62\x52\x93\xc2\xcc\x33\x7c\xe8\x00\x00\x00\x00" "\x37\x7d\x21\xcc\x9b\x4d\xf9\xd7\x27\x5a\x2e\x62\x88\xcc\xf3\xd7" "\x53\x94\x7f\x4b\x2c\x60\x49\x6a\xdf\x48\x4b\x85\x8d\xe6\x91\xdf" "\x02\x67\xc7\x1a\x8c\x7e\x9e\x99\x6f\x77\xd5\x83\x0a\x32\xb4\x8b" "\xe4\xfc\xfa\xd5\x4d\x0e\x62\xd7\x01\xd9\x22\xf9\xbe\x53\x62\xaf" "\x14\x51\x8c\x6b\xa1\x52\x79\x36\x3e\x6c\xae\xf1\x9d\x6a\x04\x60" "\x65\x54\x6f\x94\x44\xb6\xff\x10\x70\x62\xf2\x81\xec\x36\xc7\xd3" "\x6f\x24\xe2\x75\xba\x24\x9a\xdb\x50\x29\x42\xbe\x16\xae\xc7\x15" "\x1b\x48\x53\x46\x44\x44\xce\x73\x9d\xe6\xe8\x6e\x8e\xe9\x60", 495); *(uint64_t*)0x2000146f = 0x20000140; memcpy( (void*)0x20001477, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x68\x02\xb0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x69\x70" "\x72\x61\x6e\x67\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xfe\x80\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xff\x01\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x01\xfe\x80\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\xbb\xfe\x80\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xaa\x20\x00\x00\x00\x00\x00\x00\x00\x38\x01" "\x72\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00" "\x00\x00\x00\x00\x60\x00\x00\x00\x09\x00\x00\x00\x00\x02\x00\x00\xff" "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xfe\x80\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xff\xff\xac\x14\x14\xaa\xfe\x80\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xfe\x80\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xff\xff\x00\x00\x00\x00\xfe\x80\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x1f\xfe\x80\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xbb\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xbb\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\xbb\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x01\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21" "\x06\x00\x00\x00\x48\x00\x4e\x45\x54\x4d\x41\x50\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x10\x00\x00\x00\x7f\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x0a\x4e\x23\x4e\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x58\x01\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x48\x00\x68\x62\x68\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x01\x01\x02\x00\x01\x00\x01\x00\x08\x00\x3f" "\x00\x02\x00\x07\x00\x04\x00\x27\x95\x01\x00\xcc\x0f\xc6\x08\xff\xff" "\x8c\x79\x04\x00\x40\x56\x02\x00\x48\x00\x52\x45\x44\x49\x52\x45\x43" "\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\xac\x14\x14\x0b\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x01\x00\x67\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x02\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xff\xff\xff\xff\xff\xff" "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\xff" "\xff\xff\xff\x00\xff\x00\x00\x00\x76\x65\x74\x68\x31\x5f\x74\x6f\x5f" "\x74\x65\x61\x6d\x00\x00\x00\x73\x79\x7a\x6b\x61\x6c\x6c\x65\x72\x30" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x01\x10\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\x40" "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x73\x72\x68\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x3c\xc6\x06\x00\x04\x00\x00\x34\x10\x24\x00" "\x00\x00\x00\x00\x00\x48\x00\x52\x45\x44\x49\x52\x45\x43\x54\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff" "\xff\xff\xff\xff\xff\x4e\x22\x00\x65\xfe\x80\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x10\xff\x01\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff" "\xff\x00\x00\x00\x00\x00\xff\xff\xff\x00\xff\x00\x00\x00\xff\xff\xff" "\x00\x00\x00\x00\xff\x74\x65\x71\x6c\x30\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x7f\x04\x0e\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x01\x60\x01\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x28\x00\x65\x75\x69\x36\x34\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x65\x75\x69\x36" "\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x48\x00\x4e\x45\x54\x4d\x41\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00" "\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x05\x00\x4e\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\xd0\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\xfe\xff\xff\xff\x00\x00\x00\x00", 1912); syscall(__NR_setsockopt, r[0], 0x29, 0x40, 0x20001280, 3); break; case 6: *(uint32_t*)0x20000dc0 = 6; *(uint16_t*)0x20000dc8 = 0xa; *(uint16_t*)0x20000dca = htobe16(0x4e21); *(uint32_t*)0x20000dcc = 8; *(uint8_t*)0x20000dd0 = 0xfe; *(uint8_t*)0x20000dd1 = 0x80; *(uint8_t*)0x20000dd2 = 0; *(uint8_t*)0x20000dd3 = 0; *(uint8_t*)0x20000dd4 = 0; *(uint8_t*)0x20000dd5 = 0; *(uint8_t*)0x20000dd6 = 0; *(uint8_t*)0x20000dd7 = 0; *(uint8_t*)0x20000dd8 = 0; *(uint8_t*)0x20000dd9 = 0; *(uint8_t*)0x20000dda = 0; *(uint8_t*)0x20000ddb = 0; *(uint8_t*)0x20000ddc = 0; *(uint8_t*)0x20000ddd = 0; *(uint8_t*)0x20000dde = 0; *(uint8_t*)0x20000ddf = 0x1e; *(uint32_t*)0x20000de0 = 2; *(uint16_t*)0x20000e48 = 0xa; *(uint16_t*)0x20000e4a = htobe16(0x4e21); *(uint32_t*)0x20000e4c = 3; *(uint8_t*)0x20000e50 = -1; *(uint8_t*)0x20000e51 = 1; *(uint8_t*)0x20000e52 = 0; *(uint8_t*)0x20000e53 = 0; *(uint8_t*)0x20000e54 = 0; *(uint8_t*)0x20000e55 = 0; *(uint8_t*)0x20000e56 = 0; *(uint8_t*)0x20000e57 = 0; *(uint8_t*)0x20000e58 = 0; *(uint8_t*)0x20000e59 = 0; *(uint8_t*)0x20000e5a = 0; *(uint8_t*)0x20000e5b = 0; *(uint8_t*)0x20000e5c = 0; *(uint8_t*)0x20000e5d = 0; *(uint8_t*)0x20000e5e = 0; *(uint8_t*)0x20000e5f = 1; *(uint32_t*)0x20000e60 = 0x3f; syscall(__NR_setsockopt, r[0], 0x29, 0x2c, 0x20000dc0, 0x108); break; case 7: *(uint32_t*)0x20000f00 = 8; *(uint16_t*)0x20000f08 = 0xa; *(uint16_t*)0x20000f0a = htobe16(0x4e22); *(uint32_t*)0x20000f0c = 0xd3; *(uint8_t*)0x20000f10 = 0xfe; *(uint8_t*)0x20000f11 = 0x80; *(uint8_t*)0x20000f12 = 0; *(uint8_t*)0x20000f13 = 0; *(uint8_t*)0x20000f14 = 0; *(uint8_t*)0x20000f15 = 0; *(uint8_t*)0x20000f16 = 0; *(uint8_t*)0x20000f17 = 0; *(uint8_t*)0x20000f18 = 0; *(uint8_t*)0x20000f19 = 0; *(uint8_t*)0x20000f1a = 0; *(uint8_t*)0x20000f1b = 0; *(uint8_t*)0x20000f1c = 0; *(uint8_t*)0x20000f1d = 0; *(uint8_t*)0x20000f1e = 0; *(uint8_t*)0x20000f1f = 0x14; *(uint32_t*)0x20000f20 = 0x80; *(uint16_t*)0x20000f88 = 0xa; *(uint16_t*)0x20000f8a = htobe16(0x4e22); *(uint32_t*)0x20000f8c = 0x4f3c; *(uint8_t*)0x20000f90 = -1; *(uint8_t*)0x20000f91 = 2; *(uint8_t*)0x20000f92 = 0; *(uint8_t*)0x20000f93 = 0; *(uint8_t*)0x20000f94 = 0; *(uint8_t*)0x20000f95 = 0; *(uint8_t*)0x20000f96 = 0; *(uint8_t*)0x20000f97 = 0; *(uint8_t*)0x20000f98 = 0; *(uint8_t*)0x20000f99 = 0; *(uint8_t*)0x20000f9a = 0; *(uint8_t*)0x20000f9b = 0; *(uint8_t*)0x20000f9c = 0; *(uint8_t*)0x20000f9d = 0; *(uint8_t*)0x20000f9e = 0; *(uint8_t*)0x20000f9f = 1; *(uint32_t*)0x20000fa0 = 0x81; syscall(__NR_setsockopt, r[0], 0x29, 0x2c, 0x20000f00, 0x108); break; } } int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); for (procid = 0; procid < 6; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }