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