// https://syzkaller.appspot.com/bug?id=6625234933e74cf3bcf9bfdd8abfa0160d704cc5 // 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 #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 #include #include #include #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 void exitf(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(kRetryStatus); } 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; } static void use_temporary_dir() { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) fail("failed to mkdtemp"); if (chmod(tmpdir, 0777)) fail("failed to chmod"); if (chdir(tmpdir)) fail("failed to chdir"); } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); setsid(); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 128 << 20; setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 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); #define CLONE_NEWCGROUP 0x02000000 unshare(CLONE_NEWNS); unshare(CLONE_NEWIPC); unshare(CLONE_NEWCGROUP); unshare(CLONE_NEWNET); unshare(CLONE_NEWUTS); unshare(CLONE_SYSVSEM); } 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) { close(fd); return false; } close(fd); return true; } static int real_uid; static int real_gid; __attribute__((aligned(64 << 10))) static char sandbox_stack[1 << 20]; static int namespace_sandbox_proc(void* arg) { sandbox_common(); write_file("/proc/self/setgroups", "deny"); if (!write_file("/proc/self/uid_map", "0 %d 1\n", real_uid)) fail("write of /proc/self/uid_map failed"); if (!write_file("/proc/self/gid_map", "0 %d 1\n", real_gid)) fail("write of /proc/self/gid_map failed"); if (mkdir("./syz-tmp", 0777)) fail("mkdir(syz-tmp) failed"); if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) fail("mount(tmpfs) failed"); if (mkdir("./syz-tmp/newroot", 0777)) fail("mkdir failed"); if (mkdir("./syz-tmp/newroot/dev", 0700)) fail("mkdir failed"); if (mount("/dev", "./syz-tmp/newroot/dev", NULL, MS_BIND | MS_REC | MS_PRIVATE, NULL)) fail("mount(dev) failed"); if (mkdir("./syz-tmp/newroot/proc", 0700)) fail("mkdir failed"); if (mount(NULL, "./syz-tmp/newroot/proc", "proc", 0, NULL)) fail("mount(proc) failed"); if (mkdir("./syz-tmp/pivot", 0777)) fail("mkdir failed"); if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { if (chdir("./syz-tmp")) fail("chdir failed"); } else { if (chdir("/")) fail("chdir failed"); if (umount2("./pivot", MNT_DETACH)) fail("umount failed"); } if (chroot("./newroot")) fail("chroot failed"); if (chdir("/")) fail("chdir failed"); 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)) fail("capget failed"); cap_data[0].effective &= ~(1 << CAP_SYS_PTRACE); cap_data[0].permitted &= ~(1 << CAP_SYS_PTRACE); cap_data[0].inheritable &= ~(1 << CAP_SYS_PTRACE); if (syscall(SYS_capset, &cap_hdr, &cap_data)) fail("capset failed"); loop(); doexit(1); } static int do_sandbox_namespace(int executor_pid, bool enable_tun) { int pid; real_uid = getuid(); real_gid = getgid(); mprotect(sandbox_stack, 4096, PROT_NONE); pid = clone(namespace_sandbox_proc, &sandbox_stack[sizeof(sandbox_stack) - 64], CLONE_NEWUSER | CLONE_NEWPID, NULL); if (pid < 0) fail("sandbox clone failed"); return pid; } static void remove_dir(const char* dir) { DIR* dp; struct dirent* ep; int iter = 0; retry: dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exitf("opendir(%s) failed due to NOFILE, exiting"); } exitf("opendir(%s) failed", dir); } while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exitf("lstat(%s) failed", filename); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exitf("unlink(%s) failed", filename); if (umount2(filename, MNT_DETACH)) exitf("umount(%s) failed", filename); } } closedir(dp); int i; for (i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, MNT_DETACH)) exitf("umount(%s) failed", dir); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exitf("rmdir(%s) failed", dir); } } static void test(); void loop() { int iter; for (iter = 0;; iter++) { char cwdbuf[256]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) fail("failed to mkdir"); int pid = fork(); if (pid < 0) fail("loop fork failed"); if (pid == 0) { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); if (chdir(cwdbuf)) fail("failed to chdir"); 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; } } remove_dir(cwdbuf); } } #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_socketpair #define __NR_socketpair 360 #endif #ifndef __NR_socket #define __NR_socket 359 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 366 #endif #ifndef __NR_sendto #define __NR_sendto 369 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 long r[7]; void* thr(void* arg) { switch ((long)arg) { case 0: r[0] = syscall(__NR_mmap, 0x20000000ul, 0x3000ul, 0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul); break; case 1: r[1] = syscall(__NR_socketpair, 0x2ul, 0x5ul, 0x84ul, 0x20001ff8ul); break; case 2: r[2] = syscall(__NR_socket, 0x2ul, 0x2ul, 0x0ul); break; case 3: memcpy((void*)0x20000000, "\x06\x00\x00\x00\xee\x2c\xc1\xed\xde\x9e\xe7\xb9\x1f\x3a" "\xd4\xe6\x90\xb0\x1c\x00\x80\x00\x56\x9c\xa3\x3a\x5c\x00" "\x00\x00\x00\x80\x00\x00\x01\x41\x05\x1a\x91\x81\x57\x69" "\xd7\x46\x7c\x3b\x19\x43\x96\x5c\xb5\xf7\x75\x22\x8d\xa1" "\x08\xfe\xb3\x85\x00\x1e\x0b\x5d\x03\xc3\xa5\xb3", 68); r[4] = syscall(__NR_setsockopt, r[2], 0x0ul, 0x489ul, 0x20000000ul, 0x44ul); break; case 4: memcpy( (void*)0x20000000, "\x1a\x51\xe6\x08\x6a\x20\xb0\x96\x05\x18\xdf\xd9\x9d\xd0\xa4" "\xc3\x9b\xb8\x4b\x4b\x31\x5c\x26\xf1\x08\x49\x9e\x1e\xa1\xdc" "\x07\xf7\x0d\x3a\x2f\x7a\x90\xd0\xda\x4d\x55\xa8\xd3\x6c\xb7" "\xa9\x23\x05\x74\xfd\x35\x42\xfd\x48\x28\xb6\xb9\x98\xb2\x42" "\x5a\x15\x09\x53\x03\xde\x1f\xc0\x35\x5d\xf8\xd8\xba\xfc\xc8" "\xe2\xa0\x91\x92\x44\xdf\x55\x6e\x64\x8c\xc9\xce\xc1\x30\x4c" "\x24\xf3\x36\x5b\x34\xe9\xa8\x1b\x5a\x12\xb0\x52\x49\x40\x77" "\x28\x81\x65\x1f\x2c\xdc\x59\x93\xd1\x02\x6d\xf5\xb7\xa7\x9a" "\x6e\x18\x0d\x1a\x3e\x6f\x98\xd4\x69\x5d\xd4\xc6\x95\xb5\xf1" "\x86\x5b\xd1\xea\xde\x5f\x74\xe0\x02\x33\x51\x85\x08\xe3\x61" "\x5e\xe6\x80\xb9\x02\x9e\xe1\xbf\x6e\x23\x6e\x2a\xcd\x5f\xac" "\x88\xb2\x2a\x32\x77\x14\xc8\x52\xef\x08\xb5\x18\x88\xe0\x37" "\x6a\xd1\x93\x36\xb1\x63\x9c\x37\xb5\xbd\x6f\x40\xa6\xec\xf5" "\xd3\xd1\xce\x1e\x80\x86\x43\xa5\x9d\x1c\x97\xc5\x1f\x90\xb9" "\x85\x57\x1d\xb0\x52\xa8\x27\xa6\xef\x79\x19\x1f\xc8\x91\xe9" "\x07\x4d\x8d\x47\xf0\xa8\x3d\xe8\xa7\x9f\x21\x66\x37\xad\xe3" "\x0e\x70\x45\x08\x19\x54\x43\x86\xc3\x33\xac\x4d\xff\xc4\xeb" "\xbd\x78\xee\xd4\x9d\x9e\x81\xf5\xd1\x18\x6a\xc2\x65\x06\xbd" "\xb8\xab\xed\x17\xf5\x09\x48\xc6\xc5\x98\xd4\x62\x17\x72\xd8" "\xa1\x0a\x9b\x60\x9d\x7b\x0a\x5e\xc2\xc7\xf9\xfd\xe0\x32\xe0" "\x49\x10\xd0\x49\xb3\xaa\x1d\x32\x5e\x2b\xeb\xcc\x69\x24\x8e" "\x80\xc6\x76\x0c\xe9\xd9\x6f\xea\x43\x41\x66\xdf\x34\xd8\xad" "\x24\x25\xbb\x99\x49\xde\x37\x8a\x25\x71\xe0\x0d\xef\x0a\xd5" "\xc0\xf7\x36\x0d\x01\x18\x99\x41\xa2\x56\x13\x6a\x50\xdc\x8f" "\x27\x8b\x81\xef\x7e\xb7\x5f\x10\x39\xe5\x48\x7f\x9b\x72\xe6" "\x20\x08\x28\xab\xb7\x4f\x4f\xb0\x26\x6a\x78\x6b\x6b\x53\x8c" "\x9b\x87\x7f\xf3\xa4\x3d\xbe\x1b\xb0\x6c\xd5\x0f\x08\xc1\x86" "\x85\x7e\x89\x4e\xea\xa6\x0e\xad\xad\xe5\x62\x7d\x8f\x0d\x27" "\x5a\xba\x68\x44\x1d\x1a\xa1\x96\xe4\xa9\xb7\x22\x10\xbf\x23" "\xa6\xe9\xdd\x9a\xf9\xbd\x9d\xeb\x0e\x72\x4e\x76\xec\x16\x40" "\xda\xe3\x30\xd8\xf4\xd1\xec\x29\x6c\x45\xc3\x5f\x4f\x31\xca" "\xd7\x46\x1e\x02\xae\x7c\x61\x2c\x67\x23\x87\xf5\x89\xd9\x97" "\x0e\xc4\x58\x0f\x2b\xb9\xb7\x9b\xe2\xa1\x88\x00\x81\xb8\x25" "\x3c\x08\xc9\x19\x47\x45\x03\x80\xbf\x1c\xc6\x35\x6f\xff\x16" "\x30\x86\xd0\xd4\x3c\x5a\xa5\x47\x02\x08\xc2\x21\xd1\xe0\xb0" "\x0a\xad\x20\x96\x33\x67\x0b\xb3\xec\x0b\x73\x5a\x2a\x3a\xcc" "\x8f\xfa\x69\x35\x73\x99\x28\xfe\xd5\x49\x65\xea\xe3\xb1\x3e" "\xd9\xe2\xf9\x6b\xc2\x5b\x9d\xc3\xcd\x78\x59\x14\xd5\x1b\x67" "\xf5\x58\x83\x7d\xfb\xa6\xdb\xd3\x65\x90\xf3\x01\xf3\x09\x6b" "\xd2\x58\x1a\xa7\x9f\x98\xcb\xf1\x5a\xa2\x0b\x8a\xc1\xab\x97" "\xc8\x77\xf5\xd0\x94\xbf\xc4\x63\x2f\x1e\x93\x90\x91\x91\xa4" "\xf4\x22\xb4\x99\x95\x06\xb2\xc4\xb4\x52\x8d\xed\x87\x70\x90" "\x41\xe5\xd9\xc5\xaa\x22\xcb\x85\xaf\x6c\x4b\x69\x5f\xd8\x50" "\x75\xbf\x3c\xc8\xdb\x94\x63\x60\x72\x55\x25\x24\x9f\xba\x68" "\xb4\x7c\x43\x54\x1f\x31\x35\xff\x53\xc7\x6f\xb3\x4b\xf5\xcf" "\x3e\x1e\x7e\x5d\x38\x86\x17\xcd\x47\x9f\x40\xf1\xc5\xb7\xec" "\xf3\x99\xf0\x29\x7c\x98\x91\x41\x0e\xd8\xf2\x19\x93\x60\x3d" "\x6b\xd2\xd4\xf8\x33\x1e\x12\x22\x3f\x03\x0b\x3a\x4f\xa8\x0a" "\xbe\x19\xae\xcf\x9a\xd8\x73\x62\xea\xfa\x44\xaa\xb4\x5c\x34" "\xb8\x8e\x9f\x9e\xdb\xd3\xf4\x34\xd8\x32\x16\x45\x82\xfc\xd5" "\x8b\x0d\xe9\x94\xcc\x3b\x71\x8a\x9f\x38\x55\xe4\x40\x6a\xbf" "\xf0\xdc\x93\x66\xd6\x29\xc6\xcf\xf8\x2e\xb2\x36\x30\x8e\x87" "\x5f\x08\xcb\x48\x0e\xb0\x0b\xa6\x2b\x39\x7e\xb3\x6b\x5f\x58" "\x86\x9d\x20\x4b\x53\x0d\x8b\x07\x38\xd9\xd1\x6d\x92\xb6\x00" "\xc7\x56\x63\x54\x19\xfa\xee\xf8\xf0\x45\xae\x28\xf1\x8d\x90" "\xd2\x2b\x57\xf9\xaa\x8b\x55\xc9\xa8\x2b\x0a\xbe\x21\x96\xfc" "\x7d\xbb\x89\x5c\x90\x31\x60\x09\x17\x20\xdc\x7f\xe4\x37\x88" "\xb7\x3c\x17\x20\x57\xde\x93\x5c\x10\xb9\xc5\xf8\x41\x8d\x80" "\x92\xc3\x02\x8a\xdd\xfc\x8d\x4d\x6b\xb1\x7b\x25\x28\xdb\x57" "\x56\x2a\x78\x57\x3a\x27\x71\x36\x10\x4d\x24\x52\xce\x98\x4b" "\x49\x37\x8a\x3f\xc5\x0c\xa6\xf4\x32\x9b\xcf\x62\x17\x68\x9b" "\xbe\x03\x3b\x42\x29\x60\x56\x5c\x5a\xd9\x6d\x5b\x2e\x94\x0e" "\xe2\xfb\xce\x94\xb0\x1b\x01\x44\x57\xf1\x98\x9c\xa6\xa7\x3e" "\x71\x67\xb0\x4b\x0e\x89\x33\xf8\x7e\x4d\xda\x48\xb7\xda\x33" "\x67\x0d\xff\x5d\xe9\xcc\xb8\xa3\x24\x12\x30\x8c\x8f\x51\x2a" "\xcd\x45\x86\xea\x6d\x46\xde\x53\x26\x3a\xce\xf6\x52\x5a\xeb" "\x75\x12\x82\x29\x84\x02\x5b\x35\x5f\xf3\x55\x8e\x38\x02\xc5" "\x65\xc8\x0a\xc7\x97\x60\x24\x60\x51\x7d\x83\xc3\xd9\x25\xf3" "\x2f\xe1\x37\x09\x9c\xf6\xbc\x27\xf6\xd9\xcf\xbc\x52\xf7\x7a" "\x25\x13\x77\x13\xec\x53\x89\x7d\x12\xa3\x69\xf1\xec\x50\x22" "\x3f\x01\xd6\xd6\xf4\xe1\x89\xe8\x94\x3c\x7e\x1f\x0a\x6a\xdd" "\xd8\xa5\x1b\xe6\xec\x51\x16\x2a\x53\xaa\x0a\xe7\x56\x32\x99" "\xf9\xd9\x87\xbc\xe0\x3d\xec\x28\xbf\x46\x08\x1c\xff\x66\xc4" "\xd3\x2f\x19\xd3\xad\x10\x1e\xe6\x94\x1e\xe3\xf0\x71\x0e\x3e" "\xe0\xb3\xc2\xb2\x2b\x89\x72\xc0\xb7\x31\xde\x53\x7a\x82\xc6" "\xe7\x3f\x4b\xd8\x0e\xf8\xd1\x62\x8c\xb4\xf3\x43\x21\xd0\xab" "\x2d\x98\xf3\xed\xee\x3c\x57\x6c\xf6\xf6\x82\xde\x4a\xa3\x23" "\xfe\x24\xbd\x40\x0d\x2a\x95\x14\x09\x6b\xa2\xd2\xa8\xc2\x15" "\x9c\x10\xa5\x5d\x0d\xa6\xa6\xba\x64\x2a\x71\x2e\x42\xaa\x36" "\x7c\xf8\x8e\xc0\xf7\x45\xad\xfc\xb9\x70\x04\xfa\x72\x38\x4c" "\x89\x36\x1a\x6d\xbc\x7a\x2b\x78\x93\xf7\x14\xec\xb0\x5c\x00" "\xd6\xc5\xd1\x02\xf8\x41\xf0\x02\xac\xe7\x91\x13\x53\x8c\x0c" "\x6c\x2c\xc0\x54\x95\x70\xee\x2a\xb1\x91\x69\xce\x35\xfc\x12" "\x3e\xbe\x75\x36\xa5\x5e\x3b\xe2\x06\x1a\x1b\x02\xce\x31\x57" "\xc5\xb0\x10\x99\xb2\x3d\x92\x38\x7e\x9f\x8a\x7f\x25\x8b\x8e" "\x8b\xca\x35\x19\x14\x00\x97\xd5\x7f\xa3\xbd\x8a\x04\x9a\x90" "\x20\xc4\x33\x21\xa6\xef\xf6\x90\x8f\xac\x50\x72\x72\x60\xfe" "\x61\xcf\x6d\x3e\xa7\xd7\x51\x57\x25\x5e\x75\x45\xc2\x7b\x14" "\x2b\x53\x2e\x7a\x50\x7f\xe0\xb3\xfa\x38\xb8\x2f\x15\xf2\x82" "\xf4\x65\x21\x82\x5a\x77\x1b\xa5\xdf\xb6\xc8\x2f\x7d\xfe\x1b" "\x2e\x65\xb0\x3e\x5b\x84\x92\x6b\x4b\xd5\xbd\x8c\x82\x79\xa7" "\x9f\x9e\x19\xb7\x6f\x83\x93\x9d\xec\xb2\x4d\x6a\x47\xa9\xbf" "\x69\x3c\xf1\x17\xe3\x51\x3a\x8a\x91\x3d\x09\xc6\xe2\xea\xf9" "\xa6\xbb\x44\x9a\xab\xaa\x30\x95\x95\xf1\xae\xdf\xc1\x7e\x4b" "\x5a\xaa\x7c\x9a\x2a\xa9\xed\xb5\x93\xbb\xc1\x10\xf0\x71\xd6" "\x3b\xe9\xd1\x26\x16\x4a\xd1\xe0\x55\xed\x0d\xb4\xf7\xf7\x9c" "\x51\xee\x20\x5a\x32\x3b\x5a\x8a\x62\x2f\x17\xf5\x5b\xd2\x37" "\x59\xca\x12\xfb\xdd\xc5\x49\xae\x81\xc5\x1c\x11\x4f\x97\x57" "\x82\xf2\x12\x81\x77\xa7\xed\x4f\x3d\x2e\x03\x70\xf3\xa1\x3a" "\x1c\x0d\x7b\xfb\xed\xad\x59\x4f\x6b\x69\x59\xe7\x0f\x03\x49" "\x64\xda\x31\xbe\xfb\x58\xa0\xde\xa8\x79\x69\x77\x9d\x10\xc3" "\x68\x98\xe1\xa1\xd5\xde\xd1\x64\x62\x76\x24\x2f\x7b\x72\x5f" "\x29\x0b\xc4\x21\xdf\xa5\xa8\x94\x38\x60\xcc\x2e\xba\x8c\xc3" "\x7c\x7c\x26\x28\x71\xdc\x57\x86\x67\x47\x21\x8d\x2c\xf0\x82" "\x82\xe8\x6b\x69\x7c\x0d\x54\x0e\xfd\xf6\xee\x78\x79\x09\x16" "\x96\x72\x2f\xed\x5f\xbe\x69\x74\x1c\xd7\x42\x93\xa4\x54\x98" "\xe8\xb6\xe2\x22\xa5\x89\x65\xc6\x92\x63\xdd\x7f\x3a\x14\x65" "\x74\xe5\xd7\x83\x9e\x24\x48\xbf\x40\x25\x6d\x76\x17\xed\x8f" "\xcf\x7c\x9f\xf2\x3e\xd5\x32\x8b\x65\xc9\x75\xe7\xcb\x79\xb3" "\x78\x53\x76\x5c\xf1\x10\x32\x94\x97\x0a\xb1\xd9\x05\xd7\xe7" "\x59\x4d\x29\x5b\x29\x41\x3a\x23\x53\x11\x60\x86\x1f\x93\xaf" "\x77\x26\x78\xc6\xc6\xaf\x78\x83\x50\x4c\x7b\x82\x42\xc5\x0a" "\x14\x28\x55\x41\x00\xaf\x34\x24\x83\x75\x72\x74\xf8\xad\x38" "\xaf\xb7\xdf\x57\xe8\x38\xea\xea\x79\xea\xb3\x02\xfd\x2c\x9b" "\x8b\x15\x7f\x41\x5f\x2f\x99\x12\xee\x1d\x3d\x8d\xb8\x89\xb6" "\x13\x04\x15\xac\x44\x94\xc2\xc4\x05\x94\x86\x90\xbd\xee\x74" "\xdb\x4b\x4a\xc6\x13\xe3\x2c\xa5\x40\xe0\x3c\x2c\x6b\x5a\xdd" "\xea\x98\xbd\xfa\x58\x1f\x1f\xeb\xd2\x16\x90\x79\x93\xef\xfb" "\x19\x6f\xeb\x37\x83\xf4\xd4\x98\x69\x45\x3c\xb5\x1f\x10\x32" "\x02\x3a\x34\x96\xda\x8c\xd7\x52\xd6\x60\x24\x59\xbb\xd2\x2c" "\x34\xe3\x63\x23\x7e\xfd\x6e\x68\xdb\xc3\x02\xf5\xdb\xf8\xa7" "\x4d\x83\xd7\x69\x2d\x83\x28\x47\xa1\x28\x88\x60\x89\x11\x90" "\xd9\xd8\x14\x95\x3b\xf8\x76\xe8\x3a\x14\x63\x92\x66\xdd\xa2" "\x2b\x9b\x80\x65\xa7\x2b\x00\x9d\x7c\xde\xab\xc2\x36\x7d\x75" "\xaa\x6e\xb4\xeb\x84\x14\x79\x6a\x39\x76\x60\x44\xa0\x6f\xb7" "\xb8\xb3\xef\xf3\x0a\x62\x11\x29\xee\x7d\xd8\x55\x26\x04\x4c" "\x96\x90\x4d\x59\x80\x39\x82\x5f\x9a\x65\xad\x0c\xb9\x6b\x78" "\x5a\x25\x04\xeb\xc5\xd6\x5a\x52\xdf\x9f\xd3\x3e\xe1\x02\x31" "\x2b\x35\x5d\x9e\x0f\xa5\x6f\x54\x95\x68\x9d\xa4\x90\x41\x39" "\x1a\xcb\x67\xa6\x3c\x6a\x48\xba\x15\x9a\x06\xaa\xc4\x97\x28" "\x22\x7b\xd3\x44\xa6\x53\x5d\x2f\x14\xe4\x63\xdf\xf9\x04\xdf" "\x43\x82\xf5\x3c\x39\x59\xfe\x87\xd6\x03\xa2\xe9\x6d\x46\xa0" "\xea\xde\xe8\xf5\x5d\x28\x01\xc9\x6c\x8b\x2a\xd2\x6f\x78\x18" "\x4a\xc6\xbf\xda\xe7\xff\xa5\xeb\x4f\x07\x5f\xb1\x3e\xb7\x25" "\x53\xdf\x22\xbb\x0d\xc9\x11\x6d\x8d\xa8\x40\x6b\x8a\x2a\xe1" "\xff\x16\x9e\xfa\x89\x2e\xd1\x93\x08\xf0\x12\xe8\x61\x61\x59" "\xe9\xdd\x09\xcd\x66\xe2\xd3\xd4\xe2\xf4\xf3\x9b\x81\x97\x40" "\x82\x40\x49\xf7\x96\x07\xcd\x33\x56\xe9\x4d\xb3\x26\x6e\x08" "\x3d\x97\x48\x45\x33\xfb\x7a\x00\xef\x80\xe9\x53\x6b\xef\x45" "\x18\x26\xaa\xbd\x77\x79\xa3\x49\x90\xa4\x43\x8f\xd6\xe1\xaf" "\xf5\x7a\xea\xc0\xe8\x18\xde\x9f\xd2\xa8\xa6\x36\x6c\x03\x71" "\x0e\x56\x0c\xa2\x38\x90\x28\x10\xc3\xe2\x3f\x52\xbd\x7c\x26" "\x98\xf4\x9a\xda\xea\x26\x4a\xad\x20\x3e\x8c\x19\x1b\x09\xd9" "\xd9\xd0\x84\xe7\x6d\x7b\xb7\x87\xdf\x38\x52\x5f\x59\x30\xdb" "\x8d\x4b\x6d\x24\xbd\x3e\xdc\x03\x21\xee\xc8\x16\x73\x01\x1a" "\xb6\x61\x66\xd3\x9f\x0d\x01\x5c\x49\x89\x40\x3e\x5e\x3c\xb3" "\xfe\xd9\x74\xbe\xd9\xb1\x37\xf8\x5b\x51\x76\x3a\xf1\x02\x6a" "\x23\xa5\x16\x99\x06\x7b\x0b\xb0\x4f\x1f\x3e\xb3\xbe\x4f\x69" "\x05\xbc\x95\x98\x93\xc0\xd3\x75\xcf\xfc\x22\x53\xba\x95\x6b" "\x5f\xcd\x55\x2b\x4d\x6e\xef\xb2\xad\x74\xe3\xc8\x13\xd5\x7e" "\x04\x51\x51\xc3\xe4\xc0\xdd\xb6\x76\x2a\x24\x95\xcd\x65\xf5" "\xc2\x8a\x79\xd0\xe6\x53\x89\x5e\x26\x1d\xb1\x15\xb7\xd7\x35" "\x8f\x03\xa1\xd6\x22\xe7\xc6\x21\xf2\x66\xaf\x8e\x58\x74\x8f" "\x0d\x9f\x54\x73\x0e\x4b\x32\x39\xe5\xb0\xeb\xf0\x28\xfc\xd3" "\xda\x4b\x0d\xeb\xda\x35\x68\xf1\xf8\x52\x16\x41\x24\x8d\xae" "\x70\xb5\x7e\x0f\xf9\xd2\xad\xa9\x0c\xe3\xe0\x9b\x7e\x10\x78" "\x2b\x02\x8f\xce\x54\x36\xb9\x0f\x46\xc5\xc6\x03\x63\x15\xf8" "\xab\xd0\x82\x44\x92\x05\x9a\x61\x11\x60\x44\xe9\xc3\x62\x7b" "\xa8\xf8\x3f\x6e\x0e\xd9\xbc\x01\x88\xca\xd7\x55\x9c\x7b\xce" "\xd5\x49\xae\xc3\x76\x1c\xd5\x3b\xca\x5d\xa6\x9e\x6e\x16\xa4" "\x93\xdc\x4b\xf2\xb0\x6c\x06\x1e\x09\xae\xd1\x9e\x3b\xfa\x81" "\xf7\xcc\xdb\xcf\xab\x7c\x8e\xba\xfe\x8e\xf0\x0d\xbb\x7a\xa7" "\xfb\x59\x63\xed\xd4\x7f\xb4\x96\x17\xf1\x98\x5d\xe6\x3f\xff" "\xad\x16\x7d\x49\xc7\x43\x75\xca\xa8\x82\xc2\xf0\xb5\x41\xdc" "\xda\x1b\x5e\xc0\x0f\xf1\x34\x84\x20\xeb\xe3\xdf\x66\xf0\xa5" "\x2b\x79\xcb\x67\x45\x86\x51\xbf\x2f\xfa\xa4\x59\x82\x50\xdd" "\xac\xcc\x42\x5a\xe2\x99\xe5\x29\x51\x21\xcf\x50\x36\xa4\xb2" "\x54\xfb\x18\x6b\x87\xc1\xa3\xa8\x94\xf4\x9e\x72\x4b\x3e\x1b" "\xf3\x74\x52\x43\x32\x54\xf4\x10\xf5\x3a\x55\x85\xcf\x94\xea" "\x62\xcd\x92\x67\x1a\xba\x0a\x00\x1e\xf1\x04\x62\x88\xf9\xd0" "\xcc\x71\x3b\x39\xc8\x38\xfe\x44\x63\x99\x66\x98\xba\x0c\xbe" "\x6c\x59\xf2\xed\x99\x58\x53\x52\xcd\x28\x75\x1f\x0a\xe9\x78" "\xff\xff\x75\xc4\xb9\x54\x8c\xc4\x14\x51\xe7\x55\x7b\x17\x0b" "\x90\x18\xd8\x43\x24\xf7\x27\x43\x99\x6d\x83\xf3\xe3\x86\x86" "\xce\x17\xd7\xdd\x41\x46\xf3\xa8\x16\xdc\xca\x53\x8e\xd8\x71" "\xf1\xbe\x39\x17\x5a\xac\x26\x91\x1b\x38\x5b\x9b\x8f\x15\x7d" "\xcc\x53\x8d\x90\x59\xa0\xc8\xf7\xb6\xc6\xce\xef\xad\xaa\x2a" "\x7e\x6f\xc2\x71\xcb\x46\x04\xf8\x5c\x1e\x32\x60\x65\x74\xd2" "\xc5\x00\xf2\x47\x02\xb9\xfb\xed\x03\x4f\x63\x3d\xa9\x4c\x9e" "\x2b\x7a\x6b\x4b\x37\xcb\x15\xc4\xa3\x39\x78\x75\x08\x94\x57" "\x4c\x1f\xea\x8a\x2f\x45\x9c\xca\xfa\x9e\x56\xff\x0a\x77\xfd" "\xb8\xe7\xa6\xe4\x83\x81\xbb\xd5\x99\x82\x6d\xe1\x12\xea\x00" "\x79\x24\x1b\x2c\xd9\xda\xe7\xa8\xe6\xcf\x5f\x0a\x12\x2e\x8d" "\x86\x2e\x31\x44\x95\xd4\x40\x1f\x56\xd5\xa6\x9c\x75\x5c\xe0" "\x62\x88\x2f\x0b\x26\x73\x35\x70\xe5\x53\x4e\x0e\x60\xab\x53" "\x58\x93\x7b\x6b\x6e\x19\x86\x3d\x22\x09\x7b\x33\x02\xa0\xcf" "\x94\xc8\x5c\x32\xd2\x8f\xf6\x31\x2d\x68\xce\xcf\xeb\x8d\x7d" "\x2b\xe6\x60\x9d\xbf\x95\xd2\x3d\x5f\x21\x9a\x25\x6d\x0f\x13" "\xd7\x18\x0f\x80\x2f\x8b\xa3\xcd\xf5\x93\xdd\xf6\x5a\x39\x0e" "\x8a\x09\xe0\xbf\x14\x87\x58\xf8\x26\xa8\x7d\x1b\x97\x65\xd2" "\xb7\x5e\x5c\xc8\x13\x4a\x43\xbd\xa5\xde\x87\xf8\x11\xc5\x0b" "\xf2\x42\x2f\x25\xe5\x3d\x38\xe7\x81\xa0\x13\x7f\xc0\x0d\x51" "\x0a\xa4\x37\xe4\xcf\xae\x12\xd0\x4a\x95\x7e\x38\xc4\x90\x75" "\x81\x3e\x21\x7f\x16\xae\xa6\x68\x4c\x7a\x05\x2a\x84\x8e\xd4" "\x75\xc6\x68\xbc\x7c\x89\x63\x34\xec\xd5\xe3\x91\xfb\x37\xe1" "\xa5\xfd\x40\xc0\x93\x4f\x1f\x3c\xfb\x82\x07\x55\xf1\xe0\x0a" "\x71\x57\xb2\x60\x7e\x02\xbf\x2e\xbb\x8a\xbb\x58\x86\x1d\x4c" "\xf0\x11\x65\x2f\xde\x80\x44\xe3\x9c\x97\x08\x36\x3e\x13\xd6" "\x1a\xf5\x9b\x35\xe3\x4d\x05\xd7\x3d\xdc\x38\x08\x78\x13\x01" "\x92\x42\xd4\x0e\x83\x21\xb3\x58\xcb\x69\x99\x10\x9e\x42\x1c" "\xdd\x48\xa7\x17\x92\x32\xd1\x6c\xb7\x33\x9b\x96\x3b\x66\x28" "\x1c\xdc\x5e\x24\x6a\x2b\xc5\x8c\xa0\x1c\xef\x01\x52\x34\x57" "\x74\xea\xd1\x6f\x44\xaa\xb3\x21\xcc\x99\x5d\xba\xd2\x02\xa4" "\x77\x9c\xec\xb6\x79\xba\x6a\x1c\x30\x04\x87\xea\x4d\xf1\xfe" "\xaa\x22\x91\x85\x7d\x9e\x0e\xad\xab\x55\xf2\x3d\x5a\x03\x54" "\x0c\x79\x61\x0a\x4c\x51\x42\xea\x0e\x9d\xa5\xa5\xa7\xeb\xe4" "\x9c\x09\xb8\x31\x9b\x5f\x5d\xdc\x57\xe6\x27\xd8\x2d\xc2\x20" "\xab\x5b\xde\xda\x40\x85\x72\x69\x82\x70\x64\xad\x69\x21\xc4" "\x2b\x59\x71\x2a\xa9\x9a\xe4\x07\xbf\x95\x01\xd8\x32\x7c\x08" "\x07\xff\x61\x77\x12\xc3\x0f\x48\x0b\xcb\x4e\x9c\x5b\x1d\x80" "\xdf\xfe\x56\x6c\x2c\x31\xb4\x9b\x20\x4e\x09\x12\xcd\x7d\x7c" "\x27\x2a\xdb\x1a\xf9\x2d\x3e\x83\x07\x99\x55\xe6\xd3\x58\x7c" "\x51\xb6\x49\x94\xd0\x51\x35\x7c\x89\xd9\xf8\xa5\x29\x70\x56" "\x10\x88\xc9\xfa\x79\x58\xcb\x24\x67\xf7\x7f\x1f\x79\x2f\x98" "\x8a\x4e\x8e\x65\x3b\x38\xe7\x4d\x1a\x96\x0c\xfd\xd0\xaf\x00" "\x9c\xf9\x16\x44\xa0\x3d\xa0\xcf\x3f\x7d\xfb\xf6\x44\x2f\xc7" "\x5a\x4c\x32\xb5\x84\xb0\xb2\xaf\xa0\x92\x68\x96\x7d\x01\x00" "\x2f\xd9\xd0\x82\xef\x7f\x38\x02\x90\x75\xca\x96\xaf\x9e\x08" "\xfa\x61\x4f\x3e\xad\x1b\xe9\x58\x32\xc3\xb4\xba\xec\x96\x83" "\x3f\xb5\x8c\x59\x85\xab\xc2\x95\xa6\x30\xd7\xd8\xe8\x04\xc5" "\xf6\x6d\xcf\xea\xf3\x65\xc7\x90\xca\x9e\xac\xfc\xde\xfa\x84" "\xcc\xa1\xfb\x77\xa6\x64\xb3\x32\xa1\x10\x00\xb3\x85\x42\xc0" "\xe7\x73\x6b\x8c\x35\x7c\x86\xf7\xc2\x2a\xda\x84\x2f\xda\xe6" "\x40\xd2\xb3\x16\x8b\x8f\x98\xd2\x80\x74\x2e\xa4\x71\xe6\xc4" "\xfd\xc1\x8a\x38\x7f\x14\x12\xfd\xe8\x8d\xe8\x7e\x59\x5d\x48" "\x12\x15\x6e\xb9\xbb\x89\x2e\x98\x18\xed\xd4\xf1\x8a\xeb\xeb" "\x8c\x2b\x3f\x5f\x5b\x11\xfa\x3e\x62\x40\x39\x92\x24\xf7\x09" "\x60\xe5\xd7\xd6\xeb\xef\xf5\x3d\xa9\x70\xe5\xca\x61\x20\xda" "\xbb\x3e\x1a\x04\x6b\x65\x80\x03\x49\xc4\x1b\x50\xd9\xac\xdf" "\xc3\x10\x59\x1e\x85\x15\x28\x83\x37\x1e\x43\x1c\x21\xae\xde" "\xf9\x01\xfa\x6d\x4d\xae\x67\x88\xb0\x91\x44\x9d\x23\x3b\x63" "\xce\x4e\xde\x09\x9a\x8e\x06\x6b\x9b\xfb\x49\x4d\x35\xb8\x07" "\xfa\xd0\xac\x0a\x0f\x9b\xb7\x45\xdc\x1f\x31\xe9\x45\x1e\xcd" "\x1b\x44\x7f\xd4\xbe\xa7\xba\x21\x7c\xc1\x4f\x55\x2b\xa1\x5f" "\x90\xaa\xcd\x84\xd0\xc0\x89\xf9\x77\x1b\x6b\x1d\x1c\xcc\xcb" "\x69\xd6\xe3\xc0\xd5\x07\x63\x94\x7d\x79\xc2\x24\xc4\xe9\xd2" "\xaa\x20\x10\x50\x52\x30\x48\x1f\x73\x9c\xb9\xb1\xc6\x74\xe8" "\xa8\x20\x3f\x97\x3b\xaa\xa5\x75\xbc\x28\xc5\x84\xb1\x1b\xbc" "\x84\x9b\xce\x2c\xac\xe3\xc0\x0d\x5a\x62\xc6\xad\xeb\xb1\xd3" "\x1b\xd7\xbc\xd5\x1a\x0e\x79\x39\xa6\x88\x40\x25\x31\xb3\x0c" "\x51\xac\x5a\xf7\x12\xae\xa9\x13\xc4\x2d\x0e\x55\x5c\xab\xf1" "\xe7\x0d\x81\xd6\x0e\x19\x3f\xa8\x6b\xf7\xf6\xea\xa0\xf4\x30" "\x12\x02\xb3\xff\x14\xbf\x8f\xf3\xff\xe3\x6d\x2c\x37\x9b\xa0" "\x26\xf6\xa6\xcc\xe7\x71\x5e\x33\x26\x1b\x4e\x91\xa7\x3e\x0d" "\xba\xef\x72\x76\x78\x31\x5d\x06\x34\x8c\xc3\xe0\xdf\x48\x3f" "\xcf\x4c\xfc\x9e\x3f\xdb\x2b\xf7\x68\x56\x48\xf6\xc1\x28\xb4" "\x70\xbd\x7f\x60\xe6\x06\xe9\x07\x6f\x38\x35\xe5\x24\x79\x2c" "\x31\x93\x07\x9b\x3e\x1c\x3e\x30\x71\x06\x5e\x77\xa4\xb5\x85" "\xa4\x1e\x43\xa6\x6b\x1c\x31\x79\x08\xd8\xb3\x5a\x2c\x29\xa4" "\xe3\xd1\x64\xa6\x80\x5a\x11\xa1\x8e\x68\xe3\xad\xbf\x59\x96" "\x40\x83\x55\x97\x2c\xca\x8a\xee\x9a\x0d\xb1\x08\x50\xe6\x85" "\x66\x6d\xd6\x2d\x12\xfc\x51\xe6\xd2\x95\x3b\x76\xef\x8d\xd9" "\x32\x3b\xb5\x76\x7d\x25\x01\x22\x76\xd3\x8e\x47\x6c\xa1\x99" "\xa5\xa5\xc4\x0f\x00\x54\x17\xe5\x90\x2c\x8f\xf7\xd2\x8e\x48" "\x2b\xe1\x52\xca\x9a\x40\xe8\xdd\x7f\xd6\x84\xae\xd5\xa0\xfe" "\xe0\x0a\xf4\xa5\xf1\xef\x98\xd7\xa4\xbc\xb9\x5c\x66\x65\x54" "\xf0\x99\xb7\x7b\xdf\xfe\xf4\x06\x2f\xf2\xc2\xde\x13\x79\x5c" "\x8c\x44\x3b\xb2\x54\xbd\xd5\x49\xe8\x49\xbc\x96\x08\x79\x27" "\xc2\x28\xd6\xe7\x5b\xf8\xff\x0d\x10\xf9\x51\x72\x48\xf8\xad" "\x8e\x6f\xa5\xa1\xf9\x17\x5a\x4d\xcf\xcb\x01\xf0\xa2\xb9\x80" "\x46\x24\x08\xeb\xea\xb8\xc5\x0b\x2c\x5f\xdd\xf2\x49\x34\xbd" "\x01\x39\x4d\x22\xd5\xa0\x50\xb4\x12\x59\xab\xcd\x7f\x02\xc4" "\x48\x4e\x0d\x6d\x75\xb4\x37\x5f\xa4\xc9\x92\x69\x08\x49\xd7" "\xa1\x72\x1a\x53\x7c\xd6\x84\x80\xae\xde\x0e\xf4\xe5\xe0\xc8" "\x41\x9c\xe3\x14\x2f\x65\x25\xe4\xc7\x73\x40\xef\x4d\x47\xe3" "\x0c\x06\x14\xb0\xec\x64\xe3\x51\x31\xad\xea\x2c\x90\x8c\x10" "\xbc\xa2\x59\x95\xa9\x2e\x92\xf7\x47\x71\xd8\x63\xea\xad\x98" "\x8e\x6a\xde\x75\xf5\x5c\xb0\xe1\x3f\xe9\x78\x7a\x57\xd9\xea" "\x68\xc9\x7b\x0b\xe5\x76\x71\xe7\x09\xa5\xf3\x06\x73\x32\x0c" "\x9a\xaa\xa1\xb6\x47\x83\x0d\xd5\x0d\xaa\x04\x58\xab\x64\xf9" "\x27\xac\x1c\x4e\x5c\x63\x55\x76\x27\xfc\x90\xc4\x82\xf5\xd0" "\x1d\x32\xde\x42\xc9\x00\x72\xcf\xa2\xf5\xee\x2b\xbb\x96\x62" "\x6d\x89\x92\x79\x16\x0a\xd2\x95\x10\x95\xe8\x8e\x72\x3b\xf3" "\xb1", 4096); r[6] = syscall(__NR_sendto, r[2], 0x20000000ul, 0x1000ul, 0x4ul, 0x20000000ul, 0x0ul); break; } return 0; } void test() { long i; pthread_t th[10]; memset(r, -1, sizeof(r)); for (i = 0; i < 5; i++) { pthread_create(&th[i], 0, thr, (void*)i); usleep(rand() % 10000); } usleep(rand() % 100000); } int main() { use_temporary_dir(); int pid = do_sandbox_namespace(0, false); int status = 0; while (waitpid(pid, &status, __WALL) != pid) { } return 0; }