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