// https://syzkaller.appspot.com/bug?id=ddfaf1d75a1db3b0ed9dfa5bb615a2d50dd8f1da // 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 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; for (i = 0; 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_RELAXED)) 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); 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) { } } 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) { int i, call, thread; for (call = 0; call < 10; 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(); 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[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res; switch (call) { case 0: res = syscall(__NR_pipe, 0x20000040ul); if (res != -1) { r[0] = *(uint32_t*)0x20000040; r[1] = *(uint32_t*)0x20000044; } break; case 1: res = syscall(__NR_socket, 2ul, 2ul, 0ul); if (res != -1) r[2] = res; break; case 2: syscall(__NR_close, r[2]); break; case 3: *(uint64_t*)0x20000300 = 0; *(uint32_t*)0x20000308 = 0; *(uint64_t*)0x20000310 = 0x200002c0; *(uint64_t*)0x200002c0 = 0x20000000; memcpy((void*)0x20000000, "\x60\x00\x00\x00\x30\x00\x3d\xfa\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x4c\x00\x01\x00\x48\x00\x01\x00\x07\x00\x01\x00" "\x78\x74\x00\x00\x38\x00\x02\x80\x2a\x00\x06\x00\x26\x00\x00\x00" "\x6e\x67\x6c\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x47\x3c\x02\xef\x00\x03\x00\x00\x00\x00" "\x00\x00\x00\x00\x08\x00\x02", 87); *(uint64_t*)0x200002c8 = 1; *(uint64_t*)0x20000318 = 1; *(uint64_t*)0x20000320 = 0; *(uint64_t*)0x20000328 = 0; *(uint32_t*)0x20000330 = 0; syscall(__NR_sendmsg, -1, 0x20000300ul, 0ul); break; case 4: syscall(__NR_write, r[1], 0x20000000ul, 0xfffffeccul); break; case 5: syscall(__NR_socket, 0x10ul, 3ul, 0ul); break; case 6: syscall(__NR_splice, r[0], 0ul, r[2], 0ul, 0x4ffe0ul, 0ul); break; case 7: syscall(__NR_fcntl, -1, 0x407ul, 0ul); break; case 8: res = syscall(__NR_socket, 2ul, 2ul, 0ul); if (res != -1) r[3] = res; break; case 9: memcpy((void*)0x200002c0, "filter\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000", 32); *(uint32_t*)0x200002e0 = 0xe; *(uint32_t*)0x200002e4 = 4; *(uint32_t*)0x200002e8 = 0x2d8; *(uint32_t*)0x200002ec = 0; *(uint32_t*)0x200002f0 = 0; *(uint32_t*)0x200002f4 = 0x188; *(uint32_t*)0x200002f8 = 0x188; *(uint32_t*)0x200002fc = 0; *(uint32_t*)0x20000300 = 0x240; *(uint32_t*)0x20000304 = 0x240; *(uint32_t*)0x20000308 = 0x240; *(uint32_t*)0x2000030c = 0x240; *(uint32_t*)0x20000310 = 0x240; *(uint32_t*)0x20000314 = 4; *(uint64_t*)0x20000318 = 0; *(uint8_t*)0x20000320 = 0; *(uint8_t*)0x20000321 = 0; *(uint8_t*)0x20000322 = 0; *(uint8_t*)0x20000323 = 0; *(uint8_t*)0x20000324 = 0; *(uint8_t*)0x20000325 = 0; *(uint8_t*)0x20000326 = 0; *(uint8_t*)0x20000327 = 0; *(uint8_t*)0x20000328 = 0; *(uint8_t*)0x20000329 = 0; *(uint8_t*)0x2000032a = 0; *(uint8_t*)0x2000032b = 0; *(uint8_t*)0x2000032c = 0; *(uint8_t*)0x2000032d = 0; *(uint8_t*)0x2000032e = 0; *(uint8_t*)0x2000032f = 0; *(uint8_t*)0x20000330 = 0; *(uint8_t*)0x20000331 = 0; *(uint8_t*)0x20000332 = 0; *(uint8_t*)0x20000333 = 0; *(uint8_t*)0x20000334 = 0; *(uint8_t*)0x20000335 = 0; *(uint8_t*)0x20000336 = 0; *(uint8_t*)0x20000337 = 0; *(uint8_t*)0x20000338 = 0; *(uint8_t*)0x20000339 = 0; *(uint8_t*)0x2000033a = 0; *(uint8_t*)0x2000033b = 0; *(uint8_t*)0x2000033c = 0; *(uint8_t*)0x2000033d = 0; *(uint8_t*)0x2000033e = 0; *(uint8_t*)0x2000033f = 0; *(uint8_t*)0x20000340 = 0; *(uint8_t*)0x20000341 = 0; *(uint8_t*)0x20000342 = 0; *(uint8_t*)0x20000343 = 0; *(uint8_t*)0x20000344 = 0; *(uint8_t*)0x20000345 = 0; *(uint8_t*)0x20000346 = 0; *(uint8_t*)0x20000347 = 0; *(uint8_t*)0x20000348 = 0; *(uint8_t*)0x20000349 = 0; *(uint8_t*)0x2000034a = 0; *(uint8_t*)0x2000034b = 0; *(uint8_t*)0x2000034c = 0; *(uint8_t*)0x2000034d = 0; *(uint8_t*)0x2000034e = 0; *(uint8_t*)0x2000034f = 0; *(uint8_t*)0x20000350 = 0; *(uint8_t*)0x20000351 = 0; *(uint8_t*)0x20000352 = 0; *(uint8_t*)0x20000353 = 0; *(uint8_t*)0x20000354 = 0; *(uint8_t*)0x20000355 = 0; *(uint8_t*)0x20000356 = 0; *(uint8_t*)0x20000357 = 0; *(uint8_t*)0x20000358 = 0; *(uint8_t*)0x20000359 = 0; *(uint8_t*)0x2000035a = 0; *(uint8_t*)0x2000035b = 0; *(uint8_t*)0x2000035c = 0; *(uint8_t*)0x2000035d = 0; *(uint8_t*)0x2000035e = 0; *(uint8_t*)0x2000035f = 0; *(uint8_t*)0x20000360 = 0; *(uint8_t*)0x20000361 = 0; *(uint8_t*)0x20000362 = 0; *(uint8_t*)0x20000363 = 0; *(uint8_t*)0x20000364 = 0; *(uint8_t*)0x20000365 = 0; *(uint8_t*)0x20000366 = 0; *(uint8_t*)0x20000367 = 0; *(uint8_t*)0x20000368 = 0; *(uint8_t*)0x20000369 = 0; *(uint8_t*)0x2000036a = 0; *(uint8_t*)0x2000036b = 0; *(uint8_t*)0x2000036c = 0; *(uint8_t*)0x2000036d = 0; *(uint8_t*)0x2000036e = 0; *(uint8_t*)0x2000036f = 0; *(uint8_t*)0x20000370 = 0; *(uint8_t*)0x20000371 = 0; *(uint8_t*)0x20000372 = 0; *(uint8_t*)0x20000373 = 0; *(uint32_t*)0x20000374 = 0; *(uint16_t*)0x20000378 = 0xc8; *(uint16_t*)0x2000037a = 0xf0; *(uint32_t*)0x2000037c = 0; *(uint64_t*)0x20000380 = 0; *(uint64_t*)0x20000388 = 0; *(uint16_t*)0x20000390 = 0x30; memcpy((void*)0x20000392, "addrtype\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000", 29); *(uint8_t*)0x200003af = 0; *(uint16_t*)0x200003b0 = 0; *(uint16_t*)0x200003b2 = 0; *(uint32_t*)0x200003b4 = 0; *(uint32_t*)0x200003b8 = 0; *(uint16_t*)0x200003c0 = 0x28; memcpy((void*)0x200003c2, "socket\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000" "\000", 29); *(uint8_t*)0x200003df = 1; *(uint8_t*)0x200003e0 = 0; *(uint16_t*)0x200003e8 = 0x28; memcpy((void*)0x200003ea, "REJECT\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000" "\000", 29); *(uint8_t*)0x20000407 = 0; *(uint32_t*)0x20000408 = 0; *(uint8_t*)0x20000410 = 0; *(uint8_t*)0x20000411 = 0; *(uint8_t*)0x20000412 = 0; *(uint8_t*)0x20000413 = 0; *(uint8_t*)0x20000414 = 0; *(uint8_t*)0x20000415 = 0; *(uint8_t*)0x20000416 = 0; *(uint8_t*)0x20000417 = 0; *(uint8_t*)0x20000418 = 0; *(uint8_t*)0x20000419 = 0; *(uint8_t*)0x2000041a = 0; *(uint8_t*)0x2000041b = 0; *(uint8_t*)0x2000041c = 0; *(uint8_t*)0x2000041d = 0; *(uint8_t*)0x2000041e = 0; *(uint8_t*)0x2000041f = 0; *(uint8_t*)0x20000420 = 0; *(uint8_t*)0x20000421 = 0; *(uint8_t*)0x20000422 = 0; *(uint8_t*)0x20000423 = 0; *(uint8_t*)0x20000424 = 0; *(uint8_t*)0x20000425 = 0; *(uint8_t*)0x20000426 = 0; *(uint8_t*)0x20000427 = 0; *(uint8_t*)0x20000428 = 0; *(uint8_t*)0x20000429 = 0; *(uint8_t*)0x2000042a = 0; *(uint8_t*)0x2000042b = 0; *(uint8_t*)0x2000042c = 0; *(uint8_t*)0x2000042d = 0; *(uint8_t*)0x2000042e = 0; *(uint8_t*)0x2000042f = 0; *(uint8_t*)0x20000430 = 0; *(uint8_t*)0x20000431 = 0; *(uint8_t*)0x20000432 = 0; *(uint8_t*)0x20000433 = 0; *(uint8_t*)0x20000434 = 0; *(uint8_t*)0x20000435 = 0; *(uint8_t*)0x20000436 = 0; *(uint8_t*)0x20000437 = 0; *(uint8_t*)0x20000438 = 0; *(uint8_t*)0x20000439 = 0; *(uint8_t*)0x2000043a = 0; *(uint8_t*)0x2000043b = 0; *(uint8_t*)0x2000043c = 0; *(uint8_t*)0x2000043d = 0; *(uint8_t*)0x2000043e = 0; *(uint8_t*)0x2000043f = 0; *(uint8_t*)0x20000440 = 0; *(uint8_t*)0x20000441 = 0; *(uint8_t*)0x20000442 = 0; *(uint8_t*)0x20000443 = 0; *(uint8_t*)0x20000444 = 0; *(uint8_t*)0x20000445 = 0; *(uint8_t*)0x20000446 = 0; *(uint8_t*)0x20000447 = 0; *(uint8_t*)0x20000448 = 0; *(uint8_t*)0x20000449 = 0; *(uint8_t*)0x2000044a = 0; *(uint8_t*)0x2000044b = 0; *(uint8_t*)0x2000044c = 0; *(uint8_t*)0x2000044d = 0; *(uint8_t*)0x2000044e = 0; *(uint8_t*)0x2000044f = 0; *(uint8_t*)0x20000450 = 0; *(uint8_t*)0x20000451 = 0; *(uint8_t*)0x20000452 = 0; *(uint8_t*)0x20000453 = 0; *(uint8_t*)0x20000454 = 0; *(uint8_t*)0x20000455 = 0; *(uint8_t*)0x20000456 = 0; *(uint8_t*)0x20000457 = 0; *(uint8_t*)0x20000458 = 0; *(uint8_t*)0x20000459 = 0; *(uint8_t*)0x2000045a = 0; *(uint8_t*)0x2000045b = 0; *(uint8_t*)0x2000045c = 0; *(uint8_t*)0x2000045d = 0; *(uint8_t*)0x2000045e = 0; *(uint8_t*)0x2000045f = 0; *(uint8_t*)0x20000460 = 0; *(uint8_t*)0x20000461 = 0; *(uint8_t*)0x20000462 = 0; *(uint8_t*)0x20000463 = 0; *(uint32_t*)0x20000464 = 0; *(uint16_t*)0x20000468 = 0x70; *(uint16_t*)0x2000046a = 0x98; *(uint32_t*)0x2000046c = 0; *(uint64_t*)0x20000470 = 0; *(uint64_t*)0x20000478 = 0; *(uint16_t*)0x20000480 = 0x28; memcpy((void*)0x20000482, "REJECT\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000" "\000", 29); *(uint8_t*)0x2000049f = 0; *(uint32_t*)0x200004a0 = 0; *(uint8_t*)0x200004a8 = 0; *(uint8_t*)0x200004a9 = 0; *(uint8_t*)0x200004aa = 0; *(uint8_t*)0x200004ab = 0; *(uint8_t*)0x200004ac = 0; *(uint8_t*)0x200004ad = 0; *(uint8_t*)0x200004ae = 0; *(uint8_t*)0x200004af = 0; *(uint8_t*)0x200004b0 = 0; *(uint8_t*)0x200004b1 = 0; *(uint8_t*)0x200004b2 = 0; *(uint8_t*)0x200004b3 = 0; *(uint8_t*)0x200004b4 = 0; *(uint8_t*)0x200004b5 = 0; *(uint8_t*)0x200004b6 = 0; *(uint8_t*)0x200004b7 = 0; *(uint8_t*)0x200004b8 = 0; *(uint8_t*)0x200004b9 = 0; *(uint8_t*)0x200004ba = 0; *(uint8_t*)0x200004bb = 0; *(uint8_t*)0x200004bc = 0; *(uint8_t*)0x200004bd = 0; *(uint8_t*)0x200004be = 0; *(uint8_t*)0x200004bf = 0; *(uint8_t*)0x200004c0 = 0; *(uint8_t*)0x200004c1 = 0; *(uint8_t*)0x200004c2 = 0; *(uint8_t*)0x200004c3 = 0; *(uint8_t*)0x200004c4 = 0; *(uint8_t*)0x200004c5 = 0; *(uint8_t*)0x200004c6 = 0; *(uint8_t*)0x200004c7 = 0; *(uint8_t*)0x200004c8 = 0; *(uint8_t*)0x200004c9 = 0; *(uint8_t*)0x200004ca = 0; *(uint8_t*)0x200004cb = 0; *(uint8_t*)0x200004cc = 0; *(uint8_t*)0x200004cd = 0; *(uint8_t*)0x200004ce = 0; *(uint8_t*)0x200004cf = 0; *(uint8_t*)0x200004d0 = 0; *(uint8_t*)0x200004d1 = 0; *(uint8_t*)0x200004d2 = 0; *(uint8_t*)0x200004d3 = 0; *(uint8_t*)0x200004d4 = 0; *(uint8_t*)0x200004d5 = 0; *(uint8_t*)0x200004d6 = 0; *(uint8_t*)0x200004d7 = 0; *(uint8_t*)0x200004d8 = 0; *(uint8_t*)0x200004d9 = 0; *(uint8_t*)0x200004da = 0; *(uint8_t*)0x200004db = 0; *(uint8_t*)0x200004dc = 0; *(uint8_t*)0x200004dd = 0; *(uint8_t*)0x200004de = 0; *(uint8_t*)0x200004df = 0; *(uint8_t*)0x200004e0 = 0; *(uint8_t*)0x200004e1 = 0; *(uint8_t*)0x200004e2 = 0; *(uint8_t*)0x200004e3 = 0; *(uint8_t*)0x200004e4 = 0; *(uint8_t*)0x200004e5 = 0; *(uint8_t*)0x200004e6 = 0; *(uint8_t*)0x200004e7 = 0; *(uint8_t*)0x200004e8 = 0; *(uint8_t*)0x200004e9 = 0; *(uint8_t*)0x200004ea = 0; *(uint8_t*)0x200004eb = 0; *(uint8_t*)0x200004ec = 0; *(uint8_t*)0x200004ed = 0; *(uint8_t*)0x200004ee = 0; *(uint8_t*)0x200004ef = 0; *(uint8_t*)0x200004f0 = 0; *(uint8_t*)0x200004f1 = 0; *(uint8_t*)0x200004f2 = 0; *(uint8_t*)0x200004f3 = 0; *(uint8_t*)0x200004f4 = 0; *(uint8_t*)0x200004f5 = 0; *(uint8_t*)0x200004f6 = 0; *(uint8_t*)0x200004f7 = 0; *(uint8_t*)0x200004f8 = 0; *(uint8_t*)0x200004f9 = 0; *(uint8_t*)0x200004fa = 0; *(uint8_t*)0x200004fb = 0; *(uint32_t*)0x200004fc = 0; *(uint16_t*)0x20000500 = 0x70; *(uint16_t*)0x20000502 = 0xb8; *(uint32_t*)0x20000504 = 0; *(uint64_t*)0x20000508 = 0; *(uint64_t*)0x20000510 = 0; *(uint16_t*)0x20000518 = 0x48; memcpy((void*)0x2000051a, "TEE\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000", 29); *(uint8_t*)0x20000537 = 1; *(uint8_t*)0x20000538 = 0xac; *(uint8_t*)0x20000539 = 0x14; *(uint8_t*)0x2000053a = 0x14; *(uint8_t*)0x2000053b = 0xbb; memcpy((void*)0x20000548, "veth0_to_bond\000\000\000", 16); *(uint64_t*)0x20000558 = 0; *(uint8_t*)0x20000560 = 0; *(uint8_t*)0x20000561 = 0; *(uint8_t*)0x20000562 = 0; *(uint8_t*)0x20000563 = 0; *(uint8_t*)0x20000564 = 0; *(uint8_t*)0x20000565 = 0; *(uint8_t*)0x20000566 = 0; *(uint8_t*)0x20000567 = 0; *(uint8_t*)0x20000568 = 0; *(uint8_t*)0x20000569 = 0; *(uint8_t*)0x2000056a = 0; *(uint8_t*)0x2000056b = 0; *(uint8_t*)0x2000056c = 0; *(uint8_t*)0x2000056d = 0; *(uint8_t*)0x2000056e = 0; *(uint8_t*)0x2000056f = 0; *(uint8_t*)0x20000570 = 0; *(uint8_t*)0x20000571 = 0; *(uint8_t*)0x20000572 = 0; *(uint8_t*)0x20000573 = 0; *(uint8_t*)0x20000574 = 0; *(uint8_t*)0x20000575 = 0; *(uint8_t*)0x20000576 = 0; *(uint8_t*)0x20000577 = 0; *(uint8_t*)0x20000578 = 0; *(uint8_t*)0x20000579 = 0; *(uint8_t*)0x2000057a = 0; *(uint8_t*)0x2000057b = 0; *(uint8_t*)0x2000057c = 0; *(uint8_t*)0x2000057d = 0; *(uint8_t*)0x2000057e = 0; *(uint8_t*)0x2000057f = 0; *(uint8_t*)0x20000580 = 0; *(uint8_t*)0x20000581 = 0; *(uint8_t*)0x20000582 = 0; *(uint8_t*)0x20000583 = 0; *(uint8_t*)0x20000584 = 0; *(uint8_t*)0x20000585 = 0; *(uint8_t*)0x20000586 = 0; *(uint8_t*)0x20000587 = 0; *(uint8_t*)0x20000588 = 0; *(uint8_t*)0x20000589 = 0; *(uint8_t*)0x2000058a = 0; *(uint8_t*)0x2000058b = 0; *(uint8_t*)0x2000058c = 0; *(uint8_t*)0x2000058d = 0; *(uint8_t*)0x2000058e = 0; *(uint8_t*)0x2000058f = 0; *(uint8_t*)0x20000590 = 0; *(uint8_t*)0x20000591 = 0; *(uint8_t*)0x20000592 = 0; *(uint8_t*)0x20000593 = 0; *(uint8_t*)0x20000594 = 0; *(uint8_t*)0x20000595 = 0; *(uint8_t*)0x20000596 = 0; *(uint8_t*)0x20000597 = 0; *(uint8_t*)0x20000598 = 0; *(uint8_t*)0x20000599 = 0; *(uint8_t*)0x2000059a = 0; *(uint8_t*)0x2000059b = 0; *(uint8_t*)0x2000059c = 0; *(uint8_t*)0x2000059d = 0; *(uint8_t*)0x2000059e = 0; *(uint8_t*)0x2000059f = 0; *(uint8_t*)0x200005a0 = 0; *(uint8_t*)0x200005a1 = 0; *(uint8_t*)0x200005a2 = 0; *(uint8_t*)0x200005a3 = 0; *(uint8_t*)0x200005a4 = 0; *(uint8_t*)0x200005a5 = 0; *(uint8_t*)0x200005a6 = 0; *(uint8_t*)0x200005a7 = 0; *(uint8_t*)0x200005a8 = 0; *(uint8_t*)0x200005a9 = 0; *(uint8_t*)0x200005aa = 0; *(uint8_t*)0x200005ab = 0; *(uint8_t*)0x200005ac = 0; *(uint8_t*)0x200005ad = 0; *(uint8_t*)0x200005ae = 0; *(uint8_t*)0x200005af = 0; *(uint8_t*)0x200005b0 = 0; *(uint8_t*)0x200005b1 = 0; *(uint8_t*)0x200005b2 = 0; *(uint8_t*)0x200005b3 = 0; *(uint32_t*)0x200005b4 = 0; *(uint16_t*)0x200005b8 = 0x70; *(uint16_t*)0x200005ba = 0x98; *(uint32_t*)0x200005bc = 0; *(uint64_t*)0x200005c0 = 0; *(uint64_t*)0x200005c8 = 0; *(uint16_t*)0x200005d0 = 0x28; memcpy((void*)0x200005d2, "\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000", 29); *(uint8_t*)0x200005ef = 0; *(uint32_t*)0x200005f0 = 0xfffffffe; syscall(__NR_setsockopt, r[3], 0ul, 0x40ul, 0x200002c0ul, 0x338ul); break; } } int main(void) { syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0); loop(); return 0; }