// https://syzkaller.appspot.com/bug?id=a5df9adcade3bea1137c135c02ea9e524d1e9983 // 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, 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 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, loopfd = -1, 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) { memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; 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) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } 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*)0x20000500, "hfsplus\000", 8); memcpy((void*)0x20000080, "./file0\000", 8); memcpy( (void*)0x20000b80, "\x78\x9c\xec\xdd\x4d\x6f\x5c\x57\x1d\x07\xe0\xdf\x9d\x8c\xed\x4c\x10\xa9" "\xdb\x26\x25\xa0\x4a\x58\x8d\x54\x10\x16\x89\x1d\xcb\x05\xb3\xa0\x01\x21" "\xe4\x45\x85\xaa\xb2\x60\x6d\x25\x4e\x63\x65\xe2\x56\xb6\x0b\x6e\x05\xc8" "\xbc\x6f\x11\xea\x07\x28\x0b\xef\x58\x21\xb1\x8f\x54\xd6\xb0\xeb\xd6\xcb" "\x4a\x48\x6c\xba\xf2\x0a\xa3\x7b\xe7\x8e\x67\x92\x71\x9c\x71\x9a\x64\x26" "\xe9\xf3\x44\x67\xce\x39\xf7\xdc\x73\xee\x39\xff\xb9\xf7\xce\x8b\x15\x4d" "\x80\x2f\xac\xe5\xd9\x34\xef\xa4\xc8\xf2\xec\x1b\xdb\x65\x7d\x6f\x77\xa1" "\xbd\xb7\xbb\x30\x55\x37\xb7\x93\x94\xe5\x46\xd2\xac\x37\x15\xeb\x49\xf1" "\x71\x72\x35\x9d\x94\xaf\x96\x1b\xbb\x8d\xf7\x3b\xce\x87\x6b\x4b\x6f\x7d" "\xf2\xd9\xde\xa7\x9d\x5a\xb3\x4e\xd5\xfe\x8d\xe3\xfa\x75\x9a\x1f\x64\xa7" "\x4e\x99\x49\x72\xaa\xce\x07\x4d\x0c\x31\xd4\xe0\x78\xd7\xee\x3b\xde\xb0" "\x8a\xc3\x15\x96\x01\xbb\xd8\x0d\x1c\x8c\xda\xc1\x80\x9d\x93\x74\x3f\xe6" "\xba\x05\x9e\x16\x45\xe7\x75\x73\xc0\x74\x72\x26\xc9\xe9\xfa\x7d\x40\xea" "\xbb\xc3\x30\x2f\xca\x63\x6d\xe7\x60\x6a\xd4\x53\x00\x00\x00\x80\xc7\xee" "\xb9\xfd\xec\x67\x3b\x67\x47\x3d\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x78\x9a\xd4\xbf\xff\x5f\xd4\xa9\xd1\x2d\xcf\xa4\xe8\xfe\xfe\xff\x64\xbd" "\x2d\x75\x79\x7c\xbc\xfe\xab\x13\x77\xb9\x53\x3d\xb6\x1e\xc3\x64\x00\x00" "\x00\x00\x00\x00\x00\xe0\xc9\xf9\xfa\x7e\xf6\xb3\x9d\xb3\xdd\xfa\x41\x51" "\xfd\xcd\xff\x95\xaa\x72\x2e\x39\x98\xaa\x4a\x9b\x59\xcd\x46\x2e\x65\x3b" "\x2b\xd9\xca\x56\x36\x32\x9f\x64\xba\x6f\xa0\xc9\xed\x95\xad\xad\x8d\xf9" "\x5e\xcf\x24\x5f\xca\x7b\x83\x3d\xff\x77\x70\x64\xcf\x2b\x4f\x66\xbd\x00" "\x00\x00\x00\x00\x00\x00\xf0\xcc\xf8\xfe\x5d\xb5\xdf\x66\xb9\xf7\xf7\x7f" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x07\x45\x72\xaa\x93\x55" "\xe9\x5c\xb7\x3c\x9d\x46\x33\xc9\xe9\x24\x93\xe5\x7e\x3b\xc9\xbf\xbb\xe5" "\xa7\xd9\x9d\x51\x4f\x00\x00\x00\x00\x9e\x80\xe7\xf6\xb3\x9f\xed\x9c\xed" "\xd6\x0f\x8a\xea\x33\xff\x4b\xd5\xe7\xfe\xd3\x79\x2f\xeb\xd9\xca\x5a\xb6" "\xd2\xce\x6a\xae\x57\xdf\x05\x74\x3e\xf5\x37\xf6\x76\x17\xda\x7b\xbb\x0b" "\xb7\xcb\x34\x38\xee\x0f\xfe\x7b\xa2\x69\x54\x23\xa6\xf3\xdd\xc3\xd1\x47" "\xbe\x50\xed\xd1\xca\x8d\xac\x55\x5b\x2e\xe5\x5a\xde\x49\x3b\xd7\xd3\xa8" "\x7a\x96\x2e\x74\xe7\x73\xf4\xbc\x7e\x53\xce\xa9\x78\xbd\x36\xe4\xcc\xae" "\xd7\x79\xb9\xf2\x3f\xd7\x79\x4f\xeb\x44\xab\x7c\xb4\xa6\xab\x88\x4c\x1c" "\x46\x64\xae\x9e\x5b\x19\x8d\xe7\x8f\x8f\xc4\x09\x9f\x9d\x7b\x8f\x34\x9f" "\xc6\xe1\x37\x3f\xe7\x1e\x43\xcc\xcf\xd4\x79\xb9\x9e\x3f\x0e\xc4\x7c\x94" "\xee\x8d\xc4\x95\xbe\xb3\xef\xa5\xe3\x23\x91\x7c\xe3\x1f\x7f\xfb\xd9\xcd" "\xf6\xfa\xad\x9b\x37\x36\x67\xc7\x67\x49\x0f\xe9\xde\x48\x2c\xf4\x45\x62" "\xe7\x30\x0a\x45\xb2\xf3\xac\x47\x62\xae\x8a\xc4\xf9\xc3\xfa\x72\x7e\x9c" "\x9f\x66\x36\x33\x79\x33\x1b\x59\xcb\xcf\xb3\x92\xad\xac\x66\x26\x3f\xaa" "\x4a\x2b\xf5\xf9\x5c\x3e\x4e\x1f\x7f\xce\x5c\xbd\xab\xf6\xe6\x83\x66\x32" "\x59\x3f\x2f\x9d\xbb\xe8\xc9\xe6\xf4\x4a\xd5\xf7\x6c\xd6\xf2\x93\xbc\x93" "\xeb\x59\xcd\x6b\xd5\xbf\x2b\x99\xcf\x77\xb2\x98\xc5\x2c\xf5\x3d\xc3\xe7" "\x87\xb8\xea\x1b\x27\xbb\xea\x2f\x7e\xb3\x2e\x94\xf7\xd4\x3f\x8d\xf8\xde" "\x7a\xb7\x32\xae\xcf\xf7\xc5\xb5\xff\x9e\x3b\x5d\xb5\xf5\x6f\xe9\x45\xe9" "\x85\x47\x7f\x6f\x6c\x7e\xad\x2e\x94\xc7\xf8\x5d\x9d\x8f\x87\x7b\x23\x31" "\xdf\x17\x89\x17\x8f\x8f\xc4\x5f\x0f\xca\xc7\xcd\xf6\xfa\xad\x8d\x9b\x2b" "\xef\x0e\x79\xbc\x57\xeb\xbc\xbc\x8e\xfe\x30\x56\xaf\x12\xe5\xf9\xf2\x42" "\xf9\x64\x55\xb5\xbb\xcf\x8e\xb2\xed\xc5\x23\xdb\xe6\xab\xb6\x73\x87\x6d" "\x8d\x81\xb6\xf3\x87\x6d\x0f\xba\x52\x27\xeb\xf7\x70\x83\x23\x5d\xa9\xda" "\xbe\x72\x64\xdb\x42\xd5\x76\xa1\xaf\xed\xa8\xf7\x5b\x00\x8c\xbd\x33\xdf" "\x3a\x33\xd9\xfa\x4f\xeb\x5f\xad\x8f\x5a\xbf\x6f\xdd\x6c\xbd\x71\xfa\x87" "\x53\xdf\x9d\x7a\x79\x32\x13\xff\x9c\xf8\x5e\x73\xee\xd4\xab\x8d\x97\x8b" "\xbf\xe7\xa3\xfc\xba\xf7\xf9\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x78\x9b\xef\x7f" "\x70\x6b\xa5\xdd\x5e\xdd\x18\x71\xa1\xa8\x7f\xc8\xe7\xa1\xc7\xf9\x4b\xbd" "\xa0\xf1\x58\x8e\x82\x42\xa7\xf0\x8b\x2f\x8f\xd7\x85\x36\x74\xe1\xa8\xbb" "\xc5\xfe\xf8\xfc\xd6\x16\xf0\xb9\x5d\xde\xba\xfd\xee\xe5\xcd\xf7\x3f\xf8" "\xf6\xda\xed\x95\xb7\x57\xdf\x5e\x5d\x9f\x58\x5c\x5c\x9a\x5b\x5a\x7c\x6d" "\xe1\xf2\x8d\xb5\xf6\xea\x5c\xe7\x71\xd4\xb3\x04\x1e\x87\xde\x8b\xfe\xa8" "\x67\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\xeb\x49\xfc\x77\x82\x51" "\xaf\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x78\xba\x2d\xcf\xa6\x79\x27\x45\xe6\xe7\x2e\xcd\x95" "\xf5\xbd\xdd\x85\x76\x99\xba\xe5\xde\x9e\xcd\x24\x8d\x24\xc5\x2f\x93\xe2" "\xe3\xe4\x6a\x3a\x29\xd3\xc9\x4e\x77\xa7\xe2\x7e\xc7\xf9\x70\x6d\xe9\xad" "\x4f\x3e\xdb\xfb\xb4\x37\x56\xb3\xbb\x7f\xe3\xb8\x7e\xc3\xd9\xa9\x53\x66" "\x92\x9c\xaa\xf3\x47\x35\xde\xb5\xcf\x3d\x5e\x71\xb8\xc2\x32\x60\x17\xbb" "\x81\x83\x51\xfb\x7f\x00\x00\x00\xff\xff\x66\x5f\x08\xd7", 1562); syz_mount_image(/*fs=*/0x20000500, /*dir=*/0x20000080, /*flags=*/0, /*opts=*/0x20000040, /*chdir=*/3, /*size=*/0x61a, /*img=*/0x20000b80); 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=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); do_sandbox_none(); return 0; }