// https://syzkaller.appspot.com/bug?id=82ad35bc46edf3f7249743dfc76b48af0a13c78e // 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_clone #define __NR_clone 220 #endif #ifndef __NR_exit #define __NR_exit 93 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } 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; } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW; retry: while (umount2(dir, umount_flags) == 0) { } dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exit(1); } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); while (umount2(filename, umount_flags) == 0) { } struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EPERM) { int fd = open(filename, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exit(1); if (umount2(filename, umount_flags)) exit(1); } } closedir(dp); for (int i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EPERM) { int fd = open(dir, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, umount_flags)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void reset_loop() { char buf[64]; snprintf(buf, sizeof(buf), "/dev/loop%llu", procid); int loopfd = open(buf, O_RDWR); if (loopfd != -1) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); if (symlink("/dev/binderfs", "./binderfs")) { } } #define USLEEP_FORKED_CHILD (3 * 50 * 1000) static long handle_clone_ret(long ret) { if (ret != 0) { return ret; } usleep(USLEEP_FORKED_CHILD); syscall(__NR_exit, 0); while (1) { } } static long syz_clone(volatile long flags, volatile long stack, volatile long stack_len, volatile long ptid, volatile long ctid, volatile long tls) { long sp = (stack + stack_len) & ~15; long ret = (long)syscall(__NR_clone, flags & ~CLONE_VM, sp, ptid, ctid, tls); return handle_clone_ret(ret); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000600, "hfsplus\000", 8); memcpy((void*)0x200001c0, "./bus\000", 6); memcpy( (void*)0x200022c0, "\x66\x6f\x72\x63\x65\x00\x00\x69\x61\xe3\x8c\x80\x00\x00\x00\x00\x00\x00" "\x00\x30\x30\x30\x30\x30\x30\x07\x3f\x41\x10\x1b\xb0\x30\x31\x39\x2c\x63" "\x72\x65\x61\x36\xd9\xbb\x3d\x25\xf4\xea\x83\x66\xa8\x71\x6c\xc2\x4c\xf9" "\x13\x02\x00\xcb\x37\x71\x24\x02\xbd\xc8\x02\x3a\x1c\xeb\x6c\xff\x75\x72" "\x4a\xcd\xc6\xbf\x74\x17\x01\x00\x53\x45\xd3\x03\x00\x9d\xdd\xcf\xd2\xec" "\x6a\xeb\x82\xeb\xa7\x56\xc9\x70\xa9\x1f\x0f\x7f\xb7\x82\x97\x50\x34\x06" "\x44\x60\x8b\x88\x72\x92\xd3\xe1\x82\x1a\x70\x4e\x46\x58\x4f\xb9\x46\xcf" "\x3b\x27\x7b\x74\xf2\xc0\x46\x7d\x63\xf3\xd9\x4d\x7b\x3f\x3b\x27\xb1\xb9" "\x53\xc9\x28\xa6\x3d\x77\x86\xe2\x3b\x2d\xcf\x98\xf4\xbb\xb4\x90\x3a\x06" "\xab\x8c\x62\x7b\x7b\xf4\xb1\xce\x08\x9d\x07\xbc\x4a\xb9\x32\x95\xbe\x12" "\xb8\x2c\x45\x8f\x84\xc3\xae\x25\xbc\xf2\xd8\x53\xe9\x8b\xc7\x3f\xd8\xae" "\xba\xbb\x35\x96\x57\x99\x7a\x39\x66\x7f\x5d\x6b\xeb\x1a\xca\x91\xb0\xae" "\xb7\x9f\x37\xab\x02\x05\x0b\xde\x52\xe8\xc3\x0d\xa6\xe0\x03\x90\x10\xc8" "\x37\x91\xd1\xd7\x84\x7f\x51\x16\xb5\x44\xb9\xf3\x72\x66\x39\x13\xff\xa7" "\x89\xb2\x10\x26\x0b\xe4\x78\x0c\x06\x1f\xdf\xed\x19\x1d\xf0\x7d\x52\xd6" "\x8d\xb9\x29\x63\xef\x8f\xbe\x85\x11\xae\x0c\xe4\xab\xce\xb6\x51\x6b\x98" "\x73\x78\x78\x83\xad\x79\x74\x47\x00\xe9\xeb\xbe\x4a\x0f\x56\x46\x75\xca" "\x9e\x56\xf4\xcc\xcc\x8d\xe7\x8f\x7c\xa8\x03\xd7\xc0\xf2\x66\xc3\xb5\xcb" "\x9b\x32\x0d\xd6\xe9\x26\xc5\xb8\x88\x08\xcc\x43\x53\x31\xa9\xa7\x5b\xb9" "\xf9\xca\x0f\x4d\x00\x56\xa1\x14\xda\xeb\x4c\x5e\x31\x71\xde\x79\xea\xff" "\xff\xff\x1f\x7d\x0e\x91\x27\xd8\xfd\xd8\x30\x51\xdb\xb6\xfc\xb2\x5b\x8d" "\x09\x96\x72\x93\x85\x5e\x13\xc0\xd4\xbb\x8e\xec\x9b\xf8\x1b\x53\x75\xdb" "\xe9\xec\xed\x05\xb5\xb6\x0c\xb8\xc9\xf1\x58\xf1\x8d\xed\xe7\x22\x46\x55" "\xe9\x01\x0c\x60\x31\x5b\x96\x45\xa7\x87\x67\xa5\xca\x8e\xbf\xd7\xd2\xd4" "\xe6\xae\x97\x06\xf0\x0a\xe9\xd5\x97\xe9\x5a\x5e\x62\x89\x7e\x9a\x38\x9d" "\x91\x43\xe6\xeb\x06\x9e\x03\x7c\x29\xff\xff\xff\x00\x00\xd7\xfe\x78\x80" "\xf6\x67\x54\x64\xcb\xaa\x3b\x7d\x50\x0c\xe2\xe9\x76\x85\xd4\x11\x12\x8b" "\x72\xb6\xfa\x8a\x57\x92\x21\xc6\x77\x6c\xc0\x15\xb2\x6e\x66\xf6\x15\x51" "\x06\x9b\x4b\x05\x00\xdc\x1f\x6e\x72\x5b\xd7\x5a\xa9\x87\x2c\xf6\xde\x46" "\x8d\xf0\x03\x75\xc8\x5a\x78\x17\x95\x18\xc6\xf1\xec\x00\x00\xbb\xa7\xb1" "\x1c\xbe\x38\x58\x59\x97\x2f\x41\xba\x4c\x2d\xd6\x30\x3f\xdb\x36\xd9\x82" "\x9c\x00\x08\xba\x31\xa1\x50\xc0\xf0\x5d\x0a\xa8\x3f\xaf\x53\x36\xe0\x0b" "\x76\x9a\x5e\x41\x59\xa2\x2e\x38\x5e\x5f\x99\x12\xfa\x11\x10\xe0\x57\xb4" "\xa9\x61\x98\xbe\x5f\x3e\xd9\x39\x4a\x7d\x34\x01\x00\x00\x00\x00\x06\x00" "\x00\x00\x00\x00\x00\x00\x43\x33\x06\x7b\x81\xae\x9c\x93\xcf\x2f\x99\x22" "\x09\x56\x5d\x76\xaa\xa1\x44\x7c\x34\x3e\x11\x38\x7d\x69\x19\x03\xf3\x43" "\x0a\x3c\x31\xe4\xf1\x3f\xca\xf3\xf0\xb9\x57\xf8\xd7\x2b\xea\x2c\xb3\x8a" "\x98\x6e\x3d\x47\xd5\x72\x5c\x83\x55\xcf\xc4\xaf\x88\xbd\xf7\x0b\x2d\x90" "\xf5\x00\x51\x80\x76\xaa\x83\x77\x8a\x3f\x25\x5e\x9b\x2c\xa5\xf6\xb7\x6b" "\x38\x5a\xfc\x20\x1d\x59\x6f\x66\xf4\xb2\x38\xc7\x9f\x77\xb6\xe3\xb7\xd1" "\x1d\x9e\x81\x70\x63\x41\x1c\x5e\x5d\xb8\x15\xaa\xe6\x53\xb0\xfe\x97\x7d" "\x19\x06\x76\x3c\x6c\x21\x32\x3d\x07\x28\x95\xf3\x77\xbe\x1f\x01\x00\x01" "\x00\xb6\x38\x36\x05\x84\xbf\xc2\xe1\x39\x76\x5c\x52\xbf\x05\x90\xb0\x83" "\x98\x26\x6c\x8a\x41\x05\x56\x69\xf3\xc4\x07\x5c\x87\xe9\xd3\xfb\xfa\xb6" "\xbf\xbd\x59\xb1\x2a\x2e\x0c\x0d\xe4\x4b\x19\xc1\x0e\xeb\x9d\x96\x0e\x9f" "\x4e\x4d\x07\x00\xd4\x40\x3d\x03\x49\xdc\x87\xef\x2f\xc7\x3d\x10\x70\xf7" "\xde\xe3\xf1\x73\xe9\x31\x36\x04\x67\x36\x8a\x43\x56\xa0\x29\xc9\x3d\xc4" "\xff\x72\xde\x5c\x5f\xf1\x27\x95\xca\x39\xb7\x6e\x5a\x27\xd3\xf5\x04\x14" "\xc9\x90\x14\x9b\x7b\x16\x8b\x29\x1c\xbf\xde\x8e\x6f\xec\x83\xc1\xc1\xec" "\x53\x38\xa7\xfd\xe3\xf5\x8c\x8b\x2d\x54\xb4\x2a\x12\x58\xca\x6e\xd9\xfd" "\xd6\x57\x70\x4e\x84\x62\x7d\x61\x04\x97\x64\xa0\xc1\xb2\x58\xe3\xcf\x38" "\xf9\xf3\xe1\xfc\xff\x9b\xf1\x29\x47\xef\xdf\x2b\x94\x3a\x91\x2d\x36\x87" "\x7b\xd6\x7d\x14\x98\x61\x16\x7a\x9a\x1f\xd8\x84\x4f\x74\xfc\x5a\x33\xb1" "\x35\xd5\x62\x0e\x5c\x3f\x29\xa8\x9e\xc4\xc9\x5b\xf9\xad\x71\xf7\xc2\x8c" "\xd9\x68\x7a\x7a\x13\x5e\x0a\x9b\x19\x26\xdc\x8a\x05\x3c\xee\x53\xc6\x49" "\xff\x33\xb1\xff\xff\x4f\x1d\xb7\xf2\xa8\x24\x53\x1f\xea\x00\x00\x00\x00" "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x04\x00\x1c\x74\x69" "\x12\x7b\xdb\x79\x16\x9c\xe4\x46\x09\xff\xb8\x33\x51\x36\x68\xb2\xc7\x0a" "\x2e\x5b\x27\x1b\xf2\x83\xde\x11\xc8\xc2\x5a\xc2\x36\x1a\x79\x21\x8c\xa6" "\x40\x01\x4a\x12\xa6\xd8\x81\x56\xd4\xac\x80\xa7\xcf\xd4\x4a\xcc\x61\x96" "\x5b\x06\x6d\x45\xfd\x3e\x88\x91\x4b\xbc\x6f\x01\x2b\x13\x39\x8f\x00\x92" "\x3e\x75\x93\x1a\x0a\x4b\x44\xb3\x26\x60\xe2\xe8\x0e\x2d\x78\x43\x8c\xfd" "\xd0\x75\xbf\xad\x30\x27\xf1\x75\x04\x4b\x4d\x4e\xc2\xe3\xf7\x68\x8a\x4b" "\x70\xcc\x7c\x02\x7f\x45\x01\x01\x79\x52\xa9\x08\x97\x10\x04\xb5\x70\xbc" "\x0b\x98\x87\xb3\x49\x0b\xc1\x5b\x7c\x90\x22\x8a\x7e\x37\x70\xf4\x98\xee" "\x33\xd0\x46\xb9\x63\x25\x46\xec\xbd\x8d\xb6\xef\x99\x99\xc1\x95\xd0\xc0" "\xc4\x5f\x40\x63\xc6\xa7\x9b\xff\x63\x6d\x09\xb1\x36\xda\xb1\x18\xed\x4b" "\x18\xa2\x6d\xfb\x6d\x9f\x87\x9e\xed\x51\xeb\xf0\x3f\x77\x5a\x84\x37\x15" "\x3c\x2f\x32\xa3\x61\x86\x3c\xc7\xc9\x7f\xd1\x30\x92\x7d\x10\x2d\x73\xe6" "\x3f\xac\x03\xcf\x34\xd7\x1b\xd8\x3d\xed\x80\x54\xfd\x96\xfb\x46\x0d\x61" "\x3b\x45\x4d\x81\x46\x1c\x1c\xea\xab\x5e\xd5\x05\x18\xa3\x1b\xa5\x55\xf3" "\xa1\x96\x31\xd6\xd3\xec\x8d\x97\x30\x8f\x66\xde\xe5\x14\x2c\x4b\xfc\x3a" "\xb9\x39\x0c\x03\xb3\x8e\xcd\x02\x44\x98\xe0\xe0\x10\xc4\x62\x82\x22\xd8" "\x2e\x1b\x18\x21\xef\xbf\x74\x4c\x28\x9e\x9c\x6c\xa3\x29\x36\x4b\xb6\x02" "\x6b\x07\x18\xb7\x4c\x89\x2b\x26\x7e\x97\xa0\xfc\x95\x25\xca\x8d\x89\x15" "\x87\x01\xa8\x25\x8e\x44\x39\x8d\xf8\x25\x79\x22\x48\x0a\xa6\xd3\xd1\xf6" "\x2f\x6a\x5d\x06\x0f\x51\xea\xe4\x77\xa3\x03\xf7\x4a\x92\x39\xf1\x60\x6f" "\x2b\x6c\x9e\x40\xc8\x02\x87\xaf\x5e\x48\xd1\x1d\x7b\x36\x27\xe1\x12\x09" "\x35\x1e\x21\x72\x2b\x40\xf8\x0c\x4b\x9d\xb2\x39\xbc\x65\x23\x4f\x82\x6b" "\x68\xee\x77\x0e\x97\x91\x92\xdf\xbe\x65\x6b\x44\xc9\xa8\x92\x55\x2a\x46" "\x41\x90\x12\xa3\xf0\xf5\xe7\x01\x70\x3c\x28\x97\x26\x4d\x22\xec\xf8\xd7" "\x0c\xfc\x7e\x68\x43\x0d\x8f\x03\x2b\xac\xd9\x00\x96\x1b\x6f\x0c\x1e\x52" "\x96\xd8\x2a\xd8\x6d\xfc\xce\xb9\xc4\xb4\xbe\xb2\xc5\x7c\x37\x2a\x68\xe1" "\x40\xd5\x13\x11\x5e\xc4\x8a\xc3\xd7\x77\x15\xe0\x70\x5b\x9c\xe9\xd3\x55" "\x18\xf2\x2f\xe2\xb7\x21\x68\xa7\xf4\x5d\xf2\x45\x66\x45\x41\x3a\x4a\x4b" "\xdf\x9a\xb1\xda\x81", 1535); sprintf((char*)0x200028bf, "%020llu", (long long)-1); *(uint16_t*)0x200028d3 = -1; sprintf((char*)0x200028d5, "%020llu", (long long)-1); memcpy( (void*)0x200018c0, "\x78\x9c\xec\xdd\x4f\x68\x1c\xd7\x1d\x07\xf0\xef\xac\x56\xb2\xe4\x82\xad" "\x24\x76\x63\x4a\xa0\x22\x86\xb4\x54\xd4\xd6\x1f\x94\x56\xbd\xd4\x2d\xa5" "\xe8\x10\x4a\x48\x0f\x3d\x0b\x5b\x8e\x84\xd7\x4a\x90\x94\xa2\x84\xd2\xba" "\xff\xaf\x3d\xe4\x5a\x48\x0f\xba\xf5\x54\xe8\xdd\x90\x9e\x9b\x5b\xae\x3a" "\x06\x0a\xbd\xe4\xa4\x9b\xca\xcc\xce\xae\xd6\xd6\x1f\xaf\xff\x48\xbb\x6a" "\x3e\x1f\xf3\xe6\xbd\x37\x6f\xe6\xcd\x9b\xdf\xfc\xdb\x91\x2c\x36\xc0\x57" "\xd6\xd2\x74\x9a\x0f\x53\x64\x69\xfa\xad\xed\xb2\xbe\xbb\x33\xdf\xda\xdd" "\x99\xbf\x50\x37\xb7\x92\x94\xe5\x46\xd2\x6c\x67\x29\xd6\x93\xe2\xd3\xe4" "\x56\xda\x29\xa3\x3d\xdd\x15\xc7\x6d\xe7\xe3\xb5\xc5\x77\x3e\xff\x72\xf7" "\x8b\x76\xad\x59\xa7\x14\xe3\x2f\x64\x2f\x1e\xd4\x29\x53\x49\x46\xea\xfc" "\xb0\xd1\x67\xea\xef\xf6\xb1\xfd\xf5\xab\xe8\x46\xa6\x0c\xd8\xf5\x32\x7f" "\xf0\x5c\x1d\xc2\x8b\xb1\x7f\xc8\x53\x9d\x99\xc7\x5e\xef\xc0\xf9\x51\xb4" "\x9f\x9b\x87\x4c\x26\x17\x93\x8c\xd7\x9f\x03\x52\xdf\x1d\x1a\x67\x3b\xba" "\x17\xcf\xf3\x17\x00\x00\x80\xaf\x82\xcb\x7b\xd9\xcb\x76\x2e\x0d\x7a\x1c" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x6e\x2c\x2d\x76\x4a\x45\x9d\x1a" "\x9d\xf2\x54\x8a\xce\xf7\xff\x8f\xd5\xf3\x52\x97\xcf\xb5\x87\x83\x1e\x00" "\x00\x00\x00\x00\x00\x00\x00\xbc\x00\xdf\xdc\xcb\x5e\xb6\x73\xa9\x53\xdf" "\x2f\xaa\xdf\xf9\xbf\x5e\x55\xae\x54\xd3\xaf\xe5\x83\x6c\x66\x25\x1b\xb9" "\x91\xed\x2c\x67\x2b\x5b\xd9\xc8\x6c\x92\xc9\x9e\x8e\xc6\xb6\x97\xb7\xb6" "\x36\x66\xfb\x58\x73\xee\xc8\x35\xe7\xce\x66\x7f\x01\x00\x00\x00\x00\x00" "\x00\xe0\xff\xd4\xef\xb2\x74\xf0\xfb\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\x06\x45\x32\xd2\xce\xaa\x74\xa5\x53\x9e\x4c\xa3\x99\x64" "\x3c\xc9\x58\xb9\xdc\x83\xe4\xb3\x4e\xf9\x3c\x7b\x38\xe8\x01\x00\x00\x00" "\xc0\x19\xb8\xbc\x97\xbd\x6c\xe7\x52\xa7\xbe\x5f\x54\xef\xfc\x5f\xaf\xde" "\xfb\xc7\xf3\x41\xd6\xb3\x95\xb5\x6c\xa5\x95\x95\xdc\xa9\x7e\x16\xd0\x7e" "\xeb\x6f\xec\xee\xcc\xb7\x76\x77\xe6\xef\x97\xe9\x70\xbf\x3f\xfa\x6f\x6f" "\xad\xf1\xa4\x61\x8c\xd5\x0b\x8d\x54\xb5\xa3\xb6\x7c\xad\x5a\x62\x22\x77" "\xb3\x56\xcd\xb9\x91\xdb\x79\x2f\xad\xdc\x49\xa3\xdb\xfd\xb5\xce\x78\x8e" "\x1e\xd7\x6f\xcb\x31\x15\x3f\xac\xf5\x19\xa0\x3b\x75\x5e\xee\xf9\x5f\xea" "\x7c\x38\x4c\x56\x11\x19\xed\x46\x64\xa6\x1e\x5b\x19\x8d\x97\x4e\x8e\xc4" "\xa3\x47\xe7\xa9\xb7\x34\x9b\x46\xf7\x27\x3f\x57\x4e\x21\xe6\x17\xeb\xbc" "\xdc\x9f\x3f\x0d\x75\xcc\xe7\xea\xb3\xef\xb3\xf2\x9a\x39\x39\x12\xc9\xb7" "\xfe\xf9\xf7\x5f\xac\xb6\x2e\x64\xf5\xee\xe6\xf4\xf0\xec\xd2\x33\x7a\x3c" "\x12\xf3\x3d\xd7\xe1\xab\xfd\x45\x62\xfd\xde\xea\xdd\xcd\xe6\xb9\x8f\xc4" "\x4c\x15\x89\xab\xdd\xfa\x52\x7e\x9a\x9f\x67\x3a\x53\x79\x3b\x1b\x59\xcb" "\x2f\xb3\x9c\xad\xac\x64\x2a\x3f\xa9\x4a\xcb\xf5\xf9\x5c\x4e\x27\x4f\x8e" "\xd4\xad\x47\x6a\x6f\x3f\x69\x24\x63\xf5\x71\x69\xdf\x45\x9f\x6e\x4c\xaf" "\x57\xeb\x5e\xca\x5a\x7e\x96\xf7\x72\x27\x2b\x79\xb3\xfa\x37\x97\xd9\x7c" "\x2f\x0b\x59\xc8\x62\xcf\x11\xbe\xda\xc7\x55\xdf\x78\xba\xab\xfe\xfa\xb7" "\xeb\xc2\x44\x92\x3f\xd7\xf9\x70\x28\xe3\xfa\x52\x4f\x5c\x7b\xef\xb9\x93" "\x55\x5b\xef\x9c\x83\x28\xbd\x7c\x7c\x94\x8a\x67\xbc\x37\x36\xbf\x51\x17" "\xca\x6d\xfc\xbe\x9f\x47\xeb\x99\x79\x3c\x12\xb3\x3d\x91\x78\xe5\xe4\xf3" "\xe5\x6f\xfb\xe5\x74\xb3\xb5\x7e\x6f\x63\x75\xf9\xfd\x3e\xb7\xf7\x46\x9d" "\x97\xa1\xfc\xe3\x50\x3d\x25\xca\xf3\xe5\xe5\xf2\x60\x55\xb5\x47\xcf\x8e" "\xb2\xed\x95\x23\xdb\x66\xab\xb6\x2b\xdd\xb6\xc6\xa1\xb6\xab\xdd\xb6\x27" "\x5d\xa9\x63\xf5\x67\xb8\xc3\x3d\xcd\x55\x6d\xaf\x1e\xd9\x36\x5f\xb5\x5d" "\xeb\x69\x3b\xea\xf3\x16\x00\x43\xef\xe2\x77\x2e\x8e\x4d\xfc\x67\xe2\xdf" "\x13\x9f\x4c\xfc\x61\x62\x75\xe2\xad\xf1\x1f\x5f\xf8\xfe\x85\xd7\xc6\x32" "\xfa\xaf\xd1\x1f\x34\x67\x46\xde\x68\xbc\x56\xfc\x23\x9f\xe4\xd7\x07\xef" "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xc0\xb3\xdb\xfc\xf0\xa3\x7b\xcb\xad\xd6\xca\xc6" "\x80\x0b\x45\xfd\x45\x3e\x83\x1b\xc6\x6f\x06\x1f\x04\x85\x21\x2e\xec\x5f" "\x1e\x8a\x61\x9c\x4e\x21\x87\x9b\x06\x7d\x67\x02\x4e\xdb\xcd\xad\xfb\xef" "\xdf\xdc\xfc\xf0\xa3\xef\xae\xdd\x5f\x7e\x77\xe5\xdd\x95\xf5\xd1\x85\x85" "\xc5\xbf\x66\xe1\xcd\xf9\x9b\x77\xd7\x5a\x2b\x33\xed\xe9\xa0\x47\x09\x9c" "\x86\x83\x87\xfe\xa0\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\xab" "\xfd\xbf\xff\x9b\xa7\xfa\x87\x37\xe3\x83\xde\x49\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x5c\x5b" "\x9a\x4e\xf3\x61\x8a\xcc\xce\xdc\x98\x29\xeb\xbb\x3b\xf3\xad\x32\x75\xca" "\x07\x4b\x36\x93\x34\x92\x14\xbf\x4a\x8a\x4f\x93\x5b\x69\xa7\x4c\xf6\x74" "\x57\x1c\xb7\x9d\x8f\xd7\x16\xdf\xf9\xfc\xcb\xdd\x2f\x0e\xfa\x6a\x76\x96" "\x6f\x9c\xb4\xde\x91\x46\x1f\x9f\xf1\xa0\x4e\x99\x4a\x32\x52\xe7\xcf\xe1" "\x91\xfe\x6e\x3f\x77\x7f\x45\x77\x0f\xcb\x80\x5d\xef\x04\x0e\x06\xed\x7f" "\x01\x00\x00\xff\xff\x81\xcf\x09\x19", 1539); syz_mount_image( /*fs=*/0x20000600, /*dir=*/0x200001c0, /*flags=MS_LAZYTIME|MS_I_VERSION|MS_SYNCHRONOUS|MS_RELATIME*/ 0x2a00010, /*opts=*/0x200022c0, /*chdir=*/3, /*size=*/0x603, /*img=*/0x200018c0); syz_clone(/*flags=*/0, /*stack=*/0, /*stack_len=*/0, /*parentid=*/0, /*childtid=*/0, /*tls=*/0); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-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=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; use_temporary_dir(); loop(); return 0; }