// https://syzkaller.appspot.com/bug?id=00b8bd6553d3f0e1d42566841a6d6346ffbecdaf // 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 #include #include 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 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); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } 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, 1000000); } 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_ACQUIRE)) return 1; now = current_time_ms(); if (now - start > timeout) return 0; } } 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"); } 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) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } 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, 50); 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 = 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[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: *(uint64_t*)0x20000180 = 0; *(uint32_t*)0x20000188 = 0; *(uint64_t*)0x20000190 = 0x20000000; *(uint64_t*)0x20000000 = 0; *(uint64_t*)0x20000008 = 0; *(uint64_t*)0x20000010 = 0x20000580; memcpy( (void*)0x20000580, "\xd4\xfa\x0c\x51\x1a\xad\x03\xaa\x5e\xd2\x17\x67\x7b\xc4\x1c\x02\x7d" "\x9c\x83\x0c\x43\x9c\x7f\x82\x1d\xdd\x78\xb6\x91\x5c\xb1\x70\xe7\x60" "\x3a\xcf\x9e\x43\x3c\x29\x03\xbb\x67\x73\xf4\xb0\x13\x06\x68\xa1\xe5" "\xb5\xe0\x8d\x21\xd0\xb6\x9c\x28\xca\x34\x55\xae\xd6\x58\x55\xc8\x6f" "\x3d\x1e\x57\x89\xd2\x63\x75\xa0\xd8\x5e\xaf\x5e\x92\xe1\x9c\x9a\xff" "\xcf\x76\xe7\xa9\x4e\x76\x55\x6d\x2b\x10\x4e\xbf\x64\x57\x47\xfa\xdc" "\x91\x46\x0f\x4b\x3c\x94\xe1\xa8\x9b\x51\xbe\x4a\x6a\xa4\xc6\x52\x85" "\xf9\x88\x32\x9a\x81\x63\xb6\x9c\x51\xb8\x01\x50\x0a\x5b\xac\xd0\x46" "\x39\x76\xe2\x96\x0e\x26\x79\xef\x2f\xee\xe5\xe6\xce\x6b\xb7\x8a\x51" "\xfb\x0e\x15\x82\x0d\x13\xe4\xa5\xaa\x9e\x07\x42\xa6\xf8\xd6\x77\xad" "\x28\xfe\xa3\x56\x65\x7b\xb5\x50\xc8\x31\x1b\x68\x2d\x90\x03\xc8\x22" "\x67\xa1\x5a\xa7\x33\x4b\xc5\x3b\x65\xb9\x11\x9a\x1a\x7d\x90\x5c\x7d" "\xd3\x65\xb8\x5c\x23\x0b\xba\xd0\xd5\xd0\xa7\x98\x19\xe1\x12\x63\x78" "\x19\xd9\xa1\x87\xcf\xdf\x78\x2c\x61\x27\xd2\xd4\x28\x19\x26\xab\x0e" "\x22\xf7\x34\x6b\x61\x6f\xe2\x8e\xd0\xb9\xf4\xa0\xc9\xfd\xac\x6d\x3a" "\x90\xa9\xc3\x8b\x5e\x31\x44\x8a\x45\x54\x63\x88\xc9\x50\x45\xbc\x22" "\xfe\x88\xc4\x3b\x82\xa0\xa5\xd3\xeb\x61\xc2\x38\xa5\x15\x9e\xa9\x8d" "\xb9\xc0\x0a\xee\xf6\x44\xae\x98\xa8\xcb\x8d\xff\xff\x3b\x7b\xa1\x4d" "\x79\x71\x91\x0b\x55\x96\x23\xaf\x82\x95", 316); *(uint64_t*)0x20000018 = 0x13c; *(uint64_t*)0x20000198 = 2; *(uint64_t*)0x200001a0 = 0; *(uint64_t*)0x200001a8 = 0; *(uint32_t*)0x200001b0 = 0; syscall(__NR_sendmsg, /*fd=*/-1, /*msg=*/0x20000180ul, /*f=*/0ul); break; case 1: res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/0x10); if (res != -1) r[0] = res; break; case 2: memcpy((void*)0x20000000, "wlan1\000\000\000\000\000\000\000\000\000\000\000", 16); syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x8b18, /*arg=*/0x20000000ul); break; case 3: memcpy((void*)0x20000040, "memory.events\000", 14); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul, /*flags=*/0x275aul, /*mode=*/0ul); if (res != -1) r[1] = res; break; case 4: *(uint32_t*)0x20001980 = 8; memcpy( (void*)0x20001984, "\x85\xf0\x80\x88\x4e\x14\x2b\x26\x6e\x07\xe7\x99\xaa\x0c\xc4\x21\x38" "\x82\x42\xdf\x2a\x3c\x6b\x63\x1b\x65\xb1\xc0\x61\xed\xd2\xaa\x10\x8c" "\x35\x28\xfe\x9b\x0b\xb3\xa5\x3a\xb1\x20\x0f\x5d\x01\xa6\x8a\x4a\xcd" "\xec\x8f\xee\x09\x64\x82\x22\xf9\x08\xc1\xfe\xdc\x30\x00\x34\x2e\x61" "\x39\xde\x28\x36\x6c\x13\x50\x93\x06\xd0\x0e\xbc\xc6\x74\x97\x18\x1a" "\xc9\x16\xdb\x98\xaf\x9d\x36\x6b\x76\xe4\x27\xd9\xab\x5b\xb6\x80\x95" "\xf0\xfb\x24\x6d\xf3\x2b\x8a\xf0\x78\x36\x53\x13\x6f\x8a\x04\xc0\x36" "\x90\x31\x21\x25\xc7\xde\xd6\xa2\x4f\xda\x86\x85\x34\x0c\x57\x5e\xad" "\x69\x51\x9e\x35\x83\xf8\x9d\x46\x7e\xc2\x32\xd6\xa1\xff\xd0\x46\x3b" "\xa4\xea\x3c\xba\xe5\xda\xe6\x65\x4b\x55\x47\xb5\x45\x8f\x02\xac\x30" "\x77\x29\xe5\x7b\x09\xe1\x34\xf6\x8b\xe4\x4f\x88\xd7\x25\x17\xb2\x30" "\xb0\x66\xf6\x31\x5b\x5f\xb8\x02\x06\x39\x7b\xbf\xf8\xcb\xc2\xa3\x6e" "\x01\xc2\xe7\xb3\xaa\xdb\x32\xbd\x3d\xd5\x28\x8a\x69\xa9\x91\xd9\xc6" "\x74\x71\x7e\x3a\xbb\xa7\x16\x72\x80\xb2\xdb\x3b\x1b\x85\x02\xaf\xa4" "\xf3\xf2\x96\xc5\x32\x51\x0c\x9d\x2d\xd7\x9b\xb5\xee\xb2\x5a\xdb\x5e" "\xdd\xdb\xdd\x06\x9c\x09\xd1\x4d\x15\xc2\xe7\xe1\xe2\xbd\x6c\x10\x8f" "\xab\x35\x91\xbb\x22\xe9\x7d\x69\x92\x23\x6d\x22\x73\xc8\xbb\x95\x53" "\x6f\x71\x18\xd0\x07\x96\x50\x08\xb1\x25\xc7\xda\xac\x28\x14\xe6\xbb" "\xe1\xad\xbf\xa3\x57\x2a\xd0\xb7\xad\x5c\x26\xc8\x01\x41\x18\xd8\x37" "\x4c\xa9\xf2\x85\x77\x9d\xfe\xe7\x71\x5a\x40\x39\x08\x14\x6a\x74\xde" "\x61\xb3\x85\x39\x14\xc8\x9f\x44\x4c\x12\xe7\xa3\x8b\xdd\x46\xc4\xed" "\x36\xeb\x80\x6e\xa5\x98\xf4\x4d\x1d\xec\x9e\xff\x9e\x24\x76\xf4\x38" "\x02\x21\x1f\x07\x62\xb6\x66\x73\xb4\x5d\x23\x6b\x23\x91\xce\x32\x2e" "\x30\xfb\x9c\x69\xfe\x0d\x51\x4d\xc1\xf8\xb6\xe3\x97\x9c\x12\x05\xfd" "\x52\x24\xb0\x7d\x18\xa4\x4f\xec\x4f\x6f\x1a\x6f\x65\x15\x8b\xb6\x9e" "\x6f\x40\x48\xf2\xdd\x7d\xea\x10\x7f\x59\xd7\xe0\x3c\x61\xfe\x58\x22" "\x29\x2e\x45\x96\x89\x56\xb9\x31\xbd\xc4\xd6\x44\x5f\xf1\x63\x1e\x0b" "\x98\xe4\xb4\x44\x87\x74\xdd\x4b\x9c\xd5\x3a\x45\x89\x6f\xdb\x3f\x03" "\x70\x27\x78\x68\x1a\xe2\xb4\x5a\x25\xbf\x9a\x23\xfc\x02\xfb\x97\xa6" "\x30\xf1\x32\xbf\x9d\xef\x6c\x6d\x4a\x7b\xae\xb6\x29\x72\xf1\xa8\x14" "\xf6\xf2\x37\x7b\xcf\xc7\x8e\x2e\x86\x36\x8c\x13\x85\x10\xa0\x4c\xed" "\xf7\x17\x5a\xf8\xc2\x03\x4f\xae\x74\x13\xe3\xac\xe8\xc7\x1a\xb9\xa0" "\xaf\x1c\xa7\x04\x20\x11\xa6\xed\x02\x8e\x20\x56\x48\x53\x5d\xab\xf3" "\xb2\xf8\x51\x96\xae\x18\xd3\x6b\x83\x9e\x3c\xd5\x4a\xe4\x93\x3a\xd5" "\x29\x88\x8f\xda\xc7\xbb\x8a\x70\xc7\x2b\xc0\xfc\x81\xba\x06\x50\x6f" "\x2d\x5b\xc7\x68\x6e\x21\x9b\xbe\x52\x83\x95\x9c\xbe\xf9\x95\x0e\x07" "\x1c\xb6\xd9\xf3\x41\xfc\x62\x4a\x51\x10\x34\x1f\x26\xce\xbd\x71\x00" "\x59\x9a\x06\xe6\x1f\x66\xfa\xe1\x20\xc7\xfc\x2b\x34\xc6\x22\x12\x00" "\xeb\xa7\x5b\xd1\x27\x71\x14\x67\x1a\x3f\xa8\xf0\x58\xb2\x7f\xd8\x97" "\xb0\x52\xf4\xa5\x2a\xfc\xea\x81\x4d\xf5\x26\x18\x1c\x75\xc4\x49\x72" "\x10\xa2\xb8\xb7\x4e\x26\x60\x15\x61\xe7\x87\x35\x38\x7c\xf1\x23\x65" "\x4b\x02\x95\xd1\xd6\x05\x56\x95\x6b\x36\xd9\x6d\xd0\x38\x86\x6c\x4b" "\x4d\xb3\x1e\xbd\xcd\xdd\x69\x29\xbb\xc2\x85\x0c\xd4\x90\x13\x89\xe6" "\xea\x6e\x86\x04\x1e\x0e\xfa\x11\x58\xf3\x34\xe7\xaf\xda\x0e\x11\xc2" "\xfb\x0e\x6d\xf6\x36\x4c\xb9\x56\x59\xe5\x06\xd5\xc7\xe6\x3f\xb6\x7c" "\x81\x16\x57\x7d\x15\xe4\xa4\xb1\xfc\x4c\x27\xde\x2e\x52\x58\x6c\xb1" "\xf5\x2b\xe9\xc3\x60\x1f\x50\x66\x54\x9d\xe8\xbd\xc3\xec\x07\xd1\xa8" "\x4c\xaf\x19\x61\x32\x3e\xc2\x48\x7a\x37\xb7\x51\xae\xab\xaf\xcd\x64" "\x7c\xe2\xda\xe5\xd9\x49\x9c\x0f\x96\x94\x67\xe6\xca\xba\xd1\x98\x66" "\x9a\xc9\x6b\xd1\x48\x89\x54\xef\xf0\x85\x4e\xe0\xc8\x3d\x7b\x59\x6d" "\x27\x36\x25\xbd\xb1\x62\x70\x78\x23\x21\x07\x1f\xda\x5d\x98\x0d\xed" "\x78\xff\xa9\xdc\x2b\x56\x03\x00\x02\x00\x00\x00\x00\x00\x00\x51\x31" "\xf1\x99\x1f\x6c\x17\xae\x1e\xd5\x12\x0c\xa6\x87\x8f\x98\xe6\x8e\x79" "\x97\xa9\xa2\xb7\x0b\xe6\x40\xa7\x0a\x34\xad\xb8\x0d\xe2\x86\xc6\x69" "\x2a\xbb\x5f\x09\x2e\x4e\x3a\x15\xa8\x32\x17\xe0\x3d\x02\xa4\x05\x4f" "\x34\xaf\x3a\x65\xff\x6b\x36\xf3\x95\xb7\x6a\x05\x79\xcf\xfa\xfd\x5d" "\x3b\xb0\xe7\x04\xc9\x35\xca\xec\xf3\xa7\xab\x75\x6c\x23\xfd\x60\xc9" "\xfe\x3f\x4f\xb2\xbe\x75\x04\xf5\xba\xe2\x2b\x11\x6f\xf1\x58\x8d\xcf" "\x02\xb3\x27\xd3\x1b\xf0\x48\x8d\xba\x8a\xf5\xb3\x3c\xcf\x2d\x7d\x87" "\xf4\x3b\xbc\x48\xfc\xd4\xf1\x91\xad\x6a\xf9\x31\x3a\xd3\x8b\x8b\x29" "\x67\x4b\xfa\xbd\x66\x51\xbc\x1f\x6c\xe5\xab\xb4\xa2\xf1\x41\x31\x94" "\xf9\x6b\x26\xd7\xd6\xed\xc4\xe0\x13\xfb\xa5\x49\x07\x5c\x97\xee\xf5" "\x08\xaf\x5c\xa7\x87\x36\x64\xb0\x58\xb7\xbc\xf4\x55\xa8\xa0\x4b\x59" "\x1d\x29\xfa\xb6\x36\x6c\x84\x4b\xb7\x55\x76\xba\xc2\xd5\x23\x23\xe7" "\x47\x30\x3d\x00\xa5\x73\x6c\x98\x12\x92\x2b\x0e\x17\xbc\xec\x91\x35" "\x55\x07\x36\xb5\x4c\xf6\x40\x7d\x61\xe2\x2e\x62\xd7\xbb\x75\xf6\x29" "\x35\xb6\x65\xac\xf3\x3e\x75\xf6\x88\xc3\x6e\xf4\x16\xf1\xb8\x90\xd0" "\xf0\xc8\xad\x1d\xf0\x0e\x02\xec\x45\x96\x78\x34\xd5\x64\x9c\x8e\x71" "\x43\x97\x86\x22\xfa\x37\x04\x67\x29\x70\xb7\x99\x3a\x87\xe9\x7d\x3d" "\x92\x6a\x14\x26\x56\x47\xbc\x8b\x8c\x9e\x6f\x83\xe2\x95\x72\x60\x8d" "\x24\xb4\x2c\x26\x35\xef\x4a\xbb\xd0\xaf\x83\x86\x0e\x99\xc9\x0d\x74" "\x71\xcf\x6e\x8c\xe9\x95\x07\xf5\xec\x2b\xc5\x72\x21\x2f\xa9\xee\x3f" "\x5a\x9d\xfa\x38\x15\xfe\x55\xf0\xbb\xb1\x19\xac\xce\x06\x2a\xe3\x7f" "\x2f\xf9\x21\x70\x7a\xbb\xa1\x39\xbc\xdd\xf4\x2b\xfd\x17\x4d\x29\xb5" "\x40\x16\x1b\x41\x13\xc4\xe1\xa1\x3f\x3a\x62\x8c\x63\x8e\xc4\xd3\xa8" "\x84\xdf\xbc\x09\x3e\x23\xec\x0d\x06\x71\xb4\x6b\x41\xdc\x8b\x42\xd9" "\x50\xc8\x61\x5b\xa5\xee\x87\xf4\x9b\x5d\x09\x10\xff\xa4\x87\x12\x07" "\x99\x50\x01\x92\x0d\xb0\x5a\x95\x19\x99\x67\xf0\x97\xba\x7b\x55\xbb" "\xd2\x71\xd8\x18\x69\x0c\x42\x38\x40\x6b\x40\xa3\xdf\xc4\x2f\xa5\x6a" "\x67\x17\x3b\x53\xa9\x6b\x54\x33\x26\xc5\x67\x38\xb6\xd0\x43\x19\x59" "\x34\x01\x86\x96\xf5\xab\x49\x34\x7e\x51\x48\xa7\x8f\x2d\x13\x69\xa7" "\x1a\xfa\xb8\x33\x02\x73\xd4\x6e\xcf\xba\x4e\xe0\x58\x02\xa5\x38\x56" "\x49\x85\x1d\xb9\x49\xdb\xfb\x39\xe2\x90\x94\x16\x41\xc5\x0b\x1a\xc2" "\x0f\xb3\x10\x27\x54\xa7\x60\xb0\x97\xf4\x64\xdd\xb0\xb8\x3f\x81\x68" "\xba\xdf\xa7\x1d\xb6\x62\x1d\xcf\x22\xfb\x08\x1e\x34\x03\xf3\xba\xc5" "\xc7\xe6\x59\x05\xac\xa5\x28\x85\xc8\x07\xf8\xdd\xab\x18\xbb\x2f\x12" "\xef\x95\x2c\x50\x48\x3c\x0e\x25\x19\x68\xbc\x70\xff\x0d\x42\xa6\x38" "\xca\x74\x4d\xea\x4c\x7e\xbb\x4f\xea\x77\x7c\xf6\x63\xbb\x4f\x15\x05" "\xed\x79\x73\x0c\x45\xbc\x86\xe4\x88\xa1\x3f\x92\x43\x77\xa8\xe2\xee" "\x66\x70\xa0\x2c\xa5\x28\x74\xae\x1c\x42\xa3\x5d\x55\xb9\x76\x57\x57" "\x04\x7b\x2c\xc3\x74\x2a\xa5\x1f\xa3\xe4\x3f\xb2\xc1\x13\xc9\x2a\xd2" "\x13\xba\xd2\x52\xc1\xa8\x29\x66\xdd\x01\x6f\x12\xa7\xf1\xc3\x90\x0c" "\x0f\x1a\xb4\x55\x03\x51\x63\xf3\x18\x99\xbd\xd3\x0f\x3f\xf4\x3a\xd1" "\x7d\x9e\x45\xbb\x74\x38\xc1\xc9\x86\x71\x27\x36\xf2\x4b\xe1\x4f\x71" "\xab\x1b\xfe\x92\xa2\x5e\xc0\x7f\x08\x6e\xe8\xc7\x97\x1b\x80\x77\xa1" "\x3e\x58\xa8\xe8\xbe\xa3\x9c\x8e\x06\xb2\x51\x90\x9f\x02\xcb\x00\x80" "\xab\xf0\x20\xf2\x7c\xa1\x60\xeb\x26\xc0\x82\xdd\xa1\xfa\x54\xea\x40" "\x94\xdf\xdb\xcb\x2f\xa7\xbd\xdc\xcb\x67\xa8\x44\xe8\x07\x5f\x4c\xc0" "\x8d\xad\x35\x75\x70\x06\xd0\x51\xe1\x83\xdc\xed\x33\x6b\xc0\xc2\x50" "\x2f\x93\xff\xc8\x7d\xca\x62\x22\x86\xba\x17\x4c\x24\xe1\xf5\x3f\x27" "\xdc\x27\x77\xba\xaf\xe1\x70\x34\x8b\x0e\x8d\x3e\x74\x3b\x3a\xa9\x06" "\xbc\x07\x64\xbb\xe7\xda\x08\xff\x40\x3e\xfe\x22\x12\x62\x7d\x67\x22" "\x50\x65\x8b\xb5\x13\xb7\x31\x25\x17\xd1\xf8\x8c\x61\xc7\xba\x5f\x96" "\x47\xcd\x61\x92\x81\xc5\xb3\x90\xb4\x86\x06\xee\x39\xfb\x41\x71\x10" "\x3d\xf2\xe0\x9d\x7c\xfd\x56\xc0\x6c\x72\x1f\x7c\x24\xad\x8c\xce\x38" "\x36\x23\xfc\x2d\xcb\x15\xac\x56\x43\x8e\xa3\x31\x82\x0a\xe5\x9c\x8c" "\x47\x4e\x36\xfc\x73\xf7\xb1\xb3\xb8\x6d\xf1\xb4\x24\x90\x81\x55\x13" "\x68\x1a\xaf\xbf\x7e\x87\x1b\x4b\x96\x86\xef\xae\x6c\x45\xec\xfc\xa6" "\x0a\x64\x0a\x6f\x07\x1d\xfd\x31\xf9\x43\x7c\x3d\x03\x08\x61\x64\xb4" "\x8c\x1e\xd8\x02\x98\x68\x64\xbf\xe0\xd4\x9b\xdd\x77\x09\x66\x22\x62" "\x36\x8d\xbc\x3e\xcc\x05\xeb\x24\x0e\xcc\x41\x90\x4c\x76\xd7\x8a\xb5" "\xc5\x2b\x66\xaf\x5a\x72\x0f\xdd\x6a\x92\xf5\x2b\xe0\x67\x64\x27\xa5" "\x6e\x32\xe5\xbc\x50\x85\xb2\x5f\x90\xad\xd2\x8a\x76\xf2\xfc\xe6\xf8" "\xf0\xef\x74\xf4\x65\x96\x98\x54\x96\x46\xbd\x63\x17\x5a\xdf\x77\xb5" "\xcd\xcf\xe6\x76\xe1\xb1\xa9\xaf\x15\x10\x29\x46\x55\x4b\xa6\x13\x6c" "\xbc\x83\xc6\x26\x8e\xe4\x03\x18\xf3\xc9\xd4\x71\x80\x25\x68\x8b\x35" "\xd2\x26\x5b\xf6\x0b\xf8\x89\xff\x62\x9f\x78\x34\x58\x6e\xf4\x6e\xab" "\x7a\x91\x76\x33\x75\x36\xbb\x60\x01\xe6\x76\x54\x6b\x98\x7f\x36\xb1" "\xfe\x4b\x9f\x6e\x46\xa8\xce\x73\xeb\x22\xeb\xbb\x9c\x14\xd8\xe2\xb4" "\x3e\xa7\x7e\xf8\x87\xe5\xa2\x64\x48\xf4\x08\x6f\xa8\x12\xa2\x5e\x27" "\x72\x5a\xc1\x02\x98\x85\x1c\x8b\xc4\x5f\x2c\xe4\x43\x0b\x07\x91\x7a" "\xde\x5e\xa8\xc4\x34\xc3\xf2\x57\x6e\xff\xbe\xb5\x21\x17\x37\x36\xe5" "\xc9\x55\x74\x50\x64\x30\x68\xb0\xc0\xfb\x13\x2a\x7e\x99\xde\x6c\xa2" "\x92\x24\x6a\x99\x37\xfa\x7d\x7e\x06\xe5\x9c\xf5\x9c\xe5\xb9\xf8\x42" "\x62\x90\x49\x93\x11\x46\xaf\x40\xa8\xa1\x25\x6b\xa3\x73\xa8\x8d\x09" "\xdc\x00\xcd\xf4\x45\x3c\xc6\xba\x78\x57\x2b\xf3\xe1\xf2\x35\x2a\x97" "\x8c\xdb\xad\x60\x22\x0c\xb8\xac\x37\xd7\xf6\x14\xa3\x06\x49\x2a\x4b" "\x5e\xee\x92\x44\xb0\xca\x84\xb6\xcf\x2e\x23\x01\x3b\xfb\x1c\xb9\x2b" "\xf6\xd1\x26\xfe\x55\x0e\x58\xc1\x9f\x84\xe7\xa4\x08\x14\x37\xb7\x5b" "\x31\xb2\xb9\xfb\x65\x8d\xcd\x8b\xa0\x77\x96\x2e\x0f\x33\x59\x72\x1a" "\x14\x8d\x4f\xef\xe5\xc9\x79\x41\xca\x96\x88\xcb\x85\xad\xf3\x8f\xd1" "\x0f\x58\x11\xcd\xd8\xe0\x74\xa2\x1b\xbf\xc9\x54\x1c\x71\x46\x5b\x08" "\xd7\x32\x12\x81\xb6\x8e\xd5\x2b\xfa\xb7\x89\xb9\xc8\x38\x49\xc0\x9d" "\x52\x37\x6d\x41\x9b\x1e\x7b\xa3\x67\x60\x32\x36\xe1\x19\xcd\xf4\xa7" "\xb7\xcf\x9d\x81\xf2\x22\x96\x01\xde\xac\xe5\x3c\xea\x2f\x14\xa0\x5f" "\x7f\xa0\xca\x04\xb3\x9e\x31\xc6\x45\x3e\x33\x2f\x4b\xd0\x91\x5c\x0e" "\x09\xe2\x8f\x4d\x11\x25\xc3\x90\xc6\xff\x08\x33\xa0\x4b\x6f\xc3\x78" "\x55\xe6\x5d\xe9\x03\x33\xe5\x05\xb9\xeb\x66\xe0\x06\x86\xa3\xed\x49" "\x9c\xfb\x7b\x8b\x21\x5d\xbd\xc9\x78\x7b\x5b\xaa\x72\x4c\xfa\x71\xee" "\x67\x45\xb4\x1e\x20\x3d\xe8\xb7\x79\x47\x57\xac\x32\x8e\xc5\x56\x75" "\x40\xb9\x51\xb5\x05\x30\xc3\xd4\xee\x34\x70\x5e\xa1\xc6\x6f\xd6\x59" "\x1e\x88\x56\x10\x83\xe8\x6d\x48\xc4\x5e\xf3\xb8\x3a\x30\x29\x31\x9d" "\x8f\x3d\x8e\x65\xce\x14\xc1\xdc\x3c\xb9\x2d\x0a\x7d\xbe\xb6\x09\xa8" "\xd2\x79\x39\x28\xca\xa0\x79\xf0\xfb\xbb\x2b\xc9\x0b\x9f\x05\x8c\xc0" "\x48\xf4\x03\x20\x41\xd1\x4c\x5b\xca\x00\xe9\x9b\x30\x27\xec\x3a\x50" "\xc4\x95\x71\x99\xcf\x01\x6a\x45\x94\x06\x9a\xf8\x65\x9d\xf0\x97\x3f" "\x20\xff\xb1\x5d\xbc\x26\x5a\xc5\xb8\xa2\x20\x3e\x90\xb1\x14\xa3\xe9" "\x44\x1e\x35\x7c\x60\xce\x0b\x55\x0a\x7f\xe6\x6f\xc3\x4f\x57\x02\xac" "\x8e\x89\x92\xa2\x2e\x89\x19\x4c\x1d\xf6\x9e\x81\xa9\xb7\xad\x3d\x26" "\x34\xea\x8c\x03\x88\x58\x81\x92\xfd\x47\xd8\xe8\x03\xb1\x00\x44\xd5" "\x58\x61\x7f\xb2\x92\x1b\x69\xeb\x4d\x85\xc0\x51\xf8\x6e\xf6\x3a\x2f" "\x43\x82\xb9\xbe\xcd\x87\x0f\xb2\xec\xad\xca\x69\x02\x71\x2b\x88\x68" "\x07\x92\xe2\xf2\xec\x89\x59\x1c\xfe\xbb\x6d\xb3\xad\x31\xc2\xa3\x39" "\xaf\x10\x46\x5f\xcf\x79\x88\x51\x9d\x38\x22\x18\xdf\x52\x26\x12\x34" "\xf2\x6a\x6f\x66\xad\x0d\x18\x59\xde\x50\x5d\x0f\xe8\x19\xca\xf2\xf8" "\xd3\x0a\xa9\xfd\x12\x28\xac\x91\xd1\x1c\xa6\x7f\x1f\x8d\x50\xc8\xee" "\xfa\x5c\x44\x15\x14\x32\x15\x07\xdf\xf6\xc6\xea\x3c\xff\x6f\x34\x0a" "\x1c\x11\xe0\xc4\x0f\x41\x9e\x8e\x60\xfc\x94\xd8\x82\x8f\xa4\x7a\x96" "\xcd\xf7\xee\x4f\x61\xe2\x3f\x40\x75\x1b\x25\xcf\x9c\xa1\x29\x50\x41" "\xa3\x50\xf8\x3f\x0e\x67\x95\x15\xd6\xb4\xb4\x6e\x2c\x9c\xe8\x99\x9e" "\x07\xf8\x35\xab\xc1\x66\x3c\xef\xcf\x72\x8d\xf3\x78\x31\xf4\xe1\x7f" "\x8c\x8a\x4f\xea\xf1\xfb\xf4\x4c\x38\xc9\x31\x32\x84\x40\x4a\x50\xba" "\x4c\xd8\xab\xe8\x35\xb3\x3b\xfe\xcb\x02\xcd\x6c\x9d\x7f\x43\x58\x53" "\xb4\xc8\xd5\x05\xab\x83\xcf\x46\x51\x27\x39\x11\x66\x94\x76\x56\x58" "\xba\xe6\x4b\x31\x27\x15\x2d\x21\x60\x55\xae\xf9\xb2\x5c\x70\xa8\xa3" "\xb3\x02\x75\x2d\x7b\x1e\x87\x91\xc6\x57\xb9\xf3\xfc\x90\x01\xef\x29" "\x9f\xd1\xa3\x49\x49\x1a\xe6\xee\x99\x40\x14\x91\x60\x50\x7f\xc4\x13" "\x0f\xb8\x25\xd4\x7d\x97\xdc\x2c\x24\x32\x09\xd2\x40\x35\x83\xac\x3e" "\xf6\xdd\xbe\xdc\xaa\x76\x43\x22\x55\x48\x7c\x0a\x06\xe5\x9e\x04\x3e" "\x57\x2a\xb3\xae\xc0\x02\xaf\x6a\x6b\x6a\x2d\xc9\xcf\xae\xef\xa7\x05" "\x57\x88\x6c\x4d\x12\x92\x4a\x03\x88\xf2\xf1\xbc\x8e\x89\xe4\xcf\xa6" "\x97\x05\xd1\xef\x3c\x46\x58\xf8\x61\x62\x78\xb5\x88\x01\x1d\x9d\xd9" "\x14\xbe\xec\x0b\x15\x1d\x65\xb6\x52\x4f\xba\x3e\x3f\x23\x5d\x58\x37" "\x3e\x02\x16\x99\xb0\x76\x22\xa5\x15\x04\xea\xde\x74\x7e\x0b\x2f\x9c" "\xf3\x8b\xc1\x67\xca\xbc\x8c\xb1\x8c\x70\x8d\x13\x37\xe2\x56\x48\x70" "\x7e\x8c\x08\x72\x87\x65\x14\xc7\xa4\x9c\x0b\x2a\xae\xe5\xed\x9e\x9e" "\xcf\xcb\xcc\x23\xe0\x32\xc4\xde\xb6\x3e\x48\xe7\x12\x01\x88\x05\x64" "\x68\xfa\xd3\x14\x48\xe4\xb4\x2e\x7d\x62\xfb\xcf\xc1\xc2\xcf\xb0\x1f" "\xcf\x0d\xb5\xe8\xa1\x62\xbd\xb9\xbd\x82\x0c\x76\x3f\x17\xb9\x6c\x23" "\xf3\x2d\xb9\xd1\xc1\xd7\x4d\xdb\xe6\x57\x01\x00\x00\x00\x00\x00\x00" "\x00\x07\x42\x15\x31\x11\xb1\x5e\x48\x4d\x8f\xfe\xbe\x47\xce\x0a\x78" "\xa4\x1e\x47\x0a\x34\x16\x16\xec\x2e\xb6\xee\xf8\x13\xfb\x41\x5f\xab" "\x50\xfa\x96\x5b\xec\x6a\x59\x77\xa0\xad\xe4\xfe\xd6\x7f\x86\xfc\x24" "\xe1\x1b\x0e\x2f\x53\x64\x07\x9f\x7c\x7c\x35\xb5\x60\xca\xc7\x26\xdb" "\xc8\x0f\x29\xdb\xd2\x48\xf7\xec\xda\x02\x86\xa2\x3e\xf1\x72\xa2\x8c" "\x96\xd9\xbd\xb1\xf5\x98\xea\xb3\x1c\x6b\xaf\x03\x21\x31\x2d\xa2\x39" "\x20\xc0\x74\xb9\xd2\xd2\xe4\x42\x71\x7f\x2c\x21\x00\x11\x42\xa3\x9c" "\x2d\xa6\xb8\xbd\x9d\x06\xb0\x5a\x6a\x8d\xea\xe1\xbd\x1b\xe4\x10\x8a" "\x63\x6d\xdb\xeb\xc6\x82\xd1\x13\xe7\x15\xf2\xf3\xee\x50\x6a\xbc\x28" "\xb1\xc6\x54\xb3\xd2\xd2\x8e\x02\xf7\x3b\x17\x1e\xd0\xde\xed\x71\xdd" "\xa9\x0c\xe4\xa0\xb7\x28\xcc\x75\xcb\x57\x63\x85\xe7\x41\x8b\x54\x5b" "\x99\x2b\x1d\xd9\x8e\x2e\xe5\x33\x55\xf4\x64\xf9\x25\x0a\x2a\x03\xb3" "\xd1\xe4\xd2\xac\x1a\xa7\x1d\x01\xde\x25\x73\x53\x03\x24\xe1\x4d\x15" "\x86\x07\x88\x34\x11\xdd\xbd\x37\xbe\x21\xdc\x92\x9d\xb9\xb1\x1f\x11" "\x01\x0e\x4d\x2a\x04\xc7\x32\x5a\x5a\xe6\xd2\x4d\x19\x90\x0f\xf9\x7a" "\x8a\x89\x43\x8f\x86\x76\x45\x7a\x78\xcf\xf0\x52\x01\x52\x8f\x43\x58" "\xfe\x67\xf6\x12\x88\xbf\x04\x2a\x8f\x3c\x2e\x0f\x8b\x49\x97\xb8\xfb" "\x74\x99\x6b\x80\xd4\x65\x48\x9b\x2d\x78\x07\xa9\x45\xeb\xa7\x2a\x94" "\x5e\x8c\xf8\x62\x5d\xba\xd6\xf6\xf6\xe3\x05\x37\xb2\x9e\x55\x8c\xa8" "\x9d\xb0\x62\x5f\x57\x8c\x76\x6d\x34\xf2\xd2\x8d\x70\x47\x15\xf9\x4d" "\xf1\xf6\x31\x8a\x30\x80\x42\xaa\x49\x4b\xaa\x29\x56\x40\x67\x9f\x1e" "\xab\x1e\x6a\x83\x08\xaf\x8c\xe6\x44\x1d\x5a\xd8\xa2\xf3\xd4\x77\xeb" "\x53\x07\xaf\x0d\xfa\xe6\x64\x44\x93\xf1\x43\x40\x30\xb8\x36\x16\x21" "\x34\x0a\xd3\xdc\xef\xa6\xd8\xf0\x90\xed\x39\x29\xd8\x9a\xd9\xc0\xba" "\x01\xa6\x90\x30\x33\x42\x8d\xd8\xf9\x86\x19\x30\x4b\x18\x03\x18\x7d" "\x2a\x61\x30\xbf\x1e\x00\x9b\x5e\xb0\xe7\xe2\x1c\x75\x59\x4b\x3b\x84" "\x70\xf3\x10\x6c\x92\xa9\xe5\x5b\xfe\xb0\x26\x09\x1c\xed\x12\x7a\x90" "\xa1\xf1\x24\x7f\x3c\x07\xe3\x6d\x35\x72\x92\x3e\x0d\xe3\xf7\x35\x18" "\xd0\x36\x9a\x25\xfc\xd4\xe6\x5d\x24\x3b\x7e\xab\x91\x06\x3a\x7b\xfd" "\x8b\xc8\xac\x9e\x39\xfb\xbb\x32\xb5\xc9\x51\x78\x86\x28\x7a\x18\xea" "\xcd\x8d\xbf\xda\x9b\x91\xdb\x69\x3c\xb1\x2e\x42\xcb\xa5\x98\x82\x80" "\xe0\x9e\x51\xe7\x2b\x91\xa0\xf3\x60\x65\x6d\x8f\x21\xcc\x1e\xb3\x24" "\x8a\xc3\x45\xad\x51\xd1\xa6\x17\x2b\x18\x41\x92\x77\x85\x1d\xab\x01" "\xe0\x28\xc7\xe8\xe2\xcf\x34\x09\x5e\xfd\x28\x26\x78\x52\xa0\x8f\xcc" "\xf6\x1c\x45\xb5\xe4\x69\x30\x16\x0d\xaf\x50\x28\x2b\xe0\x58\x27\x4e" "\x7f\x6a\xb8\x77\x8a\x2a\x2b\x5f\xa2\x55\x7a\xd7\xbf\x7f\x01\xf2\x17" "\x55\x23\xce\x75\x88\x71\xd3\x34\xc2\x0a\x98\x39\xf7\xa8\x9f\xe2\x86" "\x7c\x06\x28\x9c\x8a\x2f\x64\x56\xac\x7e\x4f\xba\xde\xe5\x3a\xc4\x1a" "\xee\x68\x21\x4b\xc7\x66\x69\x85\x3b\xaa\x4f\x58\x25\x5b\x39\xba\x58" "\x14\x14\xf2\xe8\xc4\xb4\x93\x03\xf8\x93\x6a\x33\xba\xe5\xcb\xc9\x6b" "\x29\xa5\xc7\x24\xd5\xb5\x0e\x16\x14\x14\x4c\x2a\xcd\x03\xbd\x90\xde" "\x89\x1c\x3d\x36\xce\x04\x0d\x57\x54\x36\x82\xec\xbf\xca\xe6\x6c\x41" "\x53\xc3\x37\xc3\xa5\xd0\x18\x96\x52\x4c\x8e\x0c\x27\xe9\xa0\x89\x19" "\x82\x1c\xa2\x7b\xbf\xe3\xfc\x9b\xa2\x4a\x82\x3a\xee\xc8\xd4\xad\x8e" "\xf8\xa6\x5c\x58\x5b\xee\x4d\xcf\x1a\xca\xa3\xda\x50\x1a\x8c\x11\xa2" "\x3b\x2e\x22\x92\x0c\x1a\xd0\x12\x9a\x03\x8b\x31\xfe\x16\xc2\xab\xc8" "\x05\x89\xdb\xf7\xc3\x72\x11\xaf\xc5\xd1\xa6\xdb\x90\x8b\xc5\xfe\x8a" "\x69\x20\x60\x06\x9f\xcb\xcd\xcb\xa7\xc5\x23\xd3\xc4\x24\xaa\x3b\x0c" "\x65\x56\x38\x7e\x0e\x51\xbc\xde\x9e\x5f\x85\x0a\xbf\x62\xd2\xc2\x10" "\x1c\x3a\x27\x86\xa0\xcb\x94\x93\x28\x77\xa0\x9c\xb6\xb6\x4a\xa6\x1d" "\xa8\xca\xb3\xb4\x23\xe7\xad\xc4\xc4\x70\x04\x18\xa6\x5e\x87\x22\x57" "\x10\xe1\x69\x1f\x6d\x9c\xb2\xeb\x63\xcc\xe5\xb6\x05\xce\x0a\x4a\x89" "\xcf\x51\x97\x67\xe0\x08\x45\x39\x7c\x5e\x38\x11\x41\xa0\xed\x8a\x89" "\xb0\x10\x64\xb4\x95\xec\x8d\x1e\x2d\xa3\x74\x33\xbf\x15\x97\xd9\x19" "\xa6\x96\x10\xd2\xad\x26\xbd\xf6\xfc\xa8\xde\x42\x2b\xb2\xcb\x80\xd0" "\x51\x62\x06\xe8\x19\x4e\xe5\x14\x45\xa3\xdc\xb5\xde\xe3\x3c\x0c\x31" "\x0b\x47\x51\xe6\x8e\x58\xbe\xbd\xa2\xfb\x58\x69\x85\xa5\xa5\xb0\x64" "\x56\x75\x6f\x44\xe6\xdb\xfe\xf4\xbb\x99\xca\x73\x2f\x00\xfb\x9e\xa3" "\x57\x75\xf7\x41\x96\x81\xbf\xbe\x6f\x43\xdc\x7c\x46\x50\xc1\x3b\x63" "\xd9\x3c\x1d\x49\x0b\xf0\x17\x3f\x28\x7a\x43\x09\x53\x1f\x13\xec\xb1" "\xa7\x75\xd0\xbd\x88\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 4096); *(uint16_t*)0x20002984 = 0x1000; syscall(__NR_write, /*fd=*/r[1], /*data=*/0x20001980ul, /*len=*/0x1006ul); break; case 5: syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x4000ul, /*prot=PROT_READ*/ 1ul, /*flags=MAP_NONBLOCK|MAP_FIXED|MAP_PRIVATE*/ 0x10012ul, /*fd=*/r[1], /*offset=*/0ul); break; case 6: syscall(__NR_socket, /*domain=*/0x10ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0); break; case 7: syscall(__NR_sendmsg, /*fd=*/-1, /*msg=*/0ul, /*f=*/0ul); break; } } 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); const char* reason; (void)reason; for (procid = 0; procid < 5; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }