// https://syzkaller.appspot.com/bug?id=5c7a91fd23f0b6188f08ec3c00f79ccff605121a // 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 #ifndef __NR_memfd_create #define __NR_memfd_create 319 #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, 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) { if (strstr(opts, "errors=panic") || strstr(opts, "errors=remount-ro") == 0) 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; } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; retry: while (umount2(dir, MNT_DETACH | UMOUNT_NOFOLLOW) == 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, MNT_DETACH | UMOUNT_NOFOLLOW) == 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, MNT_DETACH | UMOUNT_NOFOLLOW)) 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, MNT_DETACH | UMOUNT_NOFOLLOW)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } static int inject_fault(int nth) { int fd; fd = open("/proc/thread-self/fail-nth", O_RDWR); if (fd == -1) exit(1); char buf[16]; sprintf(buf, "%d", nth); if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) exit(1); return fd; } 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")) { } } static void setup_fault() { static struct { const char* file; const char* val; bool fatal; } files[] = { {"/sys/kernel/debug/failslab/ignore-gfp-wait", "N", true}, {"/sys/kernel/debug/fail_futex/ignore-private", "N", false}, {"/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem", "N", false}, {"/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait", "N", false}, {"/sys/kernel/debug/fail_page_alloc/min-order", "0", false}, }; unsigned i; for (i = 0; i < sizeof(files) / sizeof(files[0]); i++) { if (!write_file(files[i].file, files[i].val)) { if (files[i].fatal) exit(1); } } } 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 (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } void execute_one(void) { memcpy((void*)0x20000000, "udf\000", 4); memcpy((void*)0x20000040, "./file0\000", 8); memcpy((void*)0x20000140, "nostrict", 8); *(uint8_t*)0x20000148 = 0x2c; memcpy((void*)0x20000149, "umask", 5); *(uint8_t*)0x2000014e = 0x3d; sprintf((char*)0x2000014f, "%023llo", (long long)1); *(uint8_t*)0x20000166 = 0x2c; memcpy((void*)0x20000167, "undelete", 8); *(uint8_t*)0x2000016f = 0x2c; memcpy((void*)0x20000170, "iocharset", 9); *(uint8_t*)0x20000179 = 0x3d; memcpy((void*)0x2000017a, "cp775", 5); *(uint8_t*)0x2000017f = 0x2c; *(uint8_t*)0x20000180 = 0; memcpy( (void*)0x20001840, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x7d\x07\xf0\xdf\x1b\x92\x22\x29\xb7\x15" "\x13\x3b\x8a\xdd\xc6\xed\xa6\x2d\x52\x99\xb1\x5c\xfd\x8b\xa9\x58\x85\xbb" "\xaa\x69\xb6\x01\x64\x99\x08\xc5\xdc\x02\x70\x25\xae\xd4\x85\xa9\x25\x41" "\x52\x8d\x6c\xa4\x05\xd3\x4b\x0f\x3d\x04\x28\x8a\x1e\x72\x22\xd0\x1a\x05" "\x52\x34\x30\x9a\x22\xe8\x91\x6d\x5d\x20\xb9\xf8\x50\xe4\xd4\x13\xd1\xc2" "\x46\x50\xf4\xc0\x16\x01\x72\x0a\x58\xcc\xec\x5b\x6a\x49\x51\xb6\x22\x8a" "\x14\xe5\x7c\x3e\x36\xf9\xdd\x9d\x79\x6f\xe6\xbd\x99\xf5\x0c\x4d\xf0\xcd" "\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\xe2\xf7\x5e" "\xbd\x78\xea\x74\x7a\xd4\xad\x00\x00\x0e\xd2\xe5\xa9\x2f\x9f\x3a\xe3\xfe" "\x0f\x00\x3f\x57\xae\xf8\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x38\xec\x52\x14\xf1\x64\xa4\x58\xb8\xbc\x91\x66\xaa\xf7\x1d\x43\x97" "\x5a\xed\x5b\xb7\xa7\xc7\x27\x76\xaf\x36\x9c\xaa\x9a\x7d\x55\xf9\xf2\x6b" "\xe8\xf4\x99\xb3\xe7\xbe\xf0\xe2\xd8\xf9\x6e\x7e\x78\xfd\x87\xed\x99\x78" "\x7d\xea\xca\xc5\xda\x2b\xf3\x37\x17\x16\x9b\x4b\x4b\xcd\xd9\xda\x74\xbb" "\x75\x6d\x7e\xb6\x79\xdf\x5b\xd8\x6b\xfd\x9d\x46\xab\x03\x50\xbb\xf9\xc6" "\xad\xd9\xeb\xd7\x97\x6a\x67\x5e\x38\xbb\x6d\xf5\xed\x91\x0f\x06\x9f\x38" "\x3e\x72\x61\xec\xb9\x93\xcf\x76\xcb\x4e\x8f\x4f\x4c\x4c\xf5\x94\xe9\x1f" "\x78\xe0\xbd\xdf\xe5\x5e\x23\x3c\x8e\x44\x11\x27\x23\xc5\xf3\xdf\xf9\x51" "\x6a\x44\x44\x11\x7b\x3f\x16\x1f\xf1\xd9\xd9\x6f\xc3\x55\x27\x46\xab\x4e" "\x4c\x8f\x4f\x54\x1d\x99\x6b\x35\xda\xcb\xe5\xca\xc9\xee\x81\x28\x22\x6a" "\x3d\x95\xea\xdd\x63\x74\x00\xe7\x62\x4f\xea\x11\x2b\x65\xf3\xcb\x06\x8f" "\x96\xdd\x9b\x5a\x68\x2c\x36\xae\xce\x35\x6b\x93\x8d\xc5\xe5\xd6\x72\x6b" "\xbe\x3d\x99\x3a\xad\x2d\xfb\x53\x8b\x22\xce\xa7\x88\xd5\x88\x58\x1f\xbc" "\x7b\x73\x03\x51\x44\x7f\xa4\xf8\xd6\xb1\x8d\x74\x35\x22\xfa\xba\xc7\xe1" "\xf3\xd5\xc0\xe0\x7b\xb7\xa3\xd8\xc7\x3e\xde\x87\xb2\x9d\xb5\x81\x88\xd5" "\xe2\x31\x38\x67\x87\xd8\x60\x14\xf1\x5a\xa4\xf8\xf1\xbb\x27\xe2\x5a\x79" "\xcc\xf2\x57\x7c\x2e\xe2\xb5\x32\xbf\x17\xf1\x76\x99\x2f\x47\xa4\xf2\x83" "\x71\x2e\xe2\xfd\x5d\x3e\x47\x3c\x9e\xfa\xa3\x88\x3f\x2f\xcf\xff\x85\x8d" "\x34\x5b\x5d\x0f\xba\xd7\x95\x4b\x5f\xa9\x7d\xa9\x7d\x7d\xbe\xa7\x6c\xf7" "\xba\xf2\xd8\xdf\x1f\x0e\xd2\x21\xbf\x36\x0d\x45\x11\x8d\xea\x8a\xbf\x91" "\x1e\xfc\x87\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e" "\xb6\xe1\x28\xe2\x99\x48\xf1\xea\xbf\xff\x51\x35\xae\x38\xaa\x71\xe9\xc7" "\x2e\x8c\xfd\xfe\xc8\x2f\xf6\x8e\x19\x7f\xfa\x23\xb6\x53\x96\x7d\x21\x22" "\x56\x8a\xfb\x1b\x93\x7b\x24\x0f\x21\x9e\x4c\x93\x29\xdd\x35\x96\x78\xd3" "\x08\xd3\x03\x32\x14\x45\xfc\x71\x1e\xff\xf7\x8d\x47\xdd\x18\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x9f\x6b\x45\xfc\x30\x52" "\xbc\xf4\xde\x89\xb4\x1a\xbd\x73\x8a\xb7\xda\x37\x6a\x57\x1a\x57\xe7\x3a" "\xb3\xc2\x76\xe7\xfe\xed\xce\x99\xbe\xb9\xb9\xb9\x59\x4b\x9d\xac\xe7\x9c" "\xc9\xb9\x92\x73\x35\xe7\x5a\xce\xf5\x9c\x51\xe4\xfa\x39\xeb\x39\x67\x72" "\xae\xe4\x5c\xcd\xb9\x96\x73\x3d\x67\xf4\xe5\xfa\x39\xeb\x39\x67\x72\xae" "\xe4\x5c\xcd\xb9\x96\x73\x3d\x67\xf4\xe7\xfa\x39\xeb\x39\x67\x72\xae\xe4" "\x5c\xcd\xb9\x96\x73\x3d\x67\x1c\x92\xb9\x7b\x01\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x3e\x4e\x8a\x28\xe2\xa7\x91\xe2\x9b\x5f\xdb\x48\x91\x22" "\xa2\x1e\x31\x13\x9d\x5c\x1b\x7c\xd4\xad\x03\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x83\xa9\x88\xef\x46" "\x8a\xda\x1f\xd4\xb7\x96\xf5\x47\x44\xaa\xfe\xed\x38\x51\x7e\x3b\x17\xf5" "\x23\x65\x7e\x32\xea\x63\x65\xbe\x1c\xf5\x8b\x39\x1b\x55\xf6\xd7\xbf\xf1" "\x08\xda\xcf\xde\x0c\xa4\x22\x7e\x10\x29\x06\x87\xde\xd9\x3a\xe1\xf9\xfc" "\x0f\x74\xde\x6d\x7d\x0c\xe2\xed\xaf\xdf\x79\xf7\xcb\xfd\x9d\xec\xeb\xae" "\x1c\xf9\x60\xf0\x89\xe3\xc7\x2e\x8c\x4d\xfc\xea\xd3\xf7\x7a\x9d\x76\x6b" "\xc0\xe8\xa5\x56\xfb\xd6\xed\xda\xf4\xf8\xc4\xc4\x54\xcf\xe2\xfe\xbc\xf7" "\x4f\xf6\x2c\x1b\xc9\xfb\x2d\x1e\x4e\xd7\x89\x88\xa5\x37\xdf\x7a\xa3\x31" "\x37\xd7\x5c\xf4\xc2\x0b\x2f\xbc\xd8\x7a\xf1\xa8\xaf\x4c\x1c\x84\xf2\xfe" "\xff\x7e\xa4\xf8\xed\xf7\xfe\xa3\x7b\xc3\xef\xde\xff\x7f\xa1\xf3\x6e\xeb" "\x0e\x1f\x3f\xf9\x93\x3b\xf7\xff\x97\x76\x6e\x68\x9f\xee\xff\x4f\xf6\x2c" "\x7b\x29\xff\x34\x32\xd0\x1f\x31\xb4\x7c\x73\x61\xe0\x78\xc4\xd0\xd2\x9b" "\x6f\x9d\x6c\xdd\x6c\xdc\x68\xde\x68\xb6\xcf\x9d\x3a\xf5\xc5\xb1\xb1\x2f" "\x9e\x3d\x35\x70\x24\x62\xe8\x7a\x6b\xae\xd9\xf3\x6a\xcf\x87\x0a\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x60\xa5\x22\x7e\x37\x52\x34" "\x7e\xb0\x91\x6a\x11\x71\xbb\x1a\xaf\x35\x72\x61\xec\xb9\x93\xcf\xf6\x45" "\x5f\x35\xde\x6a\xdb\xb8\xad\xd7\xa7\xae\x5c\xac\xbd\x32\x7f\x73\x61\xb1" "\xb9\xb4\xd4\x9c\xad\x4d\xb7\x5b\xd7\xe6\x67\x9b\xf7\xbb\xbb\xa1\x6a\xb8" "\xd7\xf4\xf8\xc4\xbe\x74\xe6\x23\x0d\xef\x73\xfb\x87\x87\x5e\x99\x5f\x78" "\x73\xb1\x75\xe3\x0f\x97\x77\x5d\x7f\x74\xe8\xe2\xd5\xa5\xe5\xc5\xc6\xb5" "\xdd\x57\xc7\x70\x14\x11\xf5\xde\x25\xa3\x55\x83\xa7\xc7\x27\xaa\x46\xcf" "\xb5\x1a\xed\xaa\xea\xe4\xae\x83\xe9\x7e\x76\x03\xa9\x88\xff\x8c\x14\xd7" "\xce\xd5\xd2\x67\xf3\xb2\x3c\xfe\x6f\xe7\x08\xff\x6d\xe3\xff\x57\x76\x6e" "\x68\x9f\xc6\xff\x7d\xa2\x67\x59\xb9\xcf\x94\x8a\xf8\x49\xa4\xf8\xad\xbf" "\x78\x3a\x3e\x5b\xb5\xf3\x68\xdc\x75\xcc\x72\xb9\xbf\x89\x14\xa3\xe7\x3f" "\x93\xcb\xc5\x91\xb2\x5c\xb7\x0d\x9d\xe7\x0a\x74\x46\x06\x96\x65\xff\x37" "\x52\xfc\xc3\x4f\xb7\x97\xed\x8e\x87\x7c\xf2\x4e\xd9\xd3\xf7\x7d\x60\x1f" "\x13\xe5\xf9\x3f\x16\x29\xbe\xfb\x67\xdf\x8e\x5f\xcf\xcb\xb6\x3f\xff\x61" "\xf7\xf3\x7f\x74\xe7\x86\xf6\xe9\xfc\x3f\xd5\xb3\xec\xe8\xb6\xe7\x15\xec" "\xb9\xeb\xe4\xf3\x7f\x32\x52\xbc\xfc\xe4\x3b\xf1\x1b\x79\xd9\x87\x3d\xff" "\xa3\xfb\xec\x8d\x13\xb9\xf0\xd6\xf3\x39\xf6\xe9\xfc\x7f\xaa\x67\xd9\x48" "\xde\xef\x6f\x3e\x9c\xae\x03\x00\x00\x00\x00\x00\x00\x00\x00\x3c\xd6\x06" "\x52\x11\x7f\x1b\x29\x9e\x9d\xe8\x4f\x2f\xe6\x65\xf7\xf3\xf7\x7f\xb3\x3b" "\x37\xb4\x4f\x7f\xff\xf5\xe9\x9e\x65\xb3\x07\x34\x5f\xd1\x9e\x0f\x2a\x00" "\x00\x00\x00\x1c\x12\x03\xa9\x88\x1f\x46\x8a\x1b\xcb\xef\x6c\x8d\xa1\xde" "\x3e\xfe\xbb\x67\xfc\xe7\xef\xdc\x19\xff\x39\x9e\x76\xac\xad\x7e\xcf\xf7" "\x4b\xd5\x73\x03\x1e\xe6\xef\xff\x7a\x8d\xe4\xfd\xce\xec\xbd\xdb\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\xa8\xa4\x54\xc4" "\x8b\x79\x3e\xf5\x99\xbb\xe6\x53\x1f\xde\x56\x6e\x2d\x52\xbc\xfa\xdf\xcf" "\xe7\x72\xe9\x78\x59\xae\x3b\x0f\xfc\x48\xf5\x7d\xe8\xf2\x7c\xfb\xe4\xc5" "\xb9\xb9\xf9\x6b\x8d\xe5\xc6\xd5\xb9\x66\x6d\x6a\xa1\x71\xad\x59\xd6\x7d" "\x2a\x52\x6c\xfc\xf5\x67\x72\xdd\xa2\x9a\x5f\xbd\x3b\xdf\x7c\x67\x8e\xf7" "\x3b\x73\xb1\x2f\x46\x8a\x89\xbf\xeb\x96\xed\xcc\xc5\xde\x9d\x9b\xfc\xa9" "\x3b\x65\x4f\x97\x65\x3f\x11\x29\xfe\xeb\xef\xb7\x97\xed\xce\x63\xfd\xa9" "\x3b\x65\xcf\x94\x65\xff\x2a\x52\x7c\xf5\x9f\x76\x2f\x7b\xfc\x4e\xd9\xb3" "\x65\xd9\x6f\x47\x8a\xef\x7f\xb5\xd6\x2d\x7b\xb4\x2c\xdb\x7d\x3e\xea\xa7" "\xbb\x65\x7f\x2d\x22\xe6\xe7\xee\x7a\x14\x2a\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xac\x06\x52\x11\x7f\x1a\x29\xfe\xe7" "\xe6\xea\xd6\x58\xfe\x3c\xff\xff\x40\xcf\xdb\xca\xdb\x5f\xef\x99\xef\x7f" "\x87\xdb\xd5\x3c\xff\x23\xd5\xfc\xff\xf7\x7a\xfd\x20\xf3\xff\x8f\x3c\x9c" "\x6e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x63\x25\x45\x11\x6f\x45\x8a\x85\xcb\x1b\x69\x6d\xb0\x7c\xdf\x31\x74" "\xa9\xd5\xbe\x75\x7b\x7a\x7c\x62\xf7\x6a\xc3\xa9\xaa\xd9\x57\x95\x2f\xbf" "\x86\x4e\x9f\x39\x7b\xee\x0b\x2f\x8e\x9d\xef\xe6\x87\xd7\x7f\xd8\x9e\x89" "\xd7\xa7\xae\x5c\xac\xbd\x32\x7f\x73\x61\xb1\xb9\xb4\xd4\x9c\xad\x4d\xb7" "\x5b\xd7\xe6\x67\x9b\xf7\xbd\x85\xbd\xd6\xdf\x69\xb4\x3a\x00\xb5\x9b\x6f" "\xdc\x9a\xbd\x7e\x7d\xa9\x76\xe6\x85\xb3\xdb\x56\xdf\x1e\xf9\x60\xf0\x89" "\xe3\x23\x17\xc6\x9e\x3b\xf9\x6c\xb7\xec\xf4\xf8\xc4\xc4\x54\x4f\x99\xfe" "\x81\x07\xde\xfb\x5d\xd2\x3d\x96\x1f\x89\x22\xfe\x32\x52\x3c\xff\x9d\x1f" "\xa5\x7f\x1e\x8c\x28\x62\x8f\xc7\xa2\xdc\xd1\xc1\x9e\xfb\x9d\x86\xab\x4e" "\x8c\x56\x9d\x98\x1e\x9f\xa8\x3a\x32\xd7\x6a\xb4\x97\xcb\x95\x93\xdd\x03" "\x51\x44\xd4\x7a\x2a\xd5\xbb\xc7\xe8\x00\xce\xc5\x9e\xd4\x23\x56\xca\xe6" "\x97\x0d\x1e\x2d\xbb\x37\xb5\xd0\x58\x6c\x5c\x9d\x6b\xd6\x26\x1b\x8b\xcb" "\xad\xe5\xd6\x7c\x7b\x32\x75\x5a\x5b\xf6\xa7\x16\x45\x9c\x4f\x11\xab\x11" "\xb1\x3e\x78\xf7\xe6\x06\xa2\x88\x37\x22\xc5\xb7\x8e\x6d\xa4\x7f\x19\x8c" "\xe8\xeb\x1e\x87\xcf\x5f\x9e\xfa\xf2\xa9\x33\xf7\x6e\x47\xb1\x8f\x7d\xbc" "\x0f\x65\x3b\x6b\x03\x11\xab\xc5\x63\x70\xce\x0e\xb1\xc1\x28\xe2\x1f\x23" "\xc5\x8f\xdf\x3d\x11\xff\x3a\x18\xd1\x5f\x1e\xb7\xe1\x88\xf8\x5c\xc4\x6b" "\x65\x81\xef\x45\xbc\x5d\xe6\xcb\x11\xa9\xfc\x60\x9c\x8b\x78\x7f\x97\xcf" "\x11\x8f\xa7\xfe\x28\xe2\xff\xca\xf3\x7f\x61\x23\xbd\x3b\x58\x5e\x0f\xba" "\xd7\x95\x4b\x5f\xa9\x7d\xa9\x7d\x7d\xbe\xa7\x6c\xf7\xba\xb2\xd7\x7b\xe5" "\x47\xfc\x6c\xb1\xdf\x86\x0f\x74\x6f\x87\xfc\xda\x34\x14\x45\x7c\xbf\xba" "\xe2\x6f\xa4\x7f\xf3\xdf\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\xc0\x21\x52\xc4\xaf\x44\x8a\x97\xde\x3b\x91\xaa\xf1\xc1\x5b\x63\x8a" "\x5b\xed\x1b\xb5\x2b\x8d\xab\x73\x9d\x61\x7d\xdd\xb1\x7f\xdd\x31\xd3\x9b" "\x9b\x9b\x9b\xb5\xd4\xc9\x7a\xce\x99\x9c\x2b\x39\x57\x73\xae\xe5\x5c\xcf" "\x19\x45\xae\x9f\xb3\x9e\x73\x26\xe7\x4a\xce\xd5\x9c\x6b\x39\xd7\x73\x46" "\x5f\xae\x9f\xb3\x9e\x73\x26\xe7\x4a\xce\xd5\x9c\x6b\x39\xd7\x73\x46\x7f" "\xae\x9f\xb3\x9e\x73\x26\xe7\x4a\xce\xd5\x9c\x6b\x39\xd7\x73\xc6\x21\x19" "\xbb\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\xbc" "\x14\xd5\x3f\x29\xbe\xf9\xb5\x8d\xb4\x39\xd8\x99\x5f\x7a\x26\x3a\xb9\x66" "\x3e\xd0\x8f\xbd\xff\x0f\x00\x00\xff\xff\x6f\x4a\xfe\x6d", 3074); syz_mount_image(0x20000000, 0x20000040, 8, 0x20000140, 1, 0xc02, 0x20001840); memcpy((void*)0x200000c0, "./bus\000", 6); inject_fault(14); syscall(__NR_open, 0x200000c0ul, 0x141043ul, 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); setup_fault(); use_temporary_dir(); loop(); return 0; }