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