// https://syzkaller.appspot.com/bug?id=efc234d0d3f0d6b900fe67b5334dc76cde55dbd4 // 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 #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 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; } #define MAX_FDS 30 static void setup_common() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setsid(); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } static int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static void drop_caps(void) { struct __user_cap_header_struct cap_hdr = {}; struct __user_cap_data_struct cap_data[2] = {}; cap_hdr.version = _LINUX_CAPABILITY_VERSION_3; cap_hdr.pid = getpid(); if (syscall(SYS_capget, &cap_hdr, &cap_data)) exit(1); const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE); cap_data[0].effective &= ~drop; cap_data[0].permitted &= ~drop; cap_data[0].inheritable &= ~drop; if (syscall(SYS_capset, &cap_hdr, &cap_data)) exit(1); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); setup_common(); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } loop(); exit(1); } 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 close_fds() { for (int fd = 3; fd < MAX_FDS; fd++) close(fd); } 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(); close_fds(); 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[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0x0}; void execute_one(void) { intptr_t res = 0; res = syscall(__NR_socket, 0x10ul, 3ul, 0); if (res != -1) r[0] = res; res = syscall(__NR_socket, 0x10ul, 3ul, 0); if (res != -1) r[1] = res; res = syscall(__NR_socket, 0x10ul, 0x803ul, 0); if (res != -1) r[2] = res; *(uint64_t*)0x200001c0 = 0; *(uint32_t*)0x200001c8 = 0; *(uint64_t*)0x200001d0 = 0x20000180; *(uint64_t*)0x20000180 = 0; *(uint64_t*)0x20000188 = 0; *(uint64_t*)0x200001d8 = 1; *(uint64_t*)0x200001e0 = 0; *(uint64_t*)0x200001e8 = 0; *(uint32_t*)0x200001f0 = 0; syscall(__NR_sendmsg, r[2], 0x200001c0ul, 0ul); *(uint32_t*)0x200002c0 = 0x14; res = syscall(__NR_getsockname, r[2], 0x20000100ul, 0x200002c0ul); if (res != -1) r[3] = *(uint32_t*)0x20000104; *(uint64_t*)0x20000240 = 0; *(uint32_t*)0x20000248 = 0; *(uint64_t*)0x20000250 = 0x20000140; *(uint64_t*)0x20000140 = 0x200003c0; memcpy((void*)0x200003c0, "\x38\x00\x00\x00\x24\x00\x07\x25\x00\x00\x00\x40\x07\xa2\xa3\x00\x05" "\x00\x00\x03", 20); *(uint32_t*)0x200003d4 = r[3]; memcpy((void*)0x200003d8, "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x09\x00\x01\x00\x68" "\x66\x73\x63\x00\x00\x00\x00\x08\x00\x02\x00\x00\x00\x00\x00", 32); *(uint64_t*)0x20000148 = 0x38; *(uint64_t*)0x20000258 = 1; *(uint64_t*)0x20000260 = 0; *(uint64_t*)0x20000268 = 0; *(uint32_t*)0x20000270 = 0; syscall(__NR_sendmsg, r[1], 0x20000240ul, 0ul); *(uint64_t*)0x20000200 = 0; *(uint32_t*)0x20000208 = 0; *(uint64_t*)0x20000210 = 0x20000180; *(uint64_t*)0x20000180 = 0x20000400; *(uint32_t*)0x20000400 = 0x8b8; *(uint16_t*)0x20000404 = 0x2c; *(uint16_t*)0x20000406 = 0xd2b; *(uint32_t*)0x20000408 = 0; *(uint32_t*)0x2000040c = 0; *(uint8_t*)0x20000410 = 0; *(uint8_t*)0x20000411 = 0; *(uint16_t*)0x20000412 = 0; *(uint32_t*)0x20000414 = r[3]; *(uint16_t*)0x20000418 = 7; *(uint16_t*)0x2000041a = 0; *(uint16_t*)0x2000041c = 0; *(uint16_t*)0x2000041e = 0; *(uint16_t*)0x20000420 = 0xfff1; *(uint16_t*)0x20000422 = 3; *(uint16_t*)0x20000424 = 8; *(uint16_t*)0x20000426 = 1; memcpy((void*)0x20000428, "bpf\000", 4); *(uint16_t*)0x2000042c = 0x18; *(uint16_t*)0x2000042e = 2; *(uint16_t*)0x20000430 = 6; *(uint16_t*)0x20000432 = 4; *(uint16_t*)0x20000434 = 1; *(uint16_t*)0x20000438 = 0xc; *(uint16_t*)0x2000043a = 5; *(uint16_t*)0x2000043c = 6; *(uint8_t*)0x2000043e = 0; *(uint8_t*)0x2000043f = 0; *(uint32_t*)0x20000440 = 0; *(uint16_t*)0x20000444 = 8; *(uint16_t*)0x20000446 = 0xb; *(uint32_t*)0x20000448 = 3; *(uint16_t*)0x2000044c = 0xb; *(uint16_t*)0x2000044e = 1; memcpy((void*)0x20000450, "cgroup\000", 7); *(uint16_t*)0x20000458 = 0x860; *(uint16_t*)0x2000045a = 2; *(uint16_t*)0x2000045c = 0x85c; *(uint16_t*)0x2000045e = 2; *(uint16_t*)0x20000460 = 0xc; *(uint16_t*)0x20000462 = 8; *(uint64_t*)0x20000464 = 4; *(uint16_t*)0x2000046c = 0x3c; *(uint16_t*)0x2000046e = 1; *(uint32_t*)0x20000470 = 8; *(uint32_t*)0x20000474 = 8; *(uint32_t*)0x20000478 = 0x3e; *(uint32_t*)0x2000047c = 6; *(uint32_t*)0x20000480 = 4; *(uint8_t*)0x20000484 = 0xec; *(uint8_t*)0x20000485 = 1; *(uint16_t*)0x20000486 = 3; *(uint16_t*)0x20000488 = 0x400; *(uint16_t*)0x2000048a = 0x800; *(uint32_t*)0x2000048c = 0; *(uint8_t*)0x20000490 = 2; *(uint8_t*)0x20000491 = 0; *(uint16_t*)0x20000492 = 0x5f64; *(uint16_t*)0x20000494 = 0; *(uint16_t*)0x20000496 = 4; *(uint32_t*)0x20000498 = 0x4c; *(uint32_t*)0x2000049c = 0x80000000; *(uint32_t*)0x200004a0 = 9; *(uint32_t*)0x200004a4 = 0xfffffffa; *(uint16_t*)0x200004a8 = 8; *(uint16_t*)0x200004aa = 5; *(uint32_t*)0x200004ac = 0x80; *(uint16_t*)0x200004b0 = 0x404; *(uint16_t*)0x200004b2 = 2; *(uint32_t*)0x200004b4 = 0x3f; *(uint32_t*)0x200004b8 = 0x26; *(uint32_t*)0x200004bc = 7; *(uint32_t*)0x200004c0 = 2; *(uint32_t*)0x200004c4 = 1; *(uint32_t*)0x200004c8 = 0x7f; *(uint32_t*)0x200004cc = 0xaba0; *(uint32_t*)0x200004d0 = 0x16; *(uint32_t*)0x200004d4 = 0x101; *(uint32_t*)0x200004d8 = 6; *(uint32_t*)0x200004dc = 8; *(uint32_t*)0x200004e0 = 0xf82; *(uint32_t*)0x200004e4 = 3; *(uint32_t*)0x200004e8 = 0x200; *(uint32_t*)0x200004ec = 4; *(uint32_t*)0x200004f0 = 3; *(uint32_t*)0x200004f4 = 0x15; *(uint32_t*)0x200004f8 = 0x80000000; *(uint32_t*)0x200004fc = 0x80000000; *(uint32_t*)0x20000500 = 0xec9; *(uint32_t*)0x20000504 = 0x8001; *(uint32_t*)0x20000508 = 8; *(uint32_t*)0x2000050c = 4; *(uint32_t*)0x20000510 = 2; *(uint32_t*)0x20000514 = 0x42b; *(uint32_t*)0x20000518 = 0xfffffe01; *(uint32_t*)0x2000051c = 2; *(uint32_t*)0x20000520 = 1; *(uint32_t*)0x20000524 = 0; *(uint32_t*)0x20000528 = 0x3ff; *(uint32_t*)0x2000052c = 0x158b; *(uint32_t*)0x20000530 = 2; *(uint32_t*)0x20000534 = -1; *(uint32_t*)0x20000538 = 0; *(uint32_t*)0x2000053c = 0x1f; *(uint32_t*)0x20000540 = 0x15c7; *(uint32_t*)0x20000544 = 6; *(uint32_t*)0x20000548 = 3; *(uint32_t*)0x2000054c = 6; *(uint32_t*)0x20000550 = 1; *(uint32_t*)0x20000554 = 1; *(uint32_t*)0x20000558 = 0x40; *(uint32_t*)0x2000055c = 0xfe7b; *(uint32_t*)0x20000560 = 6; *(uint32_t*)0x20000564 = 0xfffffffb; *(uint32_t*)0x20000568 = 0xff; *(uint32_t*)0x2000056c = 3; *(uint32_t*)0x20000570 = 0x14; *(uint32_t*)0x20000574 = 0xff; *(uint32_t*)0x20000578 = 8; *(uint32_t*)0x2000057c = 0xbb; *(uint32_t*)0x20000580 = 2; *(uint32_t*)0x20000584 = 0x1000; *(uint32_t*)0x20000588 = 0x1f; *(uint32_t*)0x2000058c = 0x101; *(uint32_t*)0x20000590 = 0x78; *(uint32_t*)0x20000594 = 6; *(uint32_t*)0x20000598 = 8; *(uint32_t*)0x2000059c = 2; *(uint32_t*)0x200005a0 = 0; *(uint32_t*)0x200005a4 = 0; *(uint32_t*)0x200005a8 = 0xfff; *(uint32_t*)0x200005ac = 0; *(uint32_t*)0x200005b0 = 8; *(uint32_t*)0x200005b4 = 8; *(uint32_t*)0x200005b8 = 2; *(uint32_t*)0x200005bc = 3; *(uint32_t*)0x200005c0 = 0x7fff; *(uint32_t*)0x200005c4 = 2; *(uint32_t*)0x200005c8 = 1; *(uint32_t*)0x200005cc = 6; *(uint32_t*)0x200005d0 = 0x10001; *(uint32_t*)0x200005d4 = 5; *(uint32_t*)0x200005d8 = 1; *(uint32_t*)0x200005dc = 3; *(uint32_t*)0x200005e0 = 0xe22; *(uint32_t*)0x200005e4 = 2; *(uint32_t*)0x200005e8 = 1; *(uint32_t*)0x200005ec = 0x10fe; *(uint32_t*)0x200005f0 = 0; *(uint32_t*)0x200005f4 = 0xf4c7; *(uint32_t*)0x200005f8 = 0x7f; *(uint32_t*)0x200005fc = 0; *(uint32_t*)0x20000600 = 0xffff; *(uint32_t*)0x20000604 = 0xa1; *(uint32_t*)0x20000608 = 9; *(uint32_t*)0x2000060c = 0x230; *(uint32_t*)0x20000610 = 0x80000001; *(uint32_t*)0x20000614 = 5; *(uint32_t*)0x20000618 = 0x8af; *(uint32_t*)0x2000061c = 0; *(uint32_t*)0x20000620 = 0x15; *(uint32_t*)0x20000624 = 4; *(uint32_t*)0x20000628 = 0xf8; *(uint32_t*)0x2000062c = 0x7c; *(uint32_t*)0x20000630 = 0x1010000; *(uint32_t*)0x20000634 = 9; *(uint32_t*)0x20000638 = 9; *(uint32_t*)0x2000063c = 0xee; *(uint32_t*)0x20000640 = 0xa4a2; *(uint32_t*)0x20000644 = 0x96; *(uint32_t*)0x20000648 = 4; *(uint32_t*)0x2000064c = 0xf2; *(uint32_t*)0x20000650 = 0x10000; *(uint32_t*)0x20000654 = 7; *(uint32_t*)0x20000658 = 0x79; *(uint32_t*)0x2000065c = 0x80000001; *(uint32_t*)0x20000660 = 6; *(uint32_t*)0x20000664 = 0x1b; *(uint32_t*)0x20000668 = 1; *(uint32_t*)0x2000066c = 1; *(uint32_t*)0x20000670 = 0x2d; *(uint32_t*)0x20000674 = 0x7fff; *(uint32_t*)0x20000678 = 0xff; *(uint32_t*)0x2000067c = 3; *(uint32_t*)0x20000680 = 9; *(uint32_t*)0x20000684 = 2; *(uint32_t*)0x20000688 = 0x7fffffff; *(uint32_t*)0x2000068c = 5; *(uint32_t*)0x20000690 = 0x81; *(uint32_t*)0x20000694 = 3; *(uint32_t*)0x20000698 = 8; *(uint32_t*)0x2000069c = 0; *(uint32_t*)0x200006a0 = 0x80000000; *(uint32_t*)0x200006a4 = 0xca; *(uint32_t*)0x200006a8 = 0xe2; *(uint32_t*)0x200006ac = -1; *(uint32_t*)0x200006b0 = 0x100; *(uint32_t*)0x200006b4 = 0x800; *(uint32_t*)0x200006b8 = 6; *(uint32_t*)0x200006bc = 9; *(uint32_t*)0x200006c0 = 3; *(uint32_t*)0x200006c4 = 6; *(uint32_t*)0x200006c8 = 1; *(uint32_t*)0x200006cc = 2; *(uint32_t*)0x200006d0 = 3; *(uint32_t*)0x200006d4 = 2; *(uint32_t*)0x200006d8 = 1; *(uint32_t*)0x200006dc = -1; *(uint32_t*)0x200006e0 = 1; *(uint32_t*)0x200006e4 = 6; *(uint32_t*)0x200006e8 = -1; *(uint32_t*)0x200006ec = 0xe53; *(uint32_t*)0x200006f0 = 6; *(uint32_t*)0x200006f4 = 3; *(uint32_t*)0x200006f8 = 0x40; *(uint32_t*)0x200006fc = 3; *(uint32_t*)0x20000700 = 4; *(uint32_t*)0x20000704 = 2; *(uint32_t*)0x20000708 = 0x101; *(uint32_t*)0x2000070c = 8; *(uint32_t*)0x20000710 = 0xfff; *(uint32_t*)0x20000714 = 0; *(uint32_t*)0x20000718 = 0x20; *(uint32_t*)0x2000071c = 0xfff; *(uint32_t*)0x20000720 = 1; *(uint32_t*)0x20000724 = 0x7ff; *(uint32_t*)0x20000728 = 0x61f701c5; *(uint32_t*)0x2000072c = 5; *(uint32_t*)0x20000730 = 3; *(uint32_t*)0x20000734 = 0x8000; *(uint32_t*)0x20000738 = 0x7fff; *(uint32_t*)0x2000073c = 2; *(uint32_t*)0x20000740 = 7; *(uint32_t*)0x20000744 = 0x81; *(uint32_t*)0x20000748 = 0xd87; *(uint32_t*)0x2000074c = 0xfffffffe; *(uint32_t*)0x20000750 = 0; *(uint32_t*)0x20000754 = 1; *(uint32_t*)0x20000758 = 0; *(uint32_t*)0x2000075c = 0; *(uint32_t*)0x20000760 = 0x3f; *(uint32_t*)0x20000764 = 7; *(uint32_t*)0x20000768 = 0x80000001; *(uint32_t*)0x2000076c = 0xfffffff7; *(uint32_t*)0x20000770 = 0xee; *(uint32_t*)0x20000774 = 3; *(uint32_t*)0x20000778 = 0x7b419f23; *(uint32_t*)0x2000077c = 8; *(uint32_t*)0x20000780 = 0; *(uint32_t*)0x20000784 = 0xd6; *(uint32_t*)0x20000788 = 2; *(uint32_t*)0x2000078c = 0x5f8f; *(uint32_t*)0x20000790 = 0; *(uint32_t*)0x20000794 = 0x6760; *(uint32_t*)0x20000798 = 0x400; *(uint32_t*)0x2000079c = 0; *(uint32_t*)0x200007a0 = 0xf5; *(uint32_t*)0x200007a4 = 1; *(uint32_t*)0x200007a8 = 2; *(uint32_t*)0x200007ac = 7; *(uint32_t*)0x200007b0 = 0x81; *(uint32_t*)0x200007b4 = 7; *(uint32_t*)0x200007b8 = 0xe830; *(uint32_t*)0x200007bc = 9; *(uint32_t*)0x200007c0 = 0x7f; *(uint32_t*)0x200007c4 = 0x40; *(uint32_t*)0x200007c8 = 0xffff; *(uint32_t*)0x200007cc = 7; *(uint32_t*)0x200007d0 = 0x80000001; *(uint32_t*)0x200007d4 = 0x5a; *(uint32_t*)0x200007d8 = 5; *(uint32_t*)0x200007dc = 3; *(uint32_t*)0x200007e0 = 0x20; *(uint32_t*)0x200007e4 = 0x326; *(uint32_t*)0x200007e8 = 0xfffffffe; *(uint32_t*)0x200007ec = 7; *(uint32_t*)0x200007f0 = 4; *(uint32_t*)0x200007f4 = 0x1ff; *(uint32_t*)0x200007f8 = 0x40adb99c; *(uint32_t*)0x200007fc = 8; *(uint32_t*)0x20000800 = 7; *(uint32_t*)0x20000804 = 0x101; *(uint32_t*)0x20000808 = 3; *(uint32_t*)0x2000080c = 9; *(uint32_t*)0x20000810 = 0x80000001; *(uint32_t*)0x20000814 = 7; *(uint32_t*)0x20000818 = 2; *(uint32_t*)0x2000081c = 5; *(uint32_t*)0x20000820 = 9; *(uint32_t*)0x20000824 = 0xf16; *(uint32_t*)0x20000828 = 0x1f9d; *(uint32_t*)0x2000082c = 0x80000001; *(uint32_t*)0x20000830 = 3; *(uint32_t*)0x20000834 = 0x33; *(uint32_t*)0x20000838 = 5; *(uint32_t*)0x2000083c = 0x5fb; *(uint32_t*)0x20000840 = 4; *(uint32_t*)0x20000844 = 0x2f; *(uint32_t*)0x20000848 = 0x3f; *(uint32_t*)0x2000084c = 7; *(uint32_t*)0x20000850 = 0x58a27c58; *(uint32_t*)0x20000854 = 0; *(uint32_t*)0x20000858 = 0xe7; *(uint32_t*)0x2000085c = 1; *(uint32_t*)0x20000860 = 0x7fff; *(uint32_t*)0x20000864 = 2; *(uint32_t*)0x20000868 = 7; *(uint32_t*)0x2000086c = 5; *(uint32_t*)0x20000870 = 7; *(uint32_t*)0x20000874 = 0x3f; *(uint32_t*)0x20000878 = 0x8000; *(uint32_t*)0x2000087c = 3; *(uint32_t*)0x20000880 = 4; *(uint32_t*)0x20000884 = 0x862; *(uint32_t*)0x20000888 = 0; *(uint32_t*)0x2000088c = 4; *(uint32_t*)0x20000890 = 2; *(uint32_t*)0x20000894 = 0xd8a; *(uint32_t*)0x20000898 = 0x5190; *(uint32_t*)0x2000089c = 0; *(uint32_t*)0x200008a0 = 0x40; *(uint32_t*)0x200008a4 = 9; *(uint32_t*)0x200008a8 = 0x401; *(uint32_t*)0x200008ac = 0x401; *(uint32_t*)0x200008b0 = 2; *(uint16_t*)0x200008b4 = 0x404; *(uint16_t*)0x200008b6 = 3; *(uint32_t*)0x200008b8 = 8; *(uint32_t*)0x200008bc = 6; *(uint32_t*)0x200008c0 = 0xa84; *(uint32_t*)0x200008c4 = 0x7fffffff; *(uint32_t*)0x200008c8 = 8; *(uint32_t*)0x200008cc = 0x10001; *(uint32_t*)0x200008d0 = 5; *(uint32_t*)0x200008d4 = 0; *(uint32_t*)0x200008d8 = 0x10000; *(uint32_t*)0x200008dc = 0xffff; *(uint32_t*)0x200008e0 = 0x2d; *(uint32_t*)0x200008e4 = 8; *(uint32_t*)0x200008e8 = 0xb9; *(uint32_t*)0x200008ec = 6; *(uint32_t*)0x200008f0 = 0xab79; *(uint32_t*)0x200008f4 = 4; *(uint32_t*)0x200008f8 = 7; *(uint32_t*)0x200008fc = 0x7fffffff; *(uint32_t*)0x20000900 = 0xfffff8f9; *(uint32_t*)0x20000904 = 0x81; *(uint32_t*)0x20000908 = 0; *(uint32_t*)0x2000090c = 9; *(uint32_t*)0x20000910 = 0xa0cf; *(uint32_t*)0x20000914 = 2; *(uint32_t*)0x20000918 = 0x10000; *(uint32_t*)0x2000091c = 9; *(uint32_t*)0x20000920 = 7; *(uint32_t*)0x20000924 = 1; *(uint32_t*)0x20000928 = 7; *(uint32_t*)0x2000092c = 3; *(uint32_t*)0x20000930 = 0; *(uint32_t*)0x20000934 = 0x1fa2; *(uint32_t*)0x20000938 = 0xed0; *(uint32_t*)0x2000093c = 6; *(uint32_t*)0x20000940 = 9; *(uint32_t*)0x20000944 = 0x1000; *(uint32_t*)0x20000948 = 7; *(uint32_t*)0x2000094c = 0x20; *(uint32_t*)0x20000950 = 0xff; *(uint32_t*)0x20000954 = 0x1ff; *(uint32_t*)0x20000958 = 0x8001; *(uint32_t*)0x2000095c = 0xd6; *(uint32_t*)0x20000960 = 0x1f; *(uint32_t*)0x20000964 = 0x10001; *(uint32_t*)0x20000968 = 6; *(uint32_t*)0x2000096c = 8; *(uint32_t*)0x20000970 = 0x16e; *(uint32_t*)0x20000974 = 4; *(uint32_t*)0x20000978 = 6; *(uint32_t*)0x2000097c = 0; *(uint32_t*)0x20000980 = 2; *(uint32_t*)0x20000984 = 0x200; *(uint32_t*)0x20000988 = 0x7ff; *(uint32_t*)0x2000098c = 0; *(uint32_t*)0x20000990 = 9; *(uint32_t*)0x20000994 = 7; *(uint32_t*)0x20000998 = 7; *(uint32_t*)0x2000099c = 6; *(uint32_t*)0x200009a0 = 0x81000; *(uint32_t*)0x200009a4 = 0; *(uint32_t*)0x200009a8 = 7; *(uint32_t*)0x200009ac = 6; *(uint32_t*)0x200009b0 = 0x7f; *(uint32_t*)0x200009b4 = 8; *(uint32_t*)0x200009b8 = 0x401; *(uint32_t*)0x200009bc = 0x10000; *(uint32_t*)0x200009c0 = 0; *(uint32_t*)0x200009c4 = 0xc0f; *(uint32_t*)0x200009c8 = 0x401; *(uint32_t*)0x200009cc = 6; *(uint32_t*)0x200009d0 = 1; *(uint32_t*)0x200009d4 = 8; *(uint32_t*)0x200009d8 = 9; *(uint32_t*)0x200009dc = 8; *(uint32_t*)0x200009e0 = 0x80; *(uint32_t*)0x200009e4 = 0xee; *(uint32_t*)0x200009e8 = 9; *(uint32_t*)0x200009ec = 0x1f; *(uint32_t*)0x200009f0 = 0x7fffffff; *(uint32_t*)0x200009f4 = 0x557; *(uint32_t*)0x200009f8 = 0; *(uint32_t*)0x200009fc = 0x81; *(uint32_t*)0x20000a00 = 0; *(uint32_t*)0x20000a04 = 2; *(uint32_t*)0x20000a08 = 8; *(uint32_t*)0x20000a0c = 0; *(uint32_t*)0x20000a10 = 8; *(uint32_t*)0x20000a14 = 0xfff; *(uint32_t*)0x20000a18 = 0x100; *(uint32_t*)0x20000a1c = 5; *(uint32_t*)0x20000a20 = 7; *(uint32_t*)0x20000a24 = 5; *(uint32_t*)0x20000a28 = 4; *(uint32_t*)0x20000a2c = 5; *(uint32_t*)0x20000a30 = 0x20; *(uint32_t*)0x20000a34 = 0xfffffffd; *(uint32_t*)0x20000a38 = 7; *(uint32_t*)0x20000a3c = 0x1000; *(uint32_t*)0x20000a40 = 4; *(uint32_t*)0x20000a44 = 6; *(uint32_t*)0x20000a48 = 0x2aa; *(uint32_t*)0x20000a4c = 2; *(uint32_t*)0x20000a50 = 0x10001; *(uint32_t*)0x20000a54 = 0xfffffffd; *(uint32_t*)0x20000a58 = 2; *(uint32_t*)0x20000a5c = 0xc9f5; *(uint32_t*)0x20000a60 = 7; *(uint32_t*)0x20000a64 = 0x1f; *(uint32_t*)0x20000a68 = 0xb6a7; *(uint32_t*)0x20000a6c = 4; *(uint32_t*)0x20000a70 = 0x7ff; *(uint32_t*)0x20000a74 = 9; *(uint32_t*)0x20000a78 = 0x3f; *(uint32_t*)0x20000a7c = 0xa4c; *(uint32_t*)0x20000a80 = 0; *(uint32_t*)0x20000a84 = 0xfff; *(uint32_t*)0x20000a88 = 9; *(uint32_t*)0x20000a8c = 4; *(uint32_t*)0x20000a90 = 0xd5cc; *(uint32_t*)0x20000a94 = 0x40; *(uint32_t*)0x20000a98 = 7; *(uint32_t*)0x20000a9c = 0x7ff; *(uint32_t*)0x20000aa0 = 4; *(uint32_t*)0x20000aa4 = 8; *(uint32_t*)0x20000aa8 = 1; *(uint32_t*)0x20000aac = 7; *(uint32_t*)0x20000ab0 = 0xff; *(uint32_t*)0x20000ab4 = 4; *(uint32_t*)0x20000ab8 = 0x100; *(uint32_t*)0x20000abc = 0xb0e; *(uint32_t*)0x20000ac0 = 0x8001; *(uint32_t*)0x20000ac4 = 0x6d37; *(uint32_t*)0x20000ac8 = 9; *(uint32_t*)0x20000acc = 4; *(uint32_t*)0x20000ad0 = 6; *(uint32_t*)0x20000ad4 = 0x80; *(uint32_t*)0x20000ad8 = 2; *(uint32_t*)0x20000adc = 0x400; *(uint32_t*)0x20000ae0 = 2; *(uint32_t*)0x20000ae4 = 3; *(uint32_t*)0x20000ae8 = 8; *(uint32_t*)0x20000aec = 3; *(uint32_t*)0x20000af0 = 0x2cfa; *(uint32_t*)0x20000af4 = 4; *(uint32_t*)0x20000af8 = 5; *(uint32_t*)0x20000afc = 0x7ff; *(uint32_t*)0x20000b00 = 0xff; *(uint32_t*)0x20000b04 = 5; *(uint32_t*)0x20000b08 = 0x9c; *(uint32_t*)0x20000b0c = 9; *(uint32_t*)0x20000b10 = 9; *(uint32_t*)0x20000b14 = 0x9c0; *(uint32_t*)0x20000b18 = 0xffff73ea; *(uint32_t*)0x20000b1c = 0x401; *(uint32_t*)0x20000b20 = 0x4b; *(uint32_t*)0x20000b24 = 3; *(uint32_t*)0x20000b28 = -1; *(uint32_t*)0x20000b2c = 0x80000001; *(uint32_t*)0x20000b30 = 0xca; *(uint32_t*)0x20000b34 = 3; *(uint32_t*)0x20000b38 = -1; *(uint32_t*)0x20000b3c = 6; *(uint32_t*)0x20000b40 = 3; *(uint32_t*)0x20000b44 = 5; *(uint32_t*)0x20000b48 = 1; *(uint32_t*)0x20000b4c = 0; *(uint32_t*)0x20000b50 = 0x80; *(uint32_t*)0x20000b54 = 0x3ff; *(uint32_t*)0x20000b58 = 5; *(uint32_t*)0x20000b5c = 0x8000; *(uint32_t*)0x20000b60 = 0x7fff; *(uint32_t*)0x20000b64 = 0xf811e65; *(uint32_t*)0x20000b68 = 0x1682; *(uint32_t*)0x20000b6c = 0x1000; *(uint32_t*)0x20000b70 = 7; *(uint32_t*)0x20000b74 = 1; *(uint32_t*)0x20000b78 = 2; *(uint32_t*)0x20000b7c = 0x80; *(uint32_t*)0x20000b80 = 5; *(uint32_t*)0x20000b84 = 0x4c6c; *(uint32_t*)0x20000b88 = 8; *(uint32_t*)0x20000b8c = 0x61; *(uint32_t*)0x20000b90 = 5; *(uint32_t*)0x20000b94 = 0x80; *(uint32_t*)0x20000b98 = 0x80000001; *(uint32_t*)0x20000b9c = 6; *(uint32_t*)0x20000ba0 = 1; *(uint32_t*)0x20000ba4 = 0x6d; *(uint32_t*)0x20000ba8 = 0x401; *(uint32_t*)0x20000bac = 0x3ff; *(uint32_t*)0x20000bb0 = 2; *(uint32_t*)0x20000bb4 = 0x200; *(uint32_t*)0x20000bb8 = 0x401; *(uint32_t*)0x20000bbc = 9; *(uint32_t*)0x20000bc0 = 5; *(uint32_t*)0x20000bc4 = 0; *(uint32_t*)0x20000bc8 = 0xfffffff9; *(uint32_t*)0x20000bcc = 6; *(uint32_t*)0x20000bd0 = 0; *(uint32_t*)0x20000bd4 = 3; *(uint32_t*)0x20000bd8 = 0xb89; *(uint32_t*)0x20000bdc = 9; *(uint32_t*)0x20000be0 = 0xe40f; *(uint32_t*)0x20000be4 = 3; *(uint32_t*)0x20000be8 = 2; *(uint32_t*)0x20000bec = 3; *(uint32_t*)0x20000bf0 = 0xfff; *(uint32_t*)0x20000bf4 = 0x3d00000; *(uint32_t*)0x20000bf8 = 2; *(uint32_t*)0x20000bfc = 1; *(uint32_t*)0x20000c00 = 0xce; *(uint32_t*)0x20000c04 = 0x1f; *(uint32_t*)0x20000c08 = 7; *(uint32_t*)0x20000c0c = 4; *(uint32_t*)0x20000c10 = 5; *(uint32_t*)0x20000c14 = 0x6329387e; *(uint32_t*)0x20000c18 = 2; *(uint32_t*)0x20000c1c = 0x9a; *(uint32_t*)0x20000c20 = 0x8001; *(uint32_t*)0x20000c24 = 7; *(uint32_t*)0x20000c28 = 0xc7d; *(uint32_t*)0x20000c2c = 3; *(uint32_t*)0x20000c30 = 0x9000000; *(uint32_t*)0x20000c34 = 6; *(uint32_t*)0x20000c38 = 0x10001; *(uint32_t*)0x20000c3c = 0xa30d; *(uint32_t*)0x20000c40 = 0x2eb2; *(uint32_t*)0x20000c44 = 9; *(uint32_t*)0x20000c48 = 0x400; *(uint32_t*)0x20000c4c = 0x5d5; *(uint32_t*)0x20000c50 = 5; *(uint32_t*)0x20000c54 = 0x3f; *(uint32_t*)0x20000c58 = 0xd7d; *(uint32_t*)0x20000c5c = 0x40; *(uint32_t*)0x20000c60 = 0xb050; *(uint32_t*)0x20000c64 = 4; *(uint32_t*)0x20000c68 = 1; *(uint32_t*)0x20000c6c = 7; *(uint32_t*)0x20000c70 = 0x7ff; *(uint32_t*)0x20000c74 = 0xfffffffc; *(uint32_t*)0x20000c78 = 0; *(uint32_t*)0x20000c7c = 0x540; *(uint32_t*)0x20000c80 = 0; *(uint32_t*)0x20000c84 = 2; *(uint32_t*)0x20000c88 = 0x100; *(uint32_t*)0x20000c8c = 0x1f; *(uint32_t*)0x20000c90 = 0x400000; *(uint32_t*)0x20000c94 = 0x3ff; *(uint32_t*)0x20000c98 = 0x7f; *(uint32_t*)0x20000c9c = 1; *(uint32_t*)0x20000ca0 = 0xac4b; *(uint32_t*)0x20000ca4 = 6; *(uint32_t*)0x20000ca8 = 5; *(uint32_t*)0x20000cac = 0x10001; *(uint32_t*)0x20000cb0 = 0x2000000; *(uint32_t*)0x20000cb4 = 0x27; *(uint64_t*)0x20000188 = 0x8b8; *(uint64_t*)0x20000218 = 1; *(uint64_t*)0x20000220 = 0; *(uint64_t*)0x20000228 = 0; *(uint32_t*)0x20000230 = 0; syscall(__NR_sendmsg, r[0], 0x20000200ul, 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); do_sandbox_none(); return 0; }