// https://syzkaller.appspot.com/bug?id=52da7fe45821e13541722c281eec0d818fe822b2 // 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 #include #include #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_truncate #define __NR_truncate 45 #endif static unsigned long long procid; 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; } //% This code is derived from puff.{c,h}, found in the zlib development. The //% original files come with the following copyright notice: //% Copyright (C) 2002-2013 Mark Adler, all rights reserved //% version 2.3, 21 Jan 2013 //% This software is provided 'as-is', without any express or implied //% warranty. In no event will the author be held liable for any damages //% arising from the use of this software. //% Permission is granted to anyone to use this software for any purpose, //% including commercial applications, and to alter it and redistribute it //% freely, subject to the following restrictions: //% 1. The origin of this software must not be misrepresented; you must not //% claim that you wrote the original software. If you use this software //% in a product, an acknowledgment in the product documentation would be //% appreciated but is not required. //% 2. Altered source versions must be plainly marked as such, and must not be //% misrepresented as being the original software. //% 3. This notice may not be removed or altered from any source distribution. //% Mark Adler madler@alumni.caltech.edu //% BEGIN CODE DERIVED FROM puff.{c,h} #define MAXBITS 15 #define MAXLCODES 286 #define MAXDCODES 30 #define MAXCODES (MAXLCODES + MAXDCODES) #define FIXLCODES 288 struct puff_state { unsigned char* out; unsigned long outlen; unsigned long outcnt; const unsigned char* in; unsigned long inlen; unsigned long incnt; int bitbuf; int bitcnt; jmp_buf env; }; static int puff_bits(struct puff_state* s, int need) { long val = s->bitbuf; while (s->bitcnt < need) { if (s->incnt == s->inlen) longjmp(s->env, 1); val |= (long)(s->in[s->incnt++]) << s->bitcnt; s->bitcnt += 8; } s->bitbuf = (int)(val >> need); s->bitcnt -= need; return (int)(val & ((1L << need) - 1)); } static int puff_stored(struct puff_state* s) { s->bitbuf = 0; s->bitcnt = 0; if (s->incnt + 4 > s->inlen) return 2; unsigned len = s->in[s->incnt++]; len |= s->in[s->incnt++] << 8; if (s->in[s->incnt++] != (~len & 0xff) || s->in[s->incnt++] != ((~len >> 8) & 0xff)) return -2; if (s->incnt + len > s->inlen) return 2; if (s->outcnt + len > s->outlen) return 1; for (; len--; s->outcnt++, s->incnt++) { if (s->in[s->incnt]) s->out[s->outcnt] = s->in[s->incnt]; } return 0; } struct puff_huffman { short* count; short* symbol; }; static int puff_decode(struct puff_state* s, const struct puff_huffman* h) { int first = 0; int index = 0; int bitbuf = s->bitbuf; int left = s->bitcnt; int code = first = index = 0; int len = 1; short* next = h->count + 1; while (1) { while (left--) { code |= bitbuf & 1; bitbuf >>= 1; int count = *next++; if (code - count < first) { s->bitbuf = bitbuf; s->bitcnt = (s->bitcnt - len) & 7; return h->symbol[index + (code - first)]; } index += count; first += count; first <<= 1; code <<= 1; len++; } left = (MAXBITS + 1) - len; if (left == 0) break; if (s->incnt == s->inlen) longjmp(s->env, 1); bitbuf = s->in[s->incnt++]; if (left > 8) left = 8; } return -10; } static int puff_construct(struct puff_huffman* h, const short* length, int n) { int len; for (len = 0; len <= MAXBITS; len++) h->count[len] = 0; int symbol; for (symbol = 0; symbol < n; symbol++) (h->count[length[symbol]])++; if (h->count[0] == n) return 0; int left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= h->count[len]; if (left < 0) return left; } short offs[MAXBITS + 1]; offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + h->count[len]; for (symbol = 0; symbol < n; symbol++) if (length[symbol] != 0) h->symbol[offs[length[symbol]]++] = symbol; return left; } static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode, const struct puff_huffman* distcode) { static const short lens[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; static const short dists[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; static const short dext[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; int symbol; do { symbol = puff_decode(s, lencode); if (symbol < 0) return symbol; if (symbol < 256) { if (s->outcnt == s->outlen) return 1; if (symbol) s->out[s->outcnt] = symbol; s->outcnt++; } else if (symbol > 256) { symbol -= 257; if (symbol >= 29) return -10; int len = lens[symbol] + puff_bits(s, lext[symbol]); symbol = puff_decode(s, distcode); if (symbol < 0) return symbol; unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]); if (dist > s->outcnt) return -11; if (s->outcnt + len > s->outlen) return 1; while (len--) { if (dist <= s->outcnt && s->out[s->outcnt - dist]) s->out[s->outcnt] = s->out[s->outcnt - dist]; s->outcnt++; } } } while (symbol != 256); return 0; } static int puff_fixed(struct puff_state* s) { static int virgin = 1; static short lencnt[MAXBITS + 1], lensym[FIXLCODES]; static short distcnt[MAXBITS + 1], distsym[MAXDCODES]; static struct puff_huffman lencode, distcode; if (virgin) { lencode.count = lencnt; lencode.symbol = lensym; distcode.count = distcnt; distcode.symbol = distsym; short lengths[FIXLCODES]; int symbol; for (symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; for (; symbol < 256; symbol++) lengths[symbol] = 9; for (; symbol < 280; symbol++) lengths[symbol] = 7; for (; symbol < FIXLCODES; symbol++) lengths[symbol] = 8; puff_construct(&lencode, lengths, FIXLCODES); for (symbol = 0; symbol < MAXDCODES; symbol++) lengths[symbol] = 5; puff_construct(&distcode, lengths, MAXDCODES); virgin = 0; } return puff_codes(s, &lencode, &distcode); } static int puff_dynamic(struct puff_state* s) { static const short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; int nlen = puff_bits(s, 5) + 257; int ndist = puff_bits(s, 5) + 1; int ncode = puff_bits(s, 4) + 4; if (nlen > MAXLCODES || ndist > MAXDCODES) return -3; short lengths[MAXCODES]; int index; for (index = 0; index < ncode; index++) lengths[order[index]] = puff_bits(s, 3); for (; index < 19; index++) lengths[order[index]] = 0; short lencnt[MAXBITS + 1], lensym[MAXLCODES]; struct puff_huffman lencode = {lencnt, lensym}; int err = puff_construct(&lencode, lengths, 19); if (err != 0) return -4; index = 0; while (index < nlen + ndist) { int symbol; int len; symbol = puff_decode(s, &lencode); if (symbol < 0) return symbol; if (symbol < 16) lengths[index++] = symbol; else { len = 0; if (symbol == 16) { if (index == 0) return -5; len = lengths[index - 1]; symbol = 3 + puff_bits(s, 2); } else if (symbol == 17) symbol = 3 + puff_bits(s, 3); else symbol = 11 + puff_bits(s, 7); if (index + symbol > nlen + ndist) return -6; while (symbol--) lengths[index++] = len; } } if (lengths[256] == 0) return -9; err = puff_construct(&lencode, lengths, nlen); if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) return -7; short distcnt[MAXBITS + 1], distsym[MAXDCODES]; struct puff_huffman distcode = {distcnt, distsym}; err = puff_construct(&distcode, lengths + nlen, ndist); if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) return -8; return puff_codes(s, &lencode, &distcode); } static int puff(unsigned char* dest, unsigned long* destlen, const unsigned char* source, unsigned long sourcelen) { struct puff_state s = { .out = dest, .outlen = *destlen, .outcnt = 0, .in = source, .inlen = sourcelen, .incnt = 0, .bitbuf = 0, .bitcnt = 0, }; int err; if (setjmp(s.env) != 0) err = 2; else { int last; do { last = puff_bits(&s, 1); int type = puff_bits(&s, 2); err = type == 0 ? puff_stored(&s) : (type == 1 ? puff_fixed(&s) : (type == 2 ? puff_dynamic(&s) : -1)); if (err != 0) break; } while (!last); } *destlen = s.outcnt; return err; } //% END CODE DERIVED FROM puff.{c,h} #define ZLIB_HEADER_WIDTH 2 static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcelen, int dest_fd) { if (sourcelen < ZLIB_HEADER_WIDTH) return 0; source += ZLIB_HEADER_WIDTH; sourcelen -= ZLIB_HEADER_WIDTH; const unsigned long max_destlen = 132 << 20; void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); if (ret == MAP_FAILED) return -1; unsigned char* dest = (unsigned char*)ret; unsigned long destlen = max_destlen; int err = puff(dest, &destlen, source, sourcelen); if (err) { munmap(dest, max_destlen); errno = -err; return -1; } if (write(dest_fd, dest, destlen) != (ssize_t)destlen) { munmap(dest, max_destlen); return -1; } return munmap(dest, max_destlen); } static int setup_loop_device(unsigned char* data, unsigned long size, const char* loopname, int* loopfd_p) { int err = 0, loopfd = -1; int memfd = syscall(__NR_memfd_create, "syzkaller", 0); if (memfd == -1) { err = errno; goto error; } if (puff_zlib_to_file(data, size, memfd)) { err = errno; goto error_close_memfd; } loopfd = open(loopname, O_RDWR); if (loopfd == -1) { err = errno; goto error_close_memfd; } if (ioctl(loopfd, LOOP_SET_FD, memfd)) { if (errno != EBUSY) { err = errno; goto error_close_loop; } ioctl(loopfd, LOOP_CLR_FD, 0); usleep(1000); if (ioctl(loopfd, LOOP_SET_FD, memfd)) { err = errno; goto error_close_loop; } } close(memfd); *loopfd_p = loopfd; return 0; error_close_loop: close(loopfd); error_close_memfd: close(memfd); error: errno = err; return -1; } static void reset_loop_device(const char* loopname) { int loopfd = open(loopname, O_RDWR); if (loopfd == -1) { return; } if (ioctl(loopfd, LOOP_CLR_FD, 0)) { } close(loopfd); } static long syz_mount_image(volatile long fsarg, volatile long dir, volatile long flags, volatile long optsarg, volatile long change_dir, volatile unsigned long size, volatile long image) { unsigned char* data = (unsigned char*)image; int res = -1, err = 0, need_loop_device = !!size; char* mount_opts = (char*)optsarg; char* target = (char*)dir; char* fs = (char*)fsarg; char* source = NULL; char loopname[64]; if (need_loop_device) { int loopfd; memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; close(loopfd); source = loopname; } mkdir(target, 0777); char opts[256]; memset(opts, 0, sizeof(opts)); if (strlen(mount_opts) > (sizeof(opts) - 32)) { } strncpy(opts, mount_opts, sizeof(opts) - 32); if (strcmp(fs, "iso9660") == 0) { flags |= MS_RDONLY; } else if (strncmp(fs, "ext", 3) == 0) { bool has_remount_ro = false; char* remount_ro_start = strstr(opts, "errors=remount-ro"); if (remount_ro_start != NULL) { char after = *(remount_ro_start + strlen("errors=remount-ro")); char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1); has_remount_ro = ((before == '\0' || before == ',') && (after == '\0' || after == ',')); } if (strstr(opts, "errors=panic") || !has_remount_ro) strcat(opts, ",errors=continue"); } else if (strcmp(fs, "xfs") == 0) { strcat(opts, ",nouuid"); } res = mount(source, target, fs, flags, opts); if (res == -1) { err = errno; goto error_clear_loop; } res = open(target, O_RDONLY | O_DIRECTORY); if (res == -1) { err = errno; goto error_clear_loop; } if (change_dir) { res = chdir(target); if (res == -1) { err = errno; } } error_clear_loop: if (need_loop_device) reset_loop_device(loopname); errno = err; return res; } static void setup_gadgetfs(); static void setup_binderfs(); static void setup_fusectl(); static void sandbox_common_mount_tmpfs(void) { write_file("/proc/sys/fs/mount-max", "100000"); if (mkdir("./syz-tmp", 0777)) exit(1); if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot", 0777)) exit(1); if (mkdir("./syz-tmp/newroot/dev", 0700)) exit(1); unsigned bind_mount_flags = MS_BIND | MS_REC | MS_PRIVATE; if (mount("/dev", "./syz-tmp/newroot/dev", NULL, bind_mount_flags, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/proc", 0700)) exit(1); if (mount("syz-proc", "./syz-tmp/newroot/proc", "proc", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/selinux", 0700)) exit(1); const char* selinux_path = "./syz-tmp/newroot/selinux"; if (mount("/selinux", selinux_path, NULL, bind_mount_flags, NULL)) { if (errno != ENOENT) exit(1); if (mount("/sys/fs/selinux", selinux_path, NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); } if (mkdir("./syz-tmp/newroot/sys", 0700)) exit(1); if (mount("/sys", "./syz-tmp/newroot/sys", 0, bind_mount_flags, NULL)) exit(1); if (mount("/sys/kernel/debug", "./syz-tmp/newroot/sys/kernel/debug", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/sys/fs/smackfs", "./syz-tmp/newroot/sys/fs/smackfs", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/proc/sys/fs/binfmt_misc", "./syz-tmp/newroot/proc/sys/fs/binfmt_misc", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/newroot/syz-inputs", 0700)) exit(1); if (mount("/syz-inputs", "./syz-tmp/newroot/syz-inputs", NULL, bind_mount_flags | MS_RDONLY, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/pivot", 0777)) exit(1); if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { if (chdir("./syz-tmp")) exit(1); } else { if (chdir("/")) exit(1); if (umount2("./pivot", MNT_DETACH)) exit(1); } if (chroot("./newroot")) exit(1); if (chdir("/")) exit(1); setup_gadgetfs(); setup_binderfs(); setup_fusectl(); } static void setup_gadgetfs() { if (mkdir("/dev/gadgetfs", 0777)) { } if (mount("gadgetfs", "/dev/gadgetfs", "gadgetfs", 0, NULL)) { } } static void setup_fusectl() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void setup_binderfs() { if (mkdir("/dev/binderfs", 0777)) { } if (mount("binder", "/dev/binderfs", "binder", 0, NULL)) { } if (symlink("/dev/binderfs", "./binderfs")) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); if (getppid() == 1) exit(1); 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 = 128 << 20; 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); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); sandbox_common_mount_tmpfs(); loop(); exit(1); } void loop(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x400000000040, "nilfs2\000", 7); memcpy((void*)0x400000000300, "./file2\000", 8); memcpy( (void*)0x400000000340, "\x78\x9c\xec\xdd\x4d\x8c\x5b\x47\x01\x00\xe0\xb1\x77\xbd\xc9\x36\x29\x71" "\x4a\x42\x97\x34\xb4\x09\x85\xb6\xfc\x74\xd3\x6c\x96\xf0\x13\x41\x52\x25" "\x42\x22\x6a\x2a\xc4\xa5\x52\xc5\x25\x4a\xd3\x12\x11\x82\x44\x91\x80\xaa" "\x12\x49\x4e\xdc\x68\x55\x05\x89\x13\x3f\xe2\xd4\x4b\x55\x10\x12\xbd\xa0" "\xa8\x27\x2e\x95\x68\xa4\x0a\xa9\xa7\xc2\x81\x03\x51\x10\x95\x38\x94\x40" "\x62\x14\x7b\xc6\xfb\x3c\xb1\xf3\x6c\x67\xd7\x5e\xc7\xdf\x27\xcd\x8e\xe7" "\xcd\x3c\xcf\x3c\xef\xf3\xf3\xfb\x9b\x37\x01\x98\x5a\xd5\xe6\xdf\xe5\xe5" "\x85\x4a\x08\x17\xde\x78\xe5\xc8\x3f\x1e\xfa\xfb\xfc\x8d\x29\x07\xdb\x25" "\xea\xcd\xbf\xb3\x85\x54\x2d\x84\x50\x89\xe9\xd9\xec\xfd\xde\x9b\x69\xc5" "\xd7\xde\x7f\xf1\x44\xb7\xb8\x12\x96\x9a\x7f\x53\x3a\x3c\x79\xa5\x3d\xef" "\xa6\x10\xc2\xd9\xb0\x2b\x5c\x0c\xf5\xb0\xe3\xc2\xa5\x97\xdf\x5a\x7a\xe2" "\xd8\xb9\xa3\xe7\x77\xbf\xfd\xea\x81\xcb\x6b\xb3\xf4\x00\x00\x30\x5d\xbe" "\x7e\xf1\xc0\xf2\xf6\xbf\xfe\xf9\xbe\xad\x57\x5f\xbb\xff\x50\xd8\xd0\x9e" "\x9e\xf6\xcf\xeb\x31\xbd\x39\xee\xf7\x1f\x8a\x3b\xfe\x69\xff\xbf\x1a\x3a" "\xd3\x95\x42\x28\x9a\xcb\xca\xcd\xc6\x50\x9d\xef\x2c\x37\xd3\xa5\x5c\xb1" "\x9e\x5a\x56\x6e\xb6\x47\xfd\x73\x59\xfd\xb5\x1e\xe5\x36\x84\x5b\xd7\x3f" "\x53\x98\xd6\x6d\xb9\x61\x92\xa5\xf5\xb8\x1e\x2a\xd5\xc5\x8e\x74\xb5\xba" "\xb8\xd8\x3a\x26\x0f\xcd\xe3\xfa\xb9\xca\xe2\x99\x53\xa7\x9f\x7d\x7e\x4c" "\x0d\x05\x56\xdd\xbf\x1f\x08\x21\xec\x2a\x84\xc3\xe7\x3b\xd3\xeb\x2d\x1c" "\x5c\x07\x6d\x18\x32\x34\xd6\x41\x1b\x26\x32\x1c\x1a\x5d\x5d\x57\x1b\x2d" "\x63\x5f\xe6\x11\x85\xc6\x96\x71\x6f\x81\x00\x5a\xf2\xeb\x85\x37\x39\x9b" "\x9f\x59\xb8\x3d\xed\x77\x9b\xed\xaf\xfe\x2b\x8f\x57\xbb\xcf\x0f\xab\x60" "\xd4\xeb\xff\x40\xf5\xcf\x8d\xb9\xfe\xa0\xfe\xdf\x9c\xb3\xc5\x61\xf5\xdc" "\xa9\x6b\x53\x5a\xae\xf4\x3d\xda\x1c\xd3\xf9\x75\x84\xfc\xfe\xa5\xde\xdf" "\xbf\xfc\x4a\x47\xe7\xd4\xfc\x7a\x44\xad\xcf\x76\xf6\xba\x8e\x30\x29\xd7" "\x17\x7a\xb5\x73\x66\xc4\xed\x18\x56\xaf\xf6\xe7\xeb\xc5\x9d\xea\xcb\x31" "\x4e\x9f\xc3\x57\x3a\x72\x1f\xe8\xf8\xfe\xe4\xff\xd3\x49\xf9\x1f\x03\xdd" "\x7d\x90\x9f\xff\x17\x04\x61\x7d\x87\xd0\x91\xae\xdd\xce\x7b\x35\xc6\xbc" "\xfd\x01\xd6\xaf\xfc\xbe\xb9\x46\xba\x3e\x1a\xe5\xf7\xf5\xe5\xf9\x1b\x4a" "\xf2\x37\x96\xe4\xcf\x97\xe4\xdf\x55\x92\xbf\xa9\x24\x1f\xa6\xd9\xef\xbe" "\xff\xd3\xf0\x52\x65\xe5\x7c\x57\x7e\x4c\x3f\xe8\xf9\xf0\x74\x9e\xed\xee" "\x18\x7f\x68\xc0\xf6\xe4\xe7\x23\x07\xad\x3f\xbf\xef\x77\x50\xb7\x5b\x7f" "\x7e\x3f\x31\xac\x67\x7f\x38\xfe\xd4\xc9\x2f\x3c\xf3\xf4\xa5\xd6\xfd\xff" "\x95\xf6\xfa\x7f\x3d\xae\xef\xe9\x70\xa3\x1e\xbf\x5b\x17\x63\x81\x74\xbe" "\x30\x3f\xaf\xde\xbe\xf7\xbf\xde\x59\x4f\xb5\x47\xb9\x7b\xb2\xf6\xdc\xdd" "\xa5\x7c\xf3\xf5\xb6\xce\x72\x95\x6d\x2b\xef\x13\x0a\xdb\x99\x9b\xda\xb1" "\xd0\x39\xdf\x96\x5e\xe5\x76\x76\x96\xab\x67\xe5\xe6\x63\xd8\x98\xb5\x37" "\xdf\x3f\xb9\x2b\x9b\x2f\xed\x7f\xa4\xed\x6a\xfa\xbc\x66\xb3\xe5\xad\x65" "\xcb\x31\x97\xb5\x23\x6d\x57\xb6\xc6\x38\x6f\x07\x0c\x23\xad\x8f\xbd\xee" "\xff\x4f\xeb\xe7\x42\xa8\x55\x9e\x3d\x75\xfa\xe4\x63\x31\x9d\xd6\xd3\x3f" "\xcd\xd4\x36\xdc\x98\xbe\x77\xc4\xed\x06\x6e\x5f\xbf\xfd\x7f\x16\x42\x67" "\xff\x9f\xcd\xed\xe9\xb5\x6a\x71\xbb\xb0\x65\x65\x7a\xa5\xb5\x5d\x78\x3d" "\xbe\x5f\xe7\xf4\xa5\x76\x3d\x85\xe9\x85\x1f\xb5\xf4\x3b\xf7\xad\x99\xf9" "\x66\xf9\xc5\x13\xdf\x3d\xfd\xcc\x2a\x2f\x3b\x4c\xbb\xe7\x7f\xf4\xc2\xb7" "\x8f\x9f\x3e\x7d\xf2\x7b\x5e\x0c\xfd\xe2\xab\xeb\xa3\x19\x83\xbc\x48\x87" "\x2d\xeb\xa5\x3d\x5e\x0c\xfa\x62\xd7\x5a\x57\x31\xe6\x0d\x13\xb0\xe6\xf6" "\xfc\xb8\xb5\x13\xf0\xe8\xa9\xef\x1c\x7f\xee\xe4\x73\x27\xcf\xec\xdb\xbf" "\x7f\xdf\xd2\xd2\xfe\x2f\xee\x5b\xde\xd3\xdc\xaf\xdf\x53\xdc\xbb\x2f\x3a" "\x3b\x86\xd6\x02\xab\x69\xe5\x47\x7f\xdc\x2d\x01\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xfa\xf5\x83\xa3\x47\x2e\xbd\xf3\xe6\xe7\xdf\x6d\xf5\xff\x5f" "\xe9\xff\x97\xfa\xff\xa7\x3b\x7f\x53\xff\xff\x9f\x64\xfd\xff\xf3\x7e\xf2" "\xa9\x1f\x7c\xea\x07\xb8\xb5\x4b\x7e\xb3\x4c\xf6\x80\xd5\xb9\xac\x5c\x2d" "\x86\x0f\x67\xed\xdd\x96\xd5\xb3\x3d\x9b\xef\x23\x31\x6e\x8f\xe3\x17\xfb" "\xff\xa7\xea\xf2\xe7\xba\xa6\xf6\xdc\x9b\x4d\xaf\xf5\x48\x66\x8f\x13\xb8" "\xe9\x79\x29\x73\xd9\x33\x48\xf2\xf1\x02\x3f\x1e\xe3\xf3\x31\xfe\x75\x80" "\x31\xaa\xcc\x77\x9f\x1c\xe3\x5b\x3c\xdf\xba\xf2\x41\x61\x5d\x4f\xcf\xa7" "\x28\x74\xe1\x6d\x78\x3e\xf0\xe4\x48\xff\xb7\xe6\xda\x50\x78\xa4\x51\xea" "\xff\xdd\xf5\xb9\x4e\x5d\xfa\x6b\x33\x59\x46\xd1\x63\x71\xdc\xcb\x08\x74" "\xf7\xcf\xa9\x7a\xfe\xf7\xbf\x56\x16\x7c\xec\x6d\x11\x7a\x87\xd9\xd1\xd6" "\xf7\xf3\xe9\x5d\x27\x1a\x3d\xf7\xd2\xfb\x1d\xc1\x06\x60\x75\x8c\x7b\xfc" "\xcf\x74\xde\x33\xc5\x67\xfe\xf8\xb5\x8d\x37\x42\x2a\x76\xe5\xf1\xce\xed" "\x65\xfe\xfc\x52\x18\xc4\x5f\xde\xe9\x4c\xaf\xf7\xf1\x27\xd7\xba\xfe\x7c" "\xdc\xbe\x51\xd7\x3f\xee\xe5\x1f\xf5\xf8\x9f\xed\xf1\xef\xfa\xde\xfe\x65" "\x23\xe6\xd5\x87\xab\xf7\x3f\xbf\xb8\xfc\x6e\xa1\xda\xb0\xa3\xdf\xfa\xf3" "\xe5\x4f\xcf\x81\xde\x36\x58\xfd\x57\x63\xfd\x69\x69\x1e\x0e\xfd\xd5\xdf" "\xf8\x55\x56\x7f\x7e\x41\xa8\x4f\xff\xcd\xea\xbf\xab\xcf\xfa\x6f\x5a\xfe" "\x9d\xc3\xd5\xff\xbf\x58\x7f\xfa\xd8\x1e\x79\xb0\xdf\xfa\x5b\x2d\xae\x54" "\x3b\xdb\x31\x9f\x2d\x47\xba\xfe\x97\x9f\x37\x4e\xae\x65\xcb\x9f\x9e\xed" "\x79\x8b\xfa\xbf\xf1\x42\xb7\xe5\x1f\x72\xa0\xc6\xeb\xb1\x7e\x98\x66\x93" "\x32\xce\xec\xa0\xb2\xfd\x88\xf6\x4e\xfb\xf0\xe3\xff\x46\x67\x57\x77\xfc" "\xdf\x76\x63\xb3\xcd\x5a\x7e\x1f\xc6\xe7\x62\x3a\x6d\x88\xd3\x7d\x0e\xf9" "\x78\x27\x83\xb6\x3f\xdd\x5f\x91\x7e\x07\xb6\x67\xef\x5f\x29\xf9\x7d\x33" "\xfe\xef\x64\xfb\x52\x8c\xcb\xbe\x0f\x69\xfc\xdf\xb4\x3e\xd6\xe3\x4f\x7e" "\x21\xdd\xfc\x2c\x53\xba\xd6\xe5\xb3\xbd\x53\xb7\x35\x30\xa9\xde\x9b\xaa" "\xeb\x7f\xa3\x0a\x97\x5b\x87\x41\xc3\xcd\xbf\x71\xfc\xed\x17\x06\x08\x8d" "\x99\x21\xe6\x6b\x8f\x13\x37\xe6\xf6\x37\x1a\x8d\xb5\x3d\xa1\x55\x62\xac" "\x95\x33\xf6\xcf\x7f\xdc\xc7\x09\xe3\xae\x7f\xdc\x9f\x7f\x99\x7c\xfc\xdf" "\x7c\x1f\x3e\x1f\xff\x37\xcf\xcf\xc7\xff\xcd\xf3\xf3\xf1\x7f\xf3\xfc\xf9" "\xf8\x1f\xea\x95\x9f\x8f\xff\x9b\x7f\x9e\xf9\xf8\xbf\x79\xfe\xbd\xd9\xfb" "\xe6\xe3\x03\x2f\x94\xe4\x7f\xb4\x24\x7f\x47\xf7\xfc\xf6\x61\xfb\x7d\x25" "\xf3\xef\x2c\xc9\xff\x58\x49\xfe\xee\x76\xfe\xc1\x8e\x12\x29\xff\xfe\x5b" "\xce\xbf\x52\xae\xd7\xfb\xdf\x53\x92\xff\x60\x49\xfe\x27\x4a\xf2\x3f\x59" "\x92\xff\x50\x49\xfe\x23\x85\xfc\xe2\x18\xd0\x29\xff\x53\x25\xf3\xdf\xe9" "\x52\x7f\x94\x69\x5d\x7e\x98\x66\x79\xff\x3c\xdf\x7f\x98\x1e\xe9\xfa\x4f" "\xaf\xef\xff\xb6\x92\x7c\x60\x72\xfd\xec\xb5\xbd\x87\x9f\xfe\xed\x37\xeb" "\xad\xfe\xff\x73\xed\xf3\x21\xe9\x3a\xde\xa1\x98\xae\xc5\xe3\xa7\x1f\xc6" "\x74\x7e\xdd\x3b\x14\xd2\x37\xf2\xde\x8c\xe9\xbf\x65\xf9\xeb\xfd\x7c\x07" "\x4c\x93\xfc\xf9\x19\xf9\xef\xfb\xc3\x25\xf9\xc0\xe4\x4a\xf7\x79\xf9\x7e" "\xc3\x14\xaa\x6c\xec\x3e\x39\xc6\x65\xcf\xad\xea\xb5\x9f\xcf\x64\xf9\x74" "\x8c\x3f\x13\xe3\xcf\xc6\xf8\xd1\x18\x2f\xc6\x78\x4f\x8c\xf7\xc6\x78\x69" "\x44\xed\x63\x6d\x1c\x7e\xfd\xf7\x07\x5e\xaa\xac\x1c\xef\x6f\xc9\xf2\xfb" "\xbd\x9f\x3c\xef\x0f\xd4\xf1\x9c\xa8\x10\xc2\xbe\x3e\xdb\x93\x9f\x1f\x18" "\xf4\x7e\xf6\xfc\x39\x7e\x83\xba\xdd\xfa\x87\xec\x0e\x06\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x30\x36\xd5\xe6\xdf\xe5\xe5\x85\x4a\x08\x17\xde\x78\xe5\xc8\x53\xc7" "\x4e\xed\xb9\x31\xe5\x60\xbb\x44\xbd\xf9\x77\xb6\x90\xaa\xb5\xe7\x0b\xe1" "\xb1\x18\xcf\xc4\xf8\x97\xf1\xc5\xb5\xf7\x5f\x3c\x51\x8c\xaf\xc7\xb8\x12" "\x96\x42\x25\x54\xda\xd3\xc3\x93\x57\xda\x35\x6d\x0a\x21\x9c\x0d\xbb\xc2" "\xc5\x50\x0f\x3b\x2e\x5c\x7a\xf9\xad\xa5\x27\x8e\x9d\x3b\x7a\x7e\xf7\xdb" "\xaf\x1e\xb8\xbc\x76\x9f\x00\x00\x00\x00\xdc\xf9\xfe\x1f\x00\x00\xff\xff" "\x24\x8e\x11\x20", 2740); syz_mount_image(/*fs=*/0x400000000040, /*dir=*/0x400000000300, /*flags=*/0, /*opts=*/0x4000000002c0, /*chdir=*/1, /*size=*/0xab4, /*img=*/0x400000000340); memcpy((void*)0x400000000000, "./file2\000", 8); syscall(__NR_truncate, /*file=*/0x400000000000ul, /*len=*/0xeaul); } int main(void) { syscall(__NR_mmap, /*addr=*/0x3ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x400000000000ul, /*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=*/0x400001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; do_sandbox_none(); return 0; }