// https://syzkaller.appspot.com/bug?id=13c7434436faf91b6cf112289188dcde8ff0f172 // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include __attribute__((noreturn)) static void doexit(int status) { volatile unsigned i; syscall(__NR_exit_group, status); for (i = 0;; i++) { } } #include #include const int kFailStatus = 67; const int kRetryStatus = 69; static void fail(const char* msg, ...) { int e = errno; va_list args; va_start(args, msg); vfprintf(stderr, msg, args); va_end(args); fprintf(stderr, " (errno %d)\n", e); doexit((e == ENOMEM || e == EAGAIN) ? kRetryStatus : kFailStatus); } static uint64_t current_time_ms() { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) fail("clock_gettime failed"); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } struct ipt_getinfo { char name[32]; unsigned int valid_hooks; unsigned int hook_entry[5]; unsigned int underflow[5]; unsigned int num_entries; unsigned int size; }; struct ipt_get_entries { char name[32]; unsigned int size; void* entrytable[1024 / sizeof(void*)]; }; struct xt_counters { uint64_t pcnt, bcnt; }; struct ipt_replace { char name[32]; unsigned int valid_hooks; unsigned int num_entries; unsigned int size; unsigned int hook_entry[5]; unsigned int underflow[5]; unsigned int num_counters; struct xt_counters* counters; char entrytable[1024]; }; struct ipt_table_desc { const char* name; struct ipt_getinfo info; struct ipt_get_entries entries; struct ipt_replace replace; struct xt_counters counters[10]; }; static struct ipt_table_desc ipv4_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "mangle"}, {.name = "raw"}, {.name = "security"}, }; #define IPT_BASE_CTL 64 #define IPT_SO_SET_REPLACE (IPT_BASE_CTL) #define IPT_SO_GET_INFO (IPT_BASE_CTL) #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1) static void checkpoint_net_namespace(void) { socklen_t optlen; unsigned i; int fd; fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) fail("socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)"); for (i = 0; i < sizeof(ipv4_tables) / sizeof(ipv4_tables[0]); i++) { struct ipt_table_desc* table = &ipv4_tables[i]; strcpy(table->info.name, table->name); strcpy(table->entries.name, table->name); strcpy(table->replace.name, table->name); optlen = sizeof(table->info); if (getsockopt(fd, SOL_IP, IPT_SO_GET_INFO, &table->info, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } fail("getsockopt(IPT_SO_GET_INFO)"); } if (table->info.size > sizeof(table->entries.entrytable)) fail("table size is too large: %u", table->info.size); if (table->info.num_entries > sizeof(table->counters) / sizeof(table->counters[0])) fail("too many counters: %u", table->info.num_entries); table->entries.size = table->info.size; optlen = sizeof(table->entries) - sizeof(table->entries.entrytable) + table->info.size; if (getsockopt(fd, SOL_IP, IPT_SO_GET_ENTRIES, &table->entries, &optlen)) fail("getsockopt(IPT_SO_GET_ENTRIES)"); table->replace.valid_hooks = table->info.valid_hooks; table->replace.num_entries = table->info.num_entries; table->replace.counters = table->counters; table->replace.size = table->info.size; memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); memcpy(table->replace.entrytable, table->entries.entrytable, table->info.size); } close(fd); } static void reset_net_namespace(void) { struct ipt_get_entries entries; struct ipt_getinfo info; socklen_t optlen; unsigned i; int fd; memset(&info, 0, sizeof(info)); memset(&entries, 0, sizeof(entries)); fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) fail("socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)"); for (i = 0; i < sizeof(ipv4_tables) / sizeof(ipv4_tables[0]); i++) { struct ipt_table_desc* table = &ipv4_tables[i]; if (table->info.valid_hooks == 0) continue; strcpy(info.name, table->name); optlen = sizeof(info); if (getsockopt(fd, SOL_IP, IPT_SO_GET_INFO, &info, &optlen)) fail("getsockopt(IPT_SO_GET_INFO)"); if (memcmp(&table->info, &info, sizeof(table->info)) == 0) { strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size; if (getsockopt(fd, SOL_IP, IPT_SO_GET_ENTRIES, &entries, &optlen)) fail("getsockopt(IPT_SO_GET_ENTRIES)"); if (memcmp(&table->entries, &entries, optlen) == 0) continue; } table->replace.num_counters = info.num_entries; optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; if (setsockopt(fd, SOL_IP, IPT_SO_SET_REPLACE, &table->replace, optlen)) fail("setsockopt(IPT_SO_SET_REPLACE)"); } close(fd); } static void test(); void loop() { int iter; checkpoint_net_namespace(); for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) fail("loop fork failed"); if (pid == 0) { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); test(); doexit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { int res = waitpid(-1, &status, __WALL | WNOHANG); if (res == pid) break; usleep(1000); if (current_time_ms() - start > 5 * 1000) { kill(-pid, SIGKILL); kill(pid, SIGKILL); while (waitpid(-1, &status, __WALL) != pid) { } break; } } reset_net_namespace(); } } struct thread_t { int created, running, call; pthread_t th; }; 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 (;;) { while (!__atomic_load_n(&th->running, __ATOMIC_ACQUIRE)) syscall(SYS_futex, &th->running, FUTEX_WAIT, 0, 0); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); __atomic_store_n(&th->running, 0, __ATOMIC_RELEASE); syscall(SYS_futex, &th->running, FUTEX_WAKE); } return 0; } static void execute(int num_calls) { int call, thread; running = 0; for (call = 0; call < num_calls; call++) { for (thread = 0; thread < sizeof(threads) / sizeof(threads[0]); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); pthread_create(&th->th, &attr, thr, th); } if (!__atomic_load_n(&th->running, __ATOMIC_ACQUIRE)) { th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); __atomic_store_n(&th->running, 1, __ATOMIC_RELEASE); syscall(SYS_futex, &th->running, FUTEX_WAKE); struct timespec ts; ts.tv_sec = 0; ts.tv_nsec = 20 * 1000 * 1000; syscall(SYS_futex, &th->running, FUTEX_WAIT, 1, &ts); if (running) usleep((call == num_calls - 1) ? 10000 : 1000); break; } } } } long r[2]; void execute_call(int call) { switch (call) { case 0: syscall(__NR_mmap, 0x20000000, 0xfff000, 3, 0x32, -1, 0); break; case 1: memcpy( (void*)0x20eb9c00, "\xf4\x68\x85\xcc\xbe\x4d\xbb\x5b\xe3\x03\x18\x67\xca\xb6\xe5\xf5\x6d" "\x2a\xe7\xe8\x89\x4d\xe9\x64\x19\x3d\xaa\x45\x87\xd3\x85\xd1\x43\x2b" "\x45\xab\x6f\xae\x08\x1c\x6b\xa9\x1e\xfc\x67\xfd\x23\x2a\xa6\x6b\x24" "\x09\xce\xfd\xd9\xf2\x3a\x3b\x52\xd4\xe1\x21\x59\x35\x11\x41\xb0\xeb" "\x00\x45\x25\xf7\x99\xd2\x00\xb9\xb8\xb8\x9a\x5b\x25\x30\xfb\x34\xfd" "\xc0\xd9\x49\x03\xd9\x8c\x68\xe6\x72\xff\x17\x6a\xb4\xf5\x5f\x11\x30" "\x73\x7b\xfb\x1b\x6e\xbf\xc2\xb7\x2e\x18\x3d\xf0\x3d\x93\xe5\x69\xfe" "\xad\x50\x2f\x71\xf8\x46\xd7\x29\x04\x68\x72\x1e\xb8\x89\x61\xfe\x5a" "\x38\xb6\xe8\xa4\x99\xc5\x46\xac\x88\xbe\x18\x4c\x77\xdf\x82\x1a\xb9" "\x23\xa4\x76\x4b\xc5\xa7\x76\xd1\x32\x51\xa2\x68\x13\xfc\xc2\xc1\xe7" "\xc2\x75\x8a\x90\x35\xc4\x88\x1d\x98\xbb\xaa\xd7\x8b\xd8\xb1\x1c\xb1" "\x2a\x35\x9a\x6e\x33\xa1\xa2\x1c\x0f\x0c\xbd\x29\x25\x65\x8c\xaf\xc7" "\x11\x10\x60\x38\xec\xeb\x8d\x71\x2a\x5f\xe3\x96\x89\x9b\x52\xa6\x35" "\x9c\x2c\xaa\x6b\xb0\xae\x37\x82\x99\x42\x00\x7f\x15\x9c\xd8\x51\xa2" "\x79\x2c\x97\xd5\x30\x68\x14\xe4\x77\x99\x67\xb4\x64\x61\x3c\x30\xc9" "\xd9\x5b\x99\x85\x84\xf8\x54\xf3\x7e\x5e\x89\x06\xac\x62\xe1\x56\x02" "\xad\xa5\xaf\xdd\xec\xbd\x22\x23\xa5\xba\x87\x6e\xed\x11\xaa\xf2\xcd" "\x37\x93\x21\x4b\x4e\x14\x8a\x53\x25\xc8\xe5\x08\x99\xe9\xb8\x4e\x7a" "\x75\x81\x20\xf7\x8b\x03\xc5\x18\xcc\x19\xe2\xf6\x6b\xfe\xc7\x7c\x50" "\x3f\x2a\x82\x3d\x6b\xfa\x2f\x99\x8a\xad\xd2\x80\xf2\x92\x2b\x33\x54" "\xe5\xb4\xca\x28\x08\x93\x32\xd9\x0f\x9f\x72\x14\x9e\x4d\xac\x7a\xc5" "\x61\xf0\xea\x83\x4f\xd3\x01\xcf\x83\x63\x84\x3d\xe6\xa6\xe8\xfa\xc8" "\xfa\xcf\xf4\x38\xc9\xfe\xdf\x62\x32\xce\xec\x01\xe1\x21\x8f\x74\x9e" "\x0e\x54\xa9\x03\x60\x45\xe8\x5d\x32\x71\x2f\x3f\x32\x3a\xa6\x39\xde" "\xee\xf9\x9b\x3b\x9a\x02\x50\x1d\x35\x89\xa1\x02\x1c\xb1\xd0\x29\x23" "\xfa\xa8\x73\x91\xee\x86\xf6\x08\x2e\x1b\xc2\x2d\xa6\x17\x4c\x6a\x0f" "\x07\x2c\xa3\xcc\x7d\xcb\x06\x2c\x4a\xad\x87\x91\x9f\xe3\x24\x16\xa9" "\xac\xe7\xff\xdd\x3d\xaa\x95\xf5\x75\x91\xa0\x80\x5f\x70\x6d\x32\x2a" "\x0e\x6c\x31\xfd\x2d\x29\x01\x09\x3c\x81\xc9\xb0\x7e\x73\xf2\xb8\xca" "\x9c\x4f\x83\x70\xda\x6a\x26\x9c\x08\x16\xd3\x80\xa4\xec\xda\xb0\x9e" "\xe8\x16\x11\xc6\x41\xb8\xdd\xa2\xcf\x45\xec\xcb\x41\x92\xd1\x61\xf6" "\xdf\xb3\xc3\x10\x46\x6f\xe8\xc8\x64\x62\x94\xd6\xaf\x6f\xe6\x2f\x5c" "\x75\xef\xcf\xfe\x8e\x53\x97\x04\x18\xfe\x93\xb2\xd7\x01\xb0\x93\xa3" "\x0c\x1e\x1f\x9a\x12\xf7\x9a\x27\xb4\x7d\xd3\xa5\xb8\xf0\x57\x1d\xf0" "\xa3\x18\x4e\x3b\x3e\x9f\x2e\x4b\x9b\xa9\x3f\xed\x10\x1b\x6b\x15\xc6" "\x66\x2d\x90\x10\xdd\x82\x5b\xa9\x46\x24\x32\xaa\x75\x5a\x18\xf8\xf2" "\xa2\xa0\x0f\xae\x2b\x20\xfb\xfd\x90\xf5\x95\xdf\x3e\x86\x36\x35\xc7" "\xae\xc6\x09\x28\x2e\x95\x5a\xd4\x55\x54\xa7\xb0\x83\x91\x15\x96\x02" "\xe4\x66\x78\x13\x34\x31\xfb\x02\x8d\xd9\x3a\x11\x0a\xb0\x1f\x69\x66" "\xd8\x49\xa6\x7e\xe5\x81\x9f\x1d\x6e\x74\x22\x1b\x3f\x77\x5f\x9e\xd2" "\xb1\xee\xb3\x54\xf3\x35\x5e\x76\x4d\x31\xbd\x9f\xc2\xf5\xfb\xd3\x03" "\xaf\x63\x8e\xe6\x91\x06\xf1\xab\xfd\x8d\x2d\xf3\xa0\x22\x12\x68\xd9" "\xcf\xca\xe4\xd1\xe5\xba\xbc\x43\xbf\x2f\x17\x85\x3f\xf0\x12\x95\x0e" "\xf0\x84\x11\x03\x46\xaf\xc8\x4d\x7f\xd7\x90\xfb\xb9\x15\x58\x11\xcb" "\xef\x55\x19\xb9\xbb\x45\x75\x79\xe8\xbe\x9c\x82\xd4\x23\xea\x3d\x7d" "\x71\x12\x21\xb6\xc2\x7d\xd3\x39\x99\xcb\xd8\xba\x42\x1a\x77\x6a\xe5" "\x63\x71\x34\xaa\x81\xeb\x90\x69\x7b\x81\x61\x9d\xf5\x76\x2d\x40\x94" "\x97\x82\xcf\xd2\x1c\x03\x98\x0e\x2d\xf1\x11\x5c\xe8\xbf\xcf\x1e\x1b" "\x47\x03\x61\xf9\x5d\x72\xea\x20\xa0\x6b\xa4\xc9\x4f\x04\xab\x1c\x43" "\x52\x43\xa0\xb9\xdd\x12\x77\xaf\xc4\x8d\xce\x76\x1e\xe5\x88\x2c\x4d" "\x58\xb8\xfc\xc6\xd5\xa6\x53\x92\xad\xd7\xd9\x08\xc7\x6c\xb5\xf0\x99" "\xbf\xbb\x21\x0f\x6e\x67\x89\x07\x0c\x28\x7b\x35\x57\x1a\x09\xf6\xe5" "\xaf\xc4\xc3\xb5\x68\xb3\x8e\xe9\x0f\x3a\xe8\x62\x17\xd2\xa7\x81\x84" "\xdc\x39\x19\x2f\xf0\x13\x9e\xf4\xbd\x0e\xa3\x21\x25\x05\xb1\x0d\x22" "\x05\xaa\x7f\x45\x2c\x17\x28\x67\x01\x55\x55\x8a\x50\x34\x33\x5c\xd4" "\x61\x07\xe2\x31\x2c\xb7\x01\x92\xb0\x99\xa8\x77\x00\xf4\x42\x88\xa6" "\x66\xe4\xc8\xc3\xf3\x65\x4a\xfd\xc4\xf9\xab\x82\x00\xb2\xe0\x7e\x23" "\xd6\xb1\x33\x11\x4a\x15\x44\xd7\x52\xe6\x88\xf5\xed\x6f\x16\x4b\x31" "\xd7\xae\x2d\x16\xa0\xd2\xbc\x9d\x65\x4f\xa3\xb5\x94\x93\x9a\x16\xf5" "\x54\xd9\xe1\x44\x75\x76\xee\xfb\x87\x25\x11\x6e\xe9\xb3\xb1\x93\xac" "\xce\x3f\x72\x4f", 1024); syscall(__NR_ioctl, -1, 0x4400ae8f, 0x20eb9c00); break; case 2: r[0] = syscall(__NR_socket, 2, 1, 0); break; case 3: *(uint32_t*)0x20de2ff4 = htobe32(0xe0000002); *(uint32_t*)0x20de2ff8 = htobe32(0x7f000001); *(uint32_t*)0x20de2ffc = 0; syscall(__NR_setsockopt, r[0], 0, 0x27, 0x20de2ff4, 0xc); break; case 4: r[1] = syscall(__NR_socket, 2, 0x80001, 0); break; case 5: memcpy((void*)0x20777825, "\x66\x69\x6c\x74\x65\x72\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", 32); *(uint32_t*)0x20777845 = 0xe; *(uint32_t*)0x20777849 = 4; *(uint32_t*)0x2077784d = 0x280; *(uint32_t*)0x20777851 = -1; *(uint32_t*)0x20777855 = 0; *(uint32_t*)0x20777859 = 0; *(uint32_t*)0x2077785d = 0; *(uint32_t*)0x20777861 = -1; *(uint32_t*)0x20777865 = -1; *(uint32_t*)0x20777869 = 0; *(uint32_t*)0x2077786d = 0; *(uint32_t*)0x20777871 = 0; *(uint32_t*)0x20777875 = -1; *(uint32_t*)0x20777879 = 4; *(uint64_t*)0x2077787d = 0x20012fc0; *(uint8_t*)0x20777885 = 0; *(uint8_t*)0x20777886 = 0; *(uint8_t*)0x20777887 = 0; *(uint8_t*)0x20777888 = 0; *(uint8_t*)0x20777889 = 0; *(uint8_t*)0x2077788a = 0; *(uint8_t*)0x2077788b = 0; *(uint8_t*)0x2077788c = 0; *(uint8_t*)0x2077788d = 0; *(uint8_t*)0x2077788e = 0; *(uint8_t*)0x2077788f = 0; *(uint8_t*)0x20777890 = 0; *(uint8_t*)0x20777891 = 0; *(uint8_t*)0x20777892 = 0; *(uint8_t*)0x20777893 = 0; *(uint8_t*)0x20777894 = 0; *(uint8_t*)0x20777895 = 0; *(uint8_t*)0x20777896 = 0; *(uint8_t*)0x20777897 = 0; *(uint8_t*)0x20777898 = 0; *(uint8_t*)0x20777899 = 0; *(uint8_t*)0x2077789a = 0; *(uint8_t*)0x2077789b = 0; *(uint8_t*)0x2077789c = 0; *(uint8_t*)0x2077789d = 0; *(uint8_t*)0x2077789e = 0; *(uint8_t*)0x2077789f = 0; *(uint8_t*)0x207778a0 = 0; *(uint8_t*)0x207778a1 = 0; *(uint8_t*)0x207778a2 = 0; *(uint8_t*)0x207778a3 = 0; *(uint8_t*)0x207778a4 = 0; *(uint8_t*)0x207778a5 = 0; *(uint8_t*)0x207778a6 = 0; *(uint8_t*)0x207778a7 = 0; *(uint8_t*)0x207778a8 = 0; *(uint8_t*)0x207778a9 = 0; *(uint8_t*)0x207778aa = 0; *(uint8_t*)0x207778ab = 0; *(uint8_t*)0x207778ac = 0; *(uint8_t*)0x207778ad = 0; *(uint8_t*)0x207778ae = 0; *(uint8_t*)0x207778af = 0; *(uint8_t*)0x207778b0 = 0; *(uint8_t*)0x207778b1 = 0; *(uint8_t*)0x207778b2 = 0; *(uint8_t*)0x207778b3 = 0; *(uint8_t*)0x207778b4 = 0; *(uint8_t*)0x207778b5 = 0; *(uint8_t*)0x207778b6 = 0; *(uint8_t*)0x207778b7 = 0; *(uint8_t*)0x207778b8 = 0; *(uint8_t*)0x207778b9 = 0; *(uint8_t*)0x207778ba = 0; *(uint8_t*)0x207778bb = 0; *(uint8_t*)0x207778bc = 0; *(uint8_t*)0x207778bd = 0; *(uint8_t*)0x207778be = 0; *(uint8_t*)0x207778bf = 0; *(uint8_t*)0x207778c0 = 0; *(uint8_t*)0x207778c1 = 0; *(uint8_t*)0x207778c2 = 0; *(uint8_t*)0x207778c3 = 0; *(uint8_t*)0x207778c4 = 0; *(uint8_t*)0x207778c5 = 0; *(uint8_t*)0x207778c6 = 0; *(uint8_t*)0x207778c7 = 0; *(uint8_t*)0x207778c8 = 0; *(uint8_t*)0x207778c9 = 0; *(uint8_t*)0x207778ca = 0; *(uint8_t*)0x207778cb = 0; *(uint8_t*)0x207778cc = 0; *(uint8_t*)0x207778cd = 0; *(uint8_t*)0x207778ce = 0; *(uint8_t*)0x207778cf = 0; *(uint8_t*)0x207778d0 = 0; *(uint8_t*)0x207778d1 = 0; *(uint8_t*)0x207778d2 = 0; *(uint8_t*)0x207778d3 = 0; *(uint8_t*)0x207778d4 = 0; *(uint8_t*)0x207778d5 = 0; *(uint8_t*)0x207778d6 = 0; *(uint8_t*)0x207778d7 = 0; *(uint8_t*)0x207778d8 = 0; *(uint32_t*)0x207778d9 = 0; *(uint16_t*)0x207778dd = 0x70; *(uint16_t*)0x207778df = 0x98; *(uint32_t*)0x207778e1 = 0; *(uint64_t*)0x207778e5 = 0; *(uint64_t*)0x207778ed = 0; *(uint16_t*)0x207778f5 = 0x28; memcpy((void*)0x207778f7, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00", 29); *(uint8_t*)0x20777914 = 0; *(uint32_t*)0x20777915 = 0xfffffffe; *(uint32_t*)0x2077791d = htobe32(0x7f000001); *(uint32_t*)0x20777921 = htobe32(-1); *(uint32_t*)0x20777925 = htobe32(0); *(uint32_t*)0x20777929 = htobe32(0); memcpy((void*)0x2077792d, "\x69\x70\x36\x5f\x76\x74\x69\x30\x00\x00\x00\x00\x00\x00\x00\x00", 16); *(uint8_t*)0x2077793d = 0x73; *(uint8_t*)0x2077793e = 0x79; *(uint8_t*)0x2077793f = 0x7a; *(uint8_t*)0x20777940 = 0; *(uint8_t*)0x20777941 = 0; *(uint8_t*)0x2077794d = 0; *(uint8_t*)0x2077794e = 0; *(uint8_t*)0x2077794f = 0; *(uint8_t*)0x20777950 = 0; *(uint8_t*)0x20777951 = 0; *(uint8_t*)0x20777952 = 0; *(uint8_t*)0x20777953 = 0; *(uint8_t*)0x20777954 = 0; *(uint8_t*)0x20777955 = 0; *(uint8_t*)0x20777956 = 0; *(uint8_t*)0x20777957 = 0; *(uint8_t*)0x20777958 = 0; *(uint8_t*)0x20777959 = 0; *(uint8_t*)0x2077795a = 0; *(uint8_t*)0x2077795b = 0; *(uint8_t*)0x2077795c = 0; *(uint8_t*)0x2077795d = 0; *(uint8_t*)0x2077795e = 0; *(uint8_t*)0x2077795f = 0; *(uint8_t*)0x20777960 = 0; *(uint8_t*)0x20777961 = 0; *(uint8_t*)0x20777962 = 0; *(uint8_t*)0x20777963 = 0; *(uint8_t*)0x20777964 = 0; *(uint8_t*)0x20777965 = 0; *(uint8_t*)0x20777966 = 0; *(uint8_t*)0x20777967 = 0; *(uint8_t*)0x20777968 = 0; *(uint8_t*)0x20777969 = 0; *(uint8_t*)0x2077796a = 0; *(uint8_t*)0x2077796b = 0; *(uint8_t*)0x2077796c = 0; *(uint16_t*)0x2077796d = 0; *(uint8_t*)0x2077796f = 0; *(uint8_t*)0x20777970 = 0; *(uint32_t*)0x20777971 = 0; *(uint16_t*)0x20777975 = 0x70; *(uint16_t*)0x20777977 = 0x98; *(uint32_t*)0x20777979 = 0; *(uint64_t*)0x2077797d = 0; *(uint64_t*)0x20777985 = 0; *(uint16_t*)0x2077798d = 0x28; memcpy((void*)0x2077798f, "\x52\x45\x4a\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\x00", 29); *(uint8_t*)0x207779ac = 0; *(uint32_t*)0x207779ad = 0; *(uint8_t*)0x207779b5 = 0xac; *(uint8_t*)0x207779b6 = 0x14; *(uint8_t*)0x207779b7 = 0; *(uint8_t*)0x207779b8 = 0; *(uint32_t*)0x207779b9 = htobe32(0xe0000001); *(uint32_t*)0x207779bd = htobe32(0); *(uint32_t*)0x207779c1 = htobe32(0); memcpy((void*)0x207779c5, "\x6b\xd6\xd4\x48\x45\x73\x6f\x88\x9e\xc1\xcf\x4c\x41\xf2\xaf\xfa", 16); *(uint8_t*)0x207779d5 = 0x73; *(uint8_t*)0x207779d6 = 0x79; *(uint8_t*)0x207779d7 = 0x7a; *(uint8_t*)0x207779d8 = 0; *(uint8_t*)0x207779d9 = 0; *(uint8_t*)0x207779e5 = 0; *(uint8_t*)0x207779e6 = 0; *(uint8_t*)0x207779e7 = 0; *(uint8_t*)0x207779e8 = 0; *(uint8_t*)0x207779e9 = 0; *(uint8_t*)0x207779ea = 0; *(uint8_t*)0x207779eb = 0; *(uint8_t*)0x207779ec = 0; *(uint8_t*)0x207779ed = 0; *(uint8_t*)0x207779ee = 0; *(uint8_t*)0x207779ef = 0; *(uint8_t*)0x207779f0 = 0; *(uint8_t*)0x207779f1 = 0; *(uint8_t*)0x207779f2 = 0; *(uint8_t*)0x207779f3 = 0; *(uint8_t*)0x207779f4 = 0; *(uint8_t*)0x207779f5 = 0; *(uint8_t*)0x207779f6 = 0; *(uint8_t*)0x207779f7 = 0; *(uint8_t*)0x207779f8 = 0; *(uint8_t*)0x207779f9 = 0; *(uint8_t*)0x207779fa = 0; *(uint8_t*)0x207779fb = 0; *(uint8_t*)0x207779fc = 0; *(uint8_t*)0x207779fd = 0; *(uint8_t*)0x207779fe = 0; *(uint8_t*)0x207779ff = 0; *(uint8_t*)0x20777a00 = 0; *(uint8_t*)0x20777a01 = 0; *(uint8_t*)0x20777a02 = 0; *(uint8_t*)0x20777a03 = 0; *(uint8_t*)0x20777a04 = 0; *(uint16_t*)0x20777a05 = 0; *(uint8_t*)0x20777a07 = 0; *(uint8_t*)0x20777a08 = 0; *(uint32_t*)0x20777a09 = 0; *(uint16_t*)0x20777a0d = 0x70; *(uint16_t*)0x20777a0f = 0xb8; *(uint32_t*)0x20777a11 = 0; *(uint64_t*)0x20777a15 = 0; *(uint64_t*)0x20777a1d = 0; *(uint16_t*)0x20777a25 = 0x48; memcpy((void*)0x20777a27, "\x54\x45\x45\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00", 29); *(uint8_t*)0x20777a44 = 1; *(uint8_t*)0x20777a45 = 0xfe; *(uint8_t*)0x20777a46 = 0x80; *(uint8_t*)0x20777a47 = 0; *(uint8_t*)0x20777a48 = 0; *(uint8_t*)0x20777a49 = 0; *(uint8_t*)0x20777a4a = 0; *(uint8_t*)0x20777a4b = 0; *(uint8_t*)0x20777a4c = 0; *(uint8_t*)0x20777a4d = 0; *(uint8_t*)0x20777a4e = 0; *(uint8_t*)0x20777a4f = 0; *(uint8_t*)0x20777a50 = 0; *(uint8_t*)0x20777a51 = 0; *(uint8_t*)0x20777a52 = 0; *(uint8_t*)0x20777a53 = 0; *(uint8_t*)0x20777a54 = 0; *(uint8_t*)0x20777a55 = 0x73; *(uint8_t*)0x20777a56 = 0x79; *(uint8_t*)0x20777a57 = 0x7a; *(uint8_t*)0x20777a58 = 0; *(uint8_t*)0x20777a59 = 0; *(uint64_t*)0x20777a65 = 0; *(uint32_t*)0x20777a6d = htobe32(0xe0000002); *(uint32_t*)0x20777a71 = htobe32(0x7f000001); *(uint32_t*)0x20777a75 = htobe32(0); *(uint32_t*)0x20777a79 = htobe32(0); memcpy((void*)0x20777a7d, "\x69\x66\x62\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16); *(uint8_t*)0x20777a8d = 0x73; *(uint8_t*)0x20777a8e = 0x79; *(uint8_t*)0x20777a8f = 0x7a; *(uint8_t*)0x20777a90 = 0; *(uint8_t*)0x20777a91 = 0; *(uint8_t*)0x20777a9d = 0; *(uint8_t*)0x20777a9e = 0; *(uint8_t*)0x20777a9f = 0; *(uint8_t*)0x20777aa0 = 0; *(uint8_t*)0x20777aa1 = 0; *(uint8_t*)0x20777aa2 = 0; *(uint8_t*)0x20777aa3 = 0; *(uint8_t*)0x20777aa4 = 0; *(uint8_t*)0x20777aa5 = 0; *(uint8_t*)0x20777aa6 = 0; *(uint8_t*)0x20777aa7 = 0; *(uint8_t*)0x20777aa8 = 0; *(uint8_t*)0x20777aa9 = 0; *(uint8_t*)0x20777aaa = 0; *(uint8_t*)0x20777aab = 0; *(uint8_t*)0x20777aac = 0; *(uint8_t*)0x20777aad = 0; *(uint8_t*)0x20777aae = 0; *(uint8_t*)0x20777aaf = 0; *(uint8_t*)0x20777ab0 = 0; *(uint8_t*)0x20777ab1 = 0; *(uint8_t*)0x20777ab2 = 0; *(uint8_t*)0x20777ab3 = 0; *(uint8_t*)0x20777ab4 = 0; *(uint8_t*)0x20777ab5 = 0; *(uint8_t*)0x20777ab6 = 0; *(uint8_t*)0x20777ab7 = 0; *(uint8_t*)0x20777ab8 = 0; *(uint8_t*)0x20777ab9 = 0; *(uint8_t*)0x20777aba = 0; *(uint8_t*)0x20777abb = 0; *(uint8_t*)0x20777abc = 0; *(uint16_t*)0x20777abd = 0; *(uint8_t*)0x20777abf = 0; *(uint8_t*)0x20777ac0 = 0; *(uint32_t*)0x20777ac1 = 0; *(uint16_t*)0x20777ac5 = 0x70; *(uint16_t*)0x20777ac7 = 0x98; *(uint32_t*)0x20777ac9 = 0; *(uint64_t*)0x20777acd = 0; *(uint64_t*)0x20777ad5 = 0; *(uint16_t*)0x20777add = 0x28; memcpy((void*)0x20777adf, "\x52\x45\x4a\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\x00", 29); *(uint8_t*)0x20777afc = 0; *(uint32_t*)0x20777afd = 0; *(uint64_t*)0x20012fc0 = 0; *(uint64_t*)0x20012fc8 = 0; *(uint64_t*)0x20012fd0 = 0; *(uint64_t*)0x20012fd8 = 0; *(uint64_t*)0x20012fe0 = 0; *(uint64_t*)0x20012fe8 = 0; *(uint64_t*)0x20012ff0 = 0; *(uint64_t*)0x20012ff8 = 0; syscall(__NR_setsockopt, r[1], 0, 0x40, 0x20777825, 0x2e0); break; case 6: *(uint16_t*)0x20fa4ff0 = 2; *(uint16_t*)0x20fa4ff2 = htobe16(0x4e21); *(uint32_t*)0x20fa4ff4 = htobe32(-1); *(uint8_t*)0x20fa4ff8 = 0; *(uint8_t*)0x20fa4ff9 = 0; *(uint8_t*)0x20fa4ffa = 0; *(uint8_t*)0x20fa4ffb = 0; *(uint8_t*)0x20fa4ffc = 0; *(uint8_t*)0x20fa4ffd = 0; *(uint8_t*)0x20fa4ffe = 0; *(uint8_t*)0x20fa4fff = 0; syscall(__NR_connect, -1, 0x20fa4ff0, 0x10); break; } } void test() { memset(r, -1, sizeof(r)); execute(7); } int main() { for (;;) { loop(); } }