// https://syzkaller.appspot.com/bug?id=73a4263f057243fb32c83d1f55ba7d69a58286f6 // 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 319 #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; } static long syz_open_dev(volatile long a0, volatile long a1, volatile long a2) { if (a0 == 0xc || a0 == 0xb) { char buf[128]; sprintf(buf, "/dev/%s/%d:%d", a0 == 0xc ? "char" : "block", (uint8_t)a1, (uint8_t)a2); return open(buf, O_RDWR, 0); } else { char buf[1024]; char* hash; strncpy(buf, (char*)a0, sizeof(buf) - 1); buf[sizeof(buf) - 1] = 0; while ((hash = strchr(buf, '#'))) { *hash = '0' + (char)(a1 % 10); a1 /= 10; } return open(buf, a2, 0); } } //% 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_common() { 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); 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 = 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); setup_common(); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); setup_binderfs(); loop(); exit(1); } uint64_t r[1] = {0xffffffffffffffff}; void loop(void) { intptr_t res = 0; memcpy((void*)0x20000600, "hfsplus\000", 8); memcpy((void*)0x20000640, "./file0\000", 8); memcpy((void*)0x20000240, "\x00\x2f\x00\xbf\xc5\x11\xdb\x24\xa8\xaf\x61\xca\xd2\xd8\x55\x06\xe7" "\xf8\x2a\x2b\xc2\x00", 22); memcpy( (void*)0x200006c0, "\x78\x9c\xec\xdd\xc1\x6b\x1c\xd7\x1d\x07\xf0\xef\xac\xad\xb5\xa4\x82\xb3" "\x76\xec\x24\x2e\x85\x8a\x14\x42\x89\xa9\x2d\x69\x9d\x54\x85\x42\xdb\x34" "\x2d\xa2\x84\x12\xe8\x25\x10\x72\x10\xf5\x2a\x16\x5e\x3b\x41\xda\x14\x25" "\x87\xa2\x96\xfe\x05\xfd\x0b\x52\x8a\x7a\xc8\xa9\x87\x9e\x4a\x0b\x39\xf4" "\xdc\x7f\x41\x25\xc7\x42\x4f\xbe\xe8\xe6\x32\xb3\xb3\xda\xb5\xbd\x51\xe4" "\x58\xd1\xae\xe2\xcf\x07\x66\xdf\x7b\xf3\x66\xde\xfc\xe6\xa7\x99\x61\x66" "\x16\xb1\x01\x9e\x5a\xab\x6f\x65\x66\x27\x45\x56\xaf\xbe\xb1\x5d\xb6\xf7" "\x76\xdb\xdd\xbd\xdd\xf6\x9d\x41\x3d\xc9\xb9\x24\x8d\x64\x36\x49\x51\xce" "\xfe\x5b\x92\xcf\x92\x9d\xf4\xa7\x5c\x19\x74\x8c\x94\x8f\x78\x67\xbe\x79" "\xef\x93\xb7\xaf\xac\xf7\x5b\xb3\xf5\x54\x2d\x5f\x1c\xb6\xde\xd1\x1c\xc4" "\xd2\xea\xc7\x5a\x95\xc7\x35\xde\xf2\x13\x8f\x37\xdc\xc3\x85\x24\x17\xeb" "\x12\x26\xee\xfe\xc0\x7f\xc6\x76\x3f\xe1\x79\x09\x00\x4c\xb3\x22\x39\x33" "\x6e\x7e\x2b\x99\xaf\x6f\xd6\xcb\xe7\x80\xfe\x5d\x71\xff\x1e\xfb\x54\xdb" "\x99\x74\x00\x00\x00\x00\x70\x02\x9e\xd9\xcf\x7e\xb6\x73\x7e\xd2\x71\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x69\x52\xff\xfe\x7f\x51\x4f\x8d\x41" "\x7d\x21\xc5\xe0\xf7\xff\x9b\xf5\xbc\xd4\xf5\x53\xed\xd3\x49\x07\x00\x00" "\x00\x00\x00\x00\x00\x00\xc7\xe0\xdb\xfb\xd9\xcf\x76\xce\x0f\xda\xf7\x8b" "\xea\x3b\xff\x17\xab\xc6\xa5\xea\xf3\x1b\xf9\x20\x5b\xe9\x64\x33\xd7\xb2" "\x9d\xb5\xf4\xd2\xcb\x66\x96\x92\xb4\x46\x06\x6a\x6e\xaf\xf5\x7a\x9b\x4b" "\x47\x58\x73\x79\xec\x9a\xcb\x27\xb3\xbf\x00\x00\x00\x00\x00\x00\x00\xf0" "\x35\xf5\xfb\xac\x0e\xbf\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x80\x69\x50\x24\x67\xfa\x45\x35\x5d\x1a\xd4\x5b\x69\x9c\x4d\x32\x9b\xa4" "\x59\x2e\xb7\x93\xfc\x63\x50\x3f\xcd\x3e\x9d\x74\x00\x00\x00\x00\x70\x02" "\x9e\xd9\xcf\x7e\xb6\x73\x7e\xd0\xbe\x5f\x54\xcf\xfc\xcf\x55\xcf\xfd\xb3" "\xf9\x20\x77\xd3\xcb\x46\x7a\xe9\xa6\x93\x9b\xd5\xbb\x80\xfe\x53\x7f\x63" "\x6f\xb7\xdd\xdd\xdb\x6d\xdf\x29\xa7\x47\xc7\xfd\xc9\xff\x1e\x2b\x8c\x6a" "\xc4\xf4\xdf\x3d\x8c\xdf\xf2\x62\xb5\xc4\xe5\x83\x35\x56\xf3\xf3\xfc\x2a" "\x57\xb3\x90\x37\xb3\x99\x8d\xfc\x26\x6b\xe9\xa5\x93\x85\xbc\x5e\xd5\xd6" "\x52\xa4\x55\xbf\xbd\x68\x0d\xe2\x1c\x1f\xef\x8f\x1f\x68\xbd\xf9\x45\xb1" "\xbe\x50\x45\x32\x97\xf5\x6c\x54\xb1\x5d\xcb\xaf\xf3\x5e\xba\xb9\x99\x46" "\xb5\x0f\xd5\x32\x87\x6f\xf1\x77\x65\x76\x8a\x1f\xd5\x8e\x98\xa3\x9b\x75" "\x59\xee\xd1\x2f\xea\x72\x3a\xb4\xaa\x8c\xcc\x1c\x64\x64\xb1\xce\x7d\x99" "\x8d\x0b\x87\x67\xe2\x31\x8f\x93\x87\xb7\xb4\x94\xc6\xc1\x3b\xa8\x4b\x5f" "\x41\xce\xe7\xeb\xb2\xcc\xf5\xeb\x53\x9d\xf3\xe5\x91\xa3\xef\xb9\xc3\x33" "\x91\xbc\xf4\xe7\x3f\xde\xbb\xd5\xbd\x7b\xfb\xd6\xfa\xd6\xd5\xe9\xd9\xa5" "\x2f\xe9\xe1\x4c\xb4\x47\x32\xf1\xfc\x53\x95\x89\x66\x9d\x8d\xfe\x55\xf4" "\xf1\xae\x96\x2f\x56\xeb\x9e\xcf\x46\x7e\x99\xf7\x72\x33\x9d\xbc\x9a\x1b" "\x59\xc9\x72\x5e\xc9\x8d\x2c\xe5\x07\x79\x65\x24\xaf\x97\x8f\x70\xae\x35" "\x1e\xef\x5c\xfb\xce\x77\xeb\xca\x4c\x92\x9f\xd5\xe5\x74\x28\xf3\x7a\x61" "\x24\xaf\xa3\x57\xba\x56\xd5\x37\x3a\x67\x98\xa5\x8b\xc7\x7f\x45\x3a\xfb" "\xcd\xba\x52\x1e\xac\xaf\x4d\xdd\x15\xe9\xc2\x43\xd7\xe6\x41\x26\x9e\x3d" "\x3c\x13\x7f\xba\x5f\x7e\x6e\x75\xef\xde\xde\xbc\xb5\xf6\xfe\x11\xb7\xf7" "\x52\x5d\x96\x19\xf8\xe9\x54\x65\xa2\x3c\x5e\x2e\x96\x7f\xac\xaa\xf5\xe0" "\xd1\x51\xf6\x3d\x3b\xb6\x6f\xa9\xea\xbb\x74\xd0\xd7\x78\xa4\xef\xf2\x41" "\xdf\x17\x9d\xa9\xcd\xfa\x1e\xee\xd1\x91\x96\xab\xbe\xe7\xc7\xf6\xb5\xab" "\xbe\x17\x46\xfa\xc6\xdd\xe5\x00\x30\xf5\xe6\x5f\x9e\x6f\xce\xfd\x77\xee" "\xdf\x73\x1f\xcf\xfd\x61\xee\xd6\xdc\x1b\xb3\xaf\x9d\x5b\x39\xf7\xad\x66" "\x66\xfe\x75\xf6\xef\x67\xfe\xda\xf8\x4b\xe3\x87\xc5\xcb\xf9\x38\xbf\x1d" "\x3e\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x5f\xde\xd6\x87\x1f\xdd\x5e\xeb\x76\x3b" "\x9b\x2a\x2a\x2a\x2a\x07\x95\x49\x5f\x99\x80\xaf\xda\xf5\xde\x9d\xf7\xaf" "\x6f\x7d\xf8\xd1\xf7\x36\xee\xac\xbd\xdb\x79\xb7\x73\xf7\xc6\xca\xf7\xdb" "\xaf\xde\x58\x5a\x59\xb9\xbe\xbe\xd1\xed\x2c\xf6\x3f\x27\x1d\x25\x00\x70" "\x9c\x86\x37\xfd\x93\x8e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\xf8\x3c\x27\xf1\xef\xc4\x93\xde\x47\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xeb\x6d\xf5\xad\xcc\xec\xa4\xc8\xd2" "\xe2\xb5\xc5\xb2\xbd\xb7\xdb\xee\x96\xd3\xa0\x3e\x5c\x72\x36\x49\x51\x56" "\xfe\x99\xe4\xb3\x64\x27\xfd\x29\xad\x91\xe1\x8a\xcf\xdb\xce\x3b\xf3\xcd" "\x7b\x9f\xbc\x7d\x65\x7d\x38\xd6\xec\x60\xf9\xe2\xb0\xf5\x8e\xe6\x81\x58" "\x1a\x0f\xc5\xf4\xa4\xe3\x2d\x3f\xf1\x78\xc3\x3d\x5c\x48\x72\xb1\x2e\x61" "\xe2\xfe\x1f\x00\x00\xff\xff\x26\x9c\x03\x7d", 1487); syz_mount_image(/*fs=*/0x20000600, /*dir=*/0x20000640, /*flags=*/0, /*opts=*/0x20000240, /*chdir=*/1, /*size=*/0x5cf, /*img=*/0x200006c0); memcpy((void*)0x200001c0, "/dev/loop#\000", 11); res = -1; res = syz_open_dev(/*dev=*/0x200001c0, /*id=*/0, /*flags=*/0); if (res != -1) r[0] = res; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x4c09, /*arg=*/0x800ul); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); do_sandbox_none(); return 0; }