// https://syzkaller.appspot.com/bug?id=f86606dfb403cc9435c0ed5f17e1d80c110cddef // 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 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; } 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"); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { 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; } } } void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000000, "hfsplus\000", 8); memcpy((void*)0x20000080, "./file0\000", 8); memcpy( (void*)0x20000180, "\x78\x9c\xec\xdd\x4b\x68\x1c\xe7\x1d\x00\xf0\xff\xec\x4b\xbb\x2e\x38\x72" "\xe2\x47\x5a\x02\x59\x62\x48\x4b\x45\x6d\xc9\x42\x69\xd5\x4b\xdd\x52\x8a" "\x0e\xa1\x84\xf4\xd0\xf3\x62\xcb\xb1\xf0\x5a\x0e\x92\x52\x64\x53\x1a\xa5" "\x8f\x7b\x0f\x39\xf5\x94\x1e\x74\x0b\x3d\x94\xf4\x6e\x68\xcf\x0d\x29\x25" "\x57\x1d\x03\x85\x5c\x72\xd2\x4d\x65\x66\x67\xf6\x21\xad\x76\x57\xb6\x5e" "\x4d\x7f\x3f\x31\x3b\xdf\x7c\xaf\xf9\xe6\x3f\x3b\x33\xbb\x3b\x88\x09\xe0" "\xff\xd6\xd2\x4c\x54\x9e\x46\x12\x4b\x33\x6f\x6e\xa6\xcb\x3b\xdb\xf3\xed" "\xf2\xf6\xfc\x54\x5e\xdc\x8e\x88\x5a\x44\x94\x22\x2a\x9d\x59\x24\xab\x91" "\x95\xde\xce\xa7\xf8\x66\x9a\x99\xd7\x4f\xba\x1d\xff\x6b\x70\x3d\x1f\xae" "\x2c\xbe\xfd\xf9\x57\x3b\x5f\x54\xbb\x39\x95\xa2\x7e\x32\xd0\x6e\xbc\xda" "\xc1\xac\xad\x7c\x8a\x66\x44\x94\xf3\xf9\x41\xd5\x43\x7a\xfc\x64\xff\xea" "\x07\xfa\xbb\x73\x68\x7f\x93\xea\x6d\x61\x1a\xb0\xeb\x45\xe0\xe2\x4f\xcf" "\xd5\x2b\x3c\xb7\xbd\x03\xb6\xba\x65\x1f\xff\x3b\x7b\x1d\xd5\xfc\x28\xc7" "\x2d\x70\x4e\x25\xb1\x37\x34\x7f\x3a\xe2\x42\x44\xd4\x23\x3a\x57\xfd\xfc" "\xec\x50\x3a\xd5\xc1\x9d\x80\xad\xb3\x1e\x00\x00\x00\x00\x1c\x55\xe3\xe8" "\x4d\x5e\xd8\x8d\xdd\xd8\x8c\x8b\x27\x31\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\xf8\xba\x4a\x22\xca\x9d\x59\x36\x95\x8a\x74\x33\x92\xe2\xf9\xff" "\xb5\x3c\x2f\xf2\xf4\x39\x34\xfe\x41\x88\x9f\x4d\x75\xe6\x4f\x4f\x7e\x30" "\x00\x00\x00\x00\x00\x00\x00\x70\xe2\x5e\xdd\x8d\xdd\xd8\x8c\x8b\xc5\xf2" "\x5e\x92\xdd\xf3\x7f\xad\xef\x1e\xff\x37\xe2\xbd\x58\x8f\xe5\x58\x8b\x1b" "\xb1\x19\xad\xd8\x88\x8d\x58\x8b\xb9\x88\x98\xee\xeb\xa8\xb6\xd9\xda\xd8" "\x58\x9b\xcb\x5a\x46\x5c\x1e\xd1\xf2\x56\x7c\x3a\xa4\xe5\xad\xc3\xc7\x78" "\xfb\x98\xb7\x19\x00\x00\x00\x00\x00\x00\x00\xce\xb9\xfa\x98\xf2\x07\xd5" "\x83\x79\xbf\x8d\xa5\xde\xfd\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\x38\x0f\x92\x88\x72\x67\x96\x4d\x97\x8b\xf4\x74\x94\x2a\x11\x51\x2f" "\xea\x6d\x45\x7c\x1a\x11\xb5\xb3\x1d\xed\x91\x24\xc3\x32\x9f\x9e\xfe\x38" "\x00\x00\x00\xe0\xb9\xd4\x07\x17\x93\xfa\x04\x6d\x5e\x78\x3f\x76\x63\x33" "\x2e\x16\xcb\x7b\x49\xf6\x9d\xff\x6a\xf6\x7d\xb9\x1e\xef\xc5\x6a\x6c\xc4" "\x4a\x6c\x44\x3b\x96\xe3\x6e\xfe\x1d\x3a\xfd\xd6\x5f\xda\xd9\x9e\x6f\xef" "\x6c\xcf\x3f\x4c\xa7\x83\xfd\xfe\xf8\xcb\x23\x0d\x3d\xeb\x31\x3a\xbf\x3d" "\x0c\x5f\xf3\xcb\x59\x8d\x46\xdc\x8b\x95\x2c\xe7\x46\xdc\x89\x24\xf6\x32" "\xa5\xbc\x97\x97\x77\xb6\xe7\xd3\xf9\xc3\xe1\xe3\xfa\x20\x1d\x53\xf2\xa3" "\xdc\x88\xd1\x94\xfb\xd2\x77\xd3\x97\x6b\x9f\x64\xe9\x3f\x0e\xfe\x8a\x50" "\x39\xd2\x26\x3e\xa3\xd2\xa1\x25\xd3\x59\x69\xb5\x1b\x91\xd9\x7c\x6c\x69" "\x8b\x4b\x45\x04\x86\x47\x62\x60\xef\x0c\x7b\x9b\x54\x46\xae\x69\x2e\x4a" "\xdd\x5f\x7e\x2e\x8f\x5e\xd3\xf0\x98\x7f\x30\x7a\x9b\x2f\xec\xab\x35\xf4" "\x97\x9b\x3e\x53\x63\xca\x8f\xcf\xfe\x48\xdc\x8a\x52\x77\x0f\x5d\x1d\x1d" "\x89\x88\x6f\xff\xed\xe3\x5f\xde\x6f\xaf\x3e\xb8\x7f\x6f\x7d\x66\xdc\x26" "\x9d\xb1\xf7\xc7\xd6\xd8\x1f\x89\xf9\xbe\x48\x5c\xfb\x1a\x45\x62\xbc\xd9" "\x2c\x12\x57\xba\xcb\x4b\xf1\xb3\xf8\x45\xcc\xc4\x97\x53\x6f\xc5\x5a\xac" "\xc4\xaf\xa2\x15\x1b\xb1\xdc\x2c\xca\x5b\xf9\xfb\x39\x7d\x9d\x1e\x1d\xa9" "\xcf\x2e\xf4\x2f\xbd\x35\x6e\x24\xe9\x31\xd9\xec\x9e\xbf\x86\x8d\xa9\x19" "\x03\x63\x8a\x66\xfc\x34\x4b\xb5\xe2\xb5\x6c\x9f\x5e\x8c\x95\x48\xe2\x51" "\x44\x2c\xc7\x1b\xd9\xdf\xad\x98\xeb\x9e\x0d\x7a\x7b\xf8\xca\x04\x47\x7d" "\x69\x82\x33\x6d\x9f\xeb\xdf\xc9\x66\xdd\x30\x45\xe3\xf0\xba\x7f\x99\xac" "\xcb\xe3\x92\xc6\xf5\x52\x5f\x5c\xfb\xcf\xb9\xd3\x59\x59\x7f\x4e\x2f\x4a" "\x2f\x0e\x8d\x52\x71\xad\x9b\xfc\x7a\xd4\xa7\xf2\xad\x3c\x91\xf6\xf0\xbb" "\x91\xd7\x87\xd3\xb6\x3f\x12\x73\x7d\x91\x78\xe9\xb0\xf7\x4b\x27\xa4\x7f" "\xce\xae\x26\xeb\xed\xd5\x07\x6b\xf7\x5b\xef\x4e\xb8\xbe\xd7\xf3\x79\x7a" "\x1c\xfd\x61\x82\xab\xc4\xe9\x49\xb7\xe6\xc5\xa8\xe7\x1b\x77\x29\x7b\x4d" "\xb2\x63\x6a\x36\x2b\x7b\xa9\x7b\x85\x1d\x8c\x57\x2d\xbf\xe3\xd2\x51\x3a" "\x50\x76\xa5\xdb\xae\x73\xa4\xfe\x3c\x1e\xc5\xdd\x81\x23\xf5\xfb\xb1\x10" "\x0b\xb1\x98\xd5\xbe\x9a\xd5\xae\x1e\xb8\x62\xa5\x65\xd7\xba\x3d\x0d\x9e" "\xc3\xd3\xb2\xf4\x93\x56\xa5\x7b\x63\xa7\xff\xf3\xd6\xa3\x68\x77\x3e\x0f" "\x01\x70\xbe\x5d\xf8\xee\x85\x5a\xe3\x3f\x8d\x7f\x36\x3e\x6a\xfc\xbe\x71" "\xbf\xf1\x66\xfd\x27\x53\x3f\x98\x7a\xa5\x16\xd5\x7f\x54\x7f\x58\x99\x2d" "\xbf\x5e\x7a\x25\xf9\x6b\x7c\x14\xbf\xe9\x7d\xff\x07\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x9e\xdd\xfa\xe3\x27\x0f\x5a\xed\xf6\xf2\xda\xf0\x44\x69\x78\x51\x32\xba" "\x55\xab\xbd\x57\x3c\x48\x6c\x44\x9d\x81\x44\x92\x3f\x2a\x67\x82\xca\xc9" "\xfa\xe3\x27\x7b\x63\x3b\x1c\x9d\x28\x9e\x1c\xf7\x8c\xcd\x8f\x33\x51\x3c" "\x86\x6f\x7c\xe5\xe6\xc8\x7e\x2a\xcf\x35\x8c\x64\x6b\xff\xfe\xaa\x8f\xdf" "\x17\xc5\x53\x9e\x26\x58\x45\x72\x20\xe0\x69\xe3\x67\x0e\x5d\xb1\xe6\x5e" "\x4e\xf5\x1c\xec\xca\xfd\x89\xe6\xf1\x75\x58\xbc\x61\xfb\x8a\x8e\xfe\xee" "\x6d\x0c\xdb\x5f\xe5\x88\x18\x56\x79\xcc\x89\xa3\x7c\x1c\x67\x1f\xe0\x2c" "\xdd\xdc\x78\xf8\xee\xcd\xf5\xc7\x4f\xbe\xb7\xf2\xb0\xf5\xce\xf2\x3b\xcb" "\xab\xd5\x85\x85\xc5\xd9\xc5\x85\x37\xe6\x6f\xde\x5b\x69\x2f\xcf\x76\x5e" "\xfb\x1a\x9c\xca\xc3\x6f\x81\xd3\xd0\xff\x71\xa2\xab\x16\x11\xaf\x8e\x6f" "\x3b\xe2\x41\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x09\x3a\x8d\xff" "\x85\x38\xeb\x6d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xb7\x2d\xcd\x44\xe5\x69\x24\x31\x37" "\x7b\x63\x36\x5d\xde\xd9\x9e\x6f\xa7\x53\x91\xee\xd5\xac\x44\x44\x29\x22" "\x92\x5f\x47\x24\x7f\x8f\xb8\x1d\x9d\x29\xa6\xfb\xba\x4b\x0e\x5b\xcf\x87" "\x2b\x8b\x6f\x7f\xfe\xd5\xce\x17\xbd\xbe\x2a\x45\xfd\x52\xc4\xd6\xa1\xed" "\x26\xb3\x95\x4f\xd1\x8c\x88\x72\x3e\x3f\xae\xfe\xee\x8c\xef\xaf\xd6\x4b" "\x4e\x0d\x29\x4e\xba\x91\x49\x03\x76\xbd\x08\x1c\x9c\xb5\xff\x06\x00\x00" "\xff\xff\x92\xc1\xed\x05", 1770); syz_mount_image( /*fs=*/0x20000000, /*dir=*/0x20000080, /*flags=MS_I_VERSION|MS_STRICTATIME|MS_NOEXEC|MS_NODEV*/ 0x180000c, /*opts=*/0x200006c0, /*chdir=*/1, /*size=*/0x6ea, /*img=*/0x20000180); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; loop(); return 0; }