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