// https://syzkaller.appspot.com/bug?id=52da7fe45821e13541722c281eec0d818fe822b2 // 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 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_pwritev2 #define __NR_pwritev2 287 #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 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) { 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) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } errno = err; return res; } uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); intptr_t res = 0; memcpy((void*)0x20000ec0, "nilfs2\000", 7); memcpy((void*)0x20000f00, "./file2\000", 8); memset((void*)0x20000f40, 0, 1); memcpy( (void*)0x20000f80, "\x78\x9c\xec\xdd\x4f\x6c\x1c\x57\x19\x00\xf0\x37\xeb\x7f\x49\xec\xc6\xeb" "\xb6\xd0\xb4\xa5\x49\x68\x29\x69\x03\x38\xc1\xc9\xa1\xdc\x52\x29\x02\xa9" "\xaa\xaa\x5e\xb8\xb7\x4a\x93\x36\xc2\x2d\x11\x29\x87\x56\x8d\x92\x72\x0a" "\x12\x87\xa2\xaa\x97\x22\x0e\x45\xed\x0d\x29\x1c\x90\x68\x85\x84\x2a\x24" "\x24\xfe\xf4\xc0\x99\x53\x05\x17\x10\x0a\x52\xa4\x5c\x88\x14\x2f\xb2\xf3" "\xde\x7a\xf7\xc5\xc3\xae\xc7\xf6\xec\xae\xf7\xf7\x93\x3e\xbf\x7d\xf3\x66" "\xe7\xfb\xc6\x76\x9c\x99\xd9\xd9\xb7\x01\x18\x5b\x8d\xb5\xaf\x27\x4f\x1e" "\x28\x42\x78\xef\x93\x77\x4f\x7f\xe7\xf2\xca\x6f\x56\x97\x1d\x6a\xaf\x71" "\x78\xed\x6b\x11\x7b\xcd\x10\xc2\x54\x47\xbf\xc8\xb6\xf7\x79\x5c\x70\xfb" "\xc6\x5b\x67\x56\xdb\x95\xac\x2d\xc2\xd2\xda\xd7\x34\x1e\x9e\xbb\xde\x7e" "\xee\x6c\x08\xe1\x4a\x38\x1c\x3e\x0d\xcd\x70\xe8\x68\xf3\xe6\xd5\x89\x67" "\xcf\x7d\xf4\xfe\x67\x47\x2e\x5d\x78\xe6\x95\x1d\xda\x7d\x00\x00\x18\x2b" "\xd7\xfe\xbc\xfc\xb7\x27\xff\xf9\xa7\xaf\x2f\xdc\xba\x76\xf0\x54\x98\x69" "\x2f\x4f\xc7\xe7\xcd\xd8\x9f\x8d\xc7\xfd\xc7\xe3\xf1\x7d\x3a\xee\x6f\x84" "\xee\x7e\xd1\x11\x9d\xa6\xb3\xf5\x26\x62\x34\xb2\xf5\x26\xb2\xf5\x26\xb3" "\x3c\x93\x25\xf9\xa6\xb2\xed\x4c\x95\xac\x37\xdd\x23\xdf\x44\xc7\xb2\x8d" "\xf6\x13\x00\x00\x00\x46\x51\x3a\xaf\x6d\x86\xa2\xb1\xd8\xd5\x6f\x34\x16" "\x17\xef\x9c\xf7\xaf\xfa\x7c\x7e\xba\x58\x7c\xed\xfc\xf2\xb9\x8b\x03\x2a" "\x14\x00\x00\x00\xa8\xec\xe6\xe5\xb5\x9b\x6e\x85\x10\xa2\x47\xdc\x6a\xb5" "\x5a\xfd\xad\xdb\xbe\xcf\x66\xe0\x35\x0b\x21\xc4\xb6\xc7\xe5\x21\xa8\x41" "\x08\x21\x84\xa8\x14\xad\xf9\xc1\x5e\x7f\x00\x00\x00\x00\xc6\x4f\x9a\x77" "\xa0\x3d\x3f\x58\xee\x4a\x3e\xb3\xc0\xd6\xb4\xb7\xd6\xec\x2f\xff\xf5\xa7" "\x1b\x1b\x3f\x1f\xb6\x41\xdd\xbf\xff\xf2\x8f\x56\xfe\x0f\xdf\xf6\x17\x07" "\x00\x80\xea\xd6\x8f\x26\x27\x07\x5a\xc7\x76\x4b\xfb\x95\x8e\xa3\xd3\x3c" "\x06\xf9\x3c\x82\x13\xd9\xf3\x36\x7b\xfc\xdf\xc8\xb6\xb3\xd9\xef\x62\xd9" "\xbc\x82\xa3\x32\xdf\x60\x59\x9d\xf9\xf7\x75\x58\x95\xd5\x3f\x2a\xff\x1a" "\xca\xea\xcf\xe7\xc3\x1c\x56\x65\xf5\xe7\xf3\x74\x0e\xab\xb2\xfa\x67\x6a" "\xae\xa3\xaa\xb2\xfa\xf7\xd4\x5c\x47\x55\x65\xf5\xef\xad\xb9\x8e\xaa\xca" "\xea\xdf\x57\x73\x1d\x55\x95\xd5\x3f\x5b\x73\x1d\x55\x95\xd5\x3f\x57\x73" "\x1d\x55\x95\xd5\x7f\x4f\xcd\x75\x54\x55\x56\xff\xfe\x9a\xeb\xa8\xaa\xac" "\xfe\x51\xb9\xad\xb6\xac\xfe\x66\xcd\x75\x54\x55\x56\xff\x42\xcd\x75\x54" "\x55\x56\xff\xbd\x35\xd7\x51\x55\x59\xfd\xf7\xd5\x5c\x47\x55\x65\xf5\xdf" "\x5f\x73\x1d\x83\xf2\x48\x6c\xd3\xf7\xe1\x60\x36\xde\x79\xfe\x9c\x9f\xd3" "\x8d\xca\x39\x1e\x00\x00\x00\x8c\xbb\xff\x9a\xff\x4f\x08\x31\x94\xd1\xf1" "\x2a\xf4\xc0\x6b\x11\x62\x14\x62\x79\x08\x6a\x10\x42\x08\x21\xc4\x30\xc7" "\xe5\x41\x5e\x7c\x00\x00\x00\x00\x86\x42\x7a\x5f\x40\x7a\xd7\x7b\x2b\x4a" "\xe3\x13\x3d\xc6\x27\x7b\x8c\x4f\xf5\x18\x9f\xee\x31\x3e\xd3\x63\x1c\x00" "\x00\x00\x08\xe1\xb7\x57\xcf\x3d\xf8\x4e\xb1\xfe\x3e\xff\xad\xce\x87\x97" "\xee\xd8\x4d\xf3\x2f\x6d\x76\x1e\xa3\x7c\x76\xeb\xcd\xe6\xdf\xea\xbc\x67" "\x5b\xcd\x3f\x2a\xf3\x96\x01\x00\x00\x30\x5e\x8a\x6f\x7f\xba\x72\xf4\xf4" "\x07\xaf\x2f\xdc\xba\x76\xf0\x54\xc7\xd9\xef\x4a\x3c\xdf\x4d\xf3\x80\x4e" "\xc6\x6b\x03\x1f\xc7\x7e\xba\x2f\x60\x2e\xeb\x17\xe9\x1c\xfa\x54\x77\x9e" "\x46\xc9\x7a\xf9\xf5\x81\x7b\xca\xb6\xf7\xfc\x16\x77\x14\x00\x00\x00\xc6" "\x58\x3a\x7f\x6f\x86\xa2\xb1\xd8\x71\xde\xdd\x0c\x8d\xc6\xe2\xe2\xfa\xf9" "\xf8\x81\x30\x55\x9c\x3b\xbf\x7c\xf6\x78\xec\xa7\xcf\x67\xf9\xe3\xfc\xd4" "\xcc\xea\xf2\x6f\xd6\x5c\x37\x00\x00\x00\xd0\xbf\xf5\xf3\xfd\x8d\xcf\xff" "\xd3\xe7\xf8\x1e\x08\xd3\xc5\xe2\x6b\xe7\x97\xcf\x5d\xbc\xd3\x9f\x6b\x2f" "\x9f\x6a\x74\x5e\x17\x98\x5f\x5f\x5e\x74\x5e\x17\x68\x66\xcb\x97\x4a\x96" "\x9f\x88\xfd\xf4\xf9\x9d\xaf\xcc\xef\x5d\x5b\xbe\x78\xe6\xfb\xcb\x2f\x6d" "\xf7\xce\x03\x00\x00\xc0\x98\xb8\xf8\xc6\x9b\xdf\x7b\x71\x79\xf9\xec\x0f" "\x3c\xa8\xe3\xc1\xde\x10\xc2\x10\x94\xe1\x81\x07\xbd\x1e\x0c\xfa\x2f\x13" "\x00\x00\xb0\xdd\x3e\xfa\xc7\xbb\x7f\xf9\xe1\x89\xb9\xdf\xdd\x79\xff\x7f" "\x08\x45\x9c\xc1\x2e\xbd\xff\xff\x70\x5c\xaf\x19\xe7\xf6\xfb\x6b\x9c\x22" "\x20\xdd\x27\x90\xde\x07\x70\xd7\xfb\xf5\x5f\xe8\xce\x33\x5f\xb6\xde\x85" "\xee\xf5\x9a\xd9\x7a\x13\x31\x66\xb2\xba\xf7\x74\x6c\x27\x74\xcc\x37\x98" "\x9e\xb7\x50\x96\xaf\xd9\xbd\x9d\xe9\x92\x7c\xb3\x59\xbe\xb9\x2c\x5f\x3e" "\x4f\xc1\x64\xb6\x7e\xca\xb7\x3f\x5b\x9e\xcf\x4f\x98\xd6\x9b\xcf\x96\xe7" "\xf3\x30\x4e\x66\x39\x8a\x2c\xff\xa3\x01\x00\x00\x00\xca\x1d\x7b\xfd\xd5" "\x0b\xc7\x2e\xbe\xf1\xe6\x37\xce\xbf\xfa\xe2\xcb\x67\x5f\x3e\xfb\xda\x89" "\xe3\x4b\xdf\x5a\x7a\x6a\x69\xe9\xe4\xd2\xb1\xb5\xfb\xfa\x8f\x75\xde\xdd" "\x0f\x00\x00\x00\x8c\xa2\xf5\x9b\x7e\x07\x5d\x09\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\xaf\x3a\x3e\x4e\x6c\xd0\xfb\x08" "\x00\x00\x00\xe3\xee\x3f\x97\x43\x08\x57\x84\x10\x42\x08\x21\x84\x10\x42" "\x08\xb1\x9b\xa3\xd5\xca\x3f\x69\x1e\x00\x00\x00\x60\x67\xdd\xbe\xf1\xd6" "\x99\xce\xf6\x2e\x57\x8a\x6d\xcd\xd7\xde\x5a\xf3\x4e\xb3\x12\xf3\xa6\xf6" "\x0f\x8f\xff\xfc\xf1\xd5\x48\xab\x5d\x7f\xba\xfb\x7a\xc9\xbe\x6d\xad\x86" "\x71\x57\xf7\xef\xbf\xfc\xa3\x95\xff\xc3\xb7\xb7\x37\xff\x9e\xf4\xa0\xef" "\xbf\x7f\x8d\xee\x0d\x9c\xaa\x96\xf7\xab\x3f\xfd\xd7\x13\x9d\xf9\x1f\x9a" "\xec\x33\x7f\xbe\xff\xcf\x57\xcb\x7f\x24\xcb\x7f\x24\xf4\x97\xbf\xf5\x41" "\x96\xff\x85\x6a\xf9\x9f\xc8\xf2\xef\xeb\x33\xff\x5d\xfb\x7f\xa1\x5a\xfe" "\x27\x63\xfe\x03\xa9\x9e\xc7\xfa\xcd\xdf\xfd\xf3\x9f\x89\x6d\xda\x8f\xbd" "\x7d\xe6\x3f\x9a\xed\xff\x4b\xa1\xdf\xfc\xd9\xfe\x37\xfb\x4c\x98\xf9\x5a" "\xcc\x0f\x00\xe3\xa8\xd1\x63\xbc\xe2\xe1\xdd\xc0\xa5\xa3\x84\x74\x1c\x3d" "\x1b\xfb\x69\x7f\xe3\xe1\x66\xc8\xef\x7e\xd8\xec\xf1\x7f\x23\xdb\xce\xe4" "\x96\x2b\xef\xde\x6e\x3a\x0e\x7a\x20\xf6\xd3\xf1\xd2\x5c\x96\x37\xd9\x6c" "\xfd\xb3\xd9\xf6\xee\xa9\x58\x67\x6e\x54\xee\x2a\x29\xab\x7f\xbb\x7e\x8e" "\x3b\xad\xac\xfe\xa9\x9a\xeb\xa8\xaa\xac\xfe\xe9\x9a\xeb\xa8\xaa\xac\xfe" "\x99\x9a\xeb\xa8\xaa\xac\xfe\x3d\x35\xd7\x51\x55\x59\xfd\xfd\x9e\x87\x0e" "\x5a\x59\xfd\xa3\x72\x5d\xb9\xac\xfe\xd9\x9a\xeb\xa8\xaa\xac\xfe\xb9\xee" "\xee\xd0\xfe\x77\x56\x56\xff\x66\xff\x1f\x1f\x94\xb2\xfa\xf7\xd7\x5c\x47" "\x55\x65\xf5\xcf\xd7\x5c\x47\x55\x65\xf5\x6f\x7c\x59\x6d\x67\xaf\x7d\x57" "\x51\x56\xff\x42\xcd\x75\x54\x55\x56\xff\xbd\x35\xd7\x51\x55\x59\xfd\xf7" "\xd5\x5c\x47\x55\x65\xf5\xdf\x5f\x73\x1d\x83\xf2\x70\x6c\xcb\xce\x87\xd3" "\xf9\xe7\x7c\x1c\x4b\xfd\x66\xd6\x9f\xd9\xe0\x7b\xd9\xeb\xda\x02\x00\x00" "\x00\x50\x8f\x7f\x9b\xff\x4f\x08\x21\x84\x10\x42\x08\x21\x84\xe8\x11\xf1" "\x55\xf3\x81\xd7\x51\x3d\x5a\xad\x41\x5f\x81\x60\x90\x86\xef\x8e\x2e\x00" "\xea\xe0\xef\xff\x78\xf3\xf3\x1f\x6f\x7e\xfe\xe3\xcd\xcf\x9f\xff\x27\xdd" "\xc3\x5f\x64\xfd\x64\xa2\xc7\xf8\x64\x8f\xf1\xa9\x1e\xe3\xd3\xd9\x78\xfe" "\xfb\x3a\xd3\x63\xfc\xbe\x6c\xbb\xad\x28\x8d\xdf\xdf\x63\xfc\x0b\x3d\xc6" "\xf7\xf7\x18\x7f\xa0\xc7\xf8\x81\x1e\xe3\x0f\xa6\xf1\x99\x8d\xc7\x1f\xea" "\xf1\xfc\x87\x7b\x8c\x03\x00\x00\x30\x1e\xbe\x18\x5b\xe7\x87\x00\x00\x00" "\xb0\x7b\x5d\xfa\xe5\xc7\x3f\xf9\xf5\x91\x17\x6e\x2c\xdc\xba\x76\xf0\x54" "\x98\xbe\x6b\xde\xf9\xe3\xb1\x3f\x13\x5f\x5b\xbf\x1a\xfb\xf9\xbc\xf7\xc9" "\x54\x7c\xcd\xff\x47\xb1\xff\x8b\xd8\xfe\x3e\xb6\x7f\xcf\xd6\x77\xff\x09" "\x00\x00\x00\xec\xbc\xf4\x39\x31\x5e\xff\x07\x00\x00\x80\xdd\x2b\x7d\x4e" "\xa9\xf3\x7f\x00\x00\x00\xd8\xbd\x16\x62\xeb\xfc\x1f\x00\x00\x00\x76\xaf" "\x7b\x63\xeb\xfc\x1f\x00\x00\x00\x76\xb1\x62\xcf\xc6\x8b\x63\x9b\xae\x0b" "\x3c\x1a\xdb\x7e\xe7\xf5\x03\x00\x86\xdf\x97\x62\xfb\x48\x6c\x0f\xc6\xf6" "\x50\x6c\xbf\x1c\xdb\x74\x1c\xf0\x58\x6c\xbf\x52\x53\x7d\x00\xc0\xf6\xf9" "\xd9\x77\x7f\xfc\xd4\x3b\xc5\xfa\x7c\xff\x27\xb2\xf1\xdb\x71\x79\x6a\xef" "\x72\xe5\xce\x95\x82\xa2\xd1\x3d\x93\xff\xde\xd8\xee\x8b\xed\xe3\x7d\xd6" "\x93\x7f\x1e\x40\xbf\xf9\x93\xfd\x7d\xe6\xd9\xa9\xfc\xf3\x5b\xcc\x0f\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xec\x1e\x8d\xb5\xaf\x27\x4f\x1e\x28\x42\x78\xef\x93\x77\x4f" "\xcf\x5f\x3a\xfd\xf2\xea\xb2\x43\xed\x35\x0e\xaf\x7d\x2d\x62\xaf\x19\x42" "\x98\x6a\x3f\x2f\x8d\xae\xf7\x7f\x15\x57\xbc\x7d\xe3\xad\x33\xab\xed\x4a" "\x6c\x5b\xb1\x2d\xc2\x52\x28\x42\xd1\x1e\x0f\xcf\x5d\x6f\x67\x9a\x0d\x21" "\x5c\x09\x87\xc3\xa7\xa1\x19\x0e\x1d\x6d\xde\xbc\x3a\xf1\xec\xb9\x8f\xde" "\xff\xec\xc8\xa5\x0b\xcf\xbc\xb2\x83\xdf\x02\x00\x00\x00\xd8\xf5\xfe\x17" "\x00\x00\xff\xff\xed\x63\x2a\xa0", 3824); syz_mount_image(/*fs=*/0x20000ec0, /*dir=*/0x20000f00, /*flags=*/0, /*opts=*/0x20000f40, /*chdir=*/1, /*size=*/0xef0, /*img=*/0x20000f80); memcpy((void*)0x20000040, "./file2\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul, /*flags=*/0x14b042ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint64_t*)0x20000100 = 0x20000080; memset((void*)0x20000080, 255, 1); *(uint64_t*)0x20000108 = 0xabfb; syscall(__NR_pwritev2, /*fd=*/r[0], /*vec=*/0x20000100ul, /*vlen=*/1ul, /*off_low=*/0x6000, /*off_high=*/0, /*flags=*/0ul); return 0; }