// https://syzkaller.appspot.com/bug?id=0e77b741e3a1b835114f0f7f0f3e53e12c9a73bc // 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 #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) { errno = EMSGSIZE; return -1; } 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, 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) { if (strstr(opts, "errors=panic") || strstr(opts, "errors=remount-ro") == 0) 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, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x20000040, "hfsplus\000", 8); memcpy((void*)0x20000640, "./bus\000", 6); memcpy( (void*)0x20000d00, "\x78\x9c\xec\xdd\xcf\x6f\x1c\x67\xfd\x07\xf0\xf7\x6c\x36\x76\x36\x95\x52" "\xb7\x4d\xd2\x7c\xbf\xaa\x84\x69\xa4\x82\xb0\x48\xfc\x43\x2e\x98\x0b\x01" "\x21\x64\xa4\x0a\x55\xe5\xc0\xd9\x4a\x9c\xc6\xca\xc6\x2d\xb6\x8b\xdc\x0a" "\x41\xf8\x25\xae\x1c\xfa\x07\x94\x83\x6f\x9c\x2a\x71\x41\x42\x8a\x54\xce" "\x70\xab\xb8\xf9\x58\x81\xc4\xa5\x27\x73\x5a\x34\xb3\xb3\xf6\xc6\x76\x9c" "\x75\x13\x67\x37\xe1\xf5\x8a\x9e\x7d\x9e\x67\x9e\x99\x67\x3e\xf3\xd9\x9d" "\x99\xdd\xb5\xa2\x0d\xf0\x3f\x6b\x71\x2a\xcd\x7b\x29\xb2\x38\xf5\xc6\x66" "\xd9\xdf\xde\x9a\x6b\x6f\x6f\xcd\xdd\xe9\xb5\x93\x8c\x27\x69\x24\xcd\x6e" "\x95\x62\x35\x29\x3e\x49\xae\xa5\x5b\xf2\x7f\xe5\xc2\x7a\xba\xe2\x41\xfb" "\xf9\x70\x65\xe1\xad\x4f\x3f\xdf\xfe\xac\xdb\x6b\xd6\xa5\x5a\xbf\x71\xd4" "\x76\x83\xb9\x5b\x97\x4c\x26\x39\x55\xd7\x8f\x6b\xbe\xeb\x8f\x3c\x5f\xb1" "\x7b\x84\x65\xc2\x2e\xf7\x12\x07\xc3\x76\x3a\x49\xe7\x3e\x3f\xb9\xb8\x37" "\xf2\x50\x8f\x78\xde\x02\xa3\xa0\xe8\xde\x37\x0f\x98\x48\xce\x26\x39\x53" "\xbf\x0f\xe8\xde\x15\xbb\xf7\xec\xa7\xda\xf8\xb0\x03\x00\x00\x00\x80\x2f" "\xe0\x9f\x1f\x1f\x6f\xfd\xe7\x77\xb2\x93\xcd\x9c\x3b\xa9\x78\x00\x00\x00" "\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\x59\x54\xff\xfe\x7f\x51\x97\x46\xaf\x3d\x99" "\xa2\xf7\xfb\xff\x63\xf5\xb2\xd4\xed\xd1\x34\x60\x64\xf7\x1a\x27\x1d\x08" "\x00\x00\x00\x00\x00\x00\x00\x9c\xbc\x2f\xed\x64\x27\x9b\x39\xd7\xeb\x77" "\x8a\xea\x6f\xfe\xaf\x56\x9d\xf3\xd5\xe3\x73\x79\x2f\xeb\x59\xce\x5a\xae" "\x64\x33\x4b\xd9\xc8\x46\xd6\x32\x93\x64\xa2\x6f\xa2\xb1\xcd\xa5\x8d\x8d" "\xb5\x99\x7f\x7c\xb9\x6f\xd9\xe1\x5b\xce\x1e\xba\xe5\xec\x80\x01\xb7\x1e" "\xed\x78\x01\x00\x00\x00\x00\x00\x00\xe0\x19\xf5\xab\x2c\xee\xfd\xfd\x1f" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x41\x91\x9c\xea\x56\x55" "\x39\xdf\x6b\x4f\xa4\xd1\x4c\x72\x26\xc9\x58\xb9\xde\xdd\xe4\xef\xbd\xf6" "\xd3\xec\xde\xb0\x03\x00\x00\x00\x80\x27\xe0\xf9\x9d\xec\x64\x33\xe7\x7a" "\xfd\x4e\x51\x7d\xe6\xbf\x58\x7d\xee\x3f\x93\xf7\xb2\x9a\x8d\xac\x64\x23" "\xed\x2c\xe7\x46\xf5\x5d\x40\xf7\x53\x7f\x63\x7b\x6b\xae\xbd\xbd\x35\x77" "\xa7\x2c\x07\xe7\xfd\xce\xbf\x8f\x15\x46\x35\x63\xba\xdf\x3d\x1c\xbe\xe7" "\x4b\xd5\x1a\xad\xdc\xcc\x4a\xb5\xe4\x4a\xae\xe7\x9d\xb4\x73\x23\x8d\x6a" "\xcb\xd2\xa5\x5e\x3c\x87\xc7\xf5\xcb\x32\xa6\xe2\xdb\xb5\x01\x23\xbb\x51" "\xd7\xe5\x91\xff\xbe\xae\xef\x73\x60\xc1\x93\x32\x51\x65\xe4\xf4\x6e\x46" "\xa6\xeb\x50\xca\x6c\xbc\x70\x74\x26\x8e\xf9\xec\xec\xdf\xd3\x4c\x1a\xbb" "\xdf\xfc\x9c\x3f\x81\x9c\x9f\xad\xeb\x22\x79\xee\x07\xc3\x4c\xf1\x01\xfb" "\x33\x31\xdb\xf7\xea\xbb\x78\x74\x26\x92\xaf\xfc\xe9\x8f\x3f\xbe\xd5\x5e" "\xbd\x7d\xeb\xe6\xfa\xd4\xe8\x1c\xd2\x31\x8c\x77\x3a\x9d\x5e\x7b\x7f\x26" "\xe6\xfa\x32\xf1\xf2\x33\x9f\x89\x7e\xd3\x55\x26\x2e\xec\xf6\x17\xf3\xfd" "\xfc\x28\x53\x99\xcc\x9b\x59\xcb\x4a\x7e\x9a\xa5\x6c\x64\x39\x93\xf9\x5e" "\xd5\x5a\xaa\x5f\xcf\xe5\xe3\xc4\xd1\x99\xba\x76\x5f\xef\xcd\x87\x45\x32" "\x56\x3f\x2f\xdd\xab\xe8\xf1\x62\x7a\xb5\xda\xf6\x5c\x56\xf2\xc3\xbc\x93" "\x1b\x59\xce\xeb\xd5\xbf\xd9\xcc\xe4\x1b\x99\xcf\x7c\x16\xfa\x9e\xe1\x0b" "\x03\x9c\xf5\x8d\xe3\x9d\xf5\x97\xbf\x5a\x37\x5a\x49\x7e\x57\xd7\xa3\xa1" "\xcc\xeb\x0b\x7d\x79\xed\xbf\xe6\x4e\x54\x63\xfd\x4b\xf6\xb2\xf4\xe2\xe3" "\xbf\x36\x36\xff\xbf\x6e\x94\xfb\xf8\x75\x5d\x8f\x86\xfd\x99\x98\xe9\xcb" "\xc4\x4b\x47\x67\xe2\x0f\xd5\x65\x65\xbd\xbd\x7a\x7b\xed\xd6\xd2\xbb\x03" "\xee\xef\xb5\xba\x2e\xcf\xa3\xdf\x8e\xd4\x5d\xa2\x7c\xbd\xbc\x58\x3e\x59" "\x55\xef\xfe\x57\x47\x39\xf6\xd2\xa1\x63\x33\xd5\xd8\xf9\xdd\xb1\xc6\x81" "\xb1\x0b\xbb\x63\x0f\x3b\x53\xc7\xea\xf7\x70\x07\x67\x9a\xad\xc6\x5e\x3e" "\x74\x6c\xae\x1a\xbb\xd4\x37\x76\xd8\xfb\x2d\x00\x46\xde\xd9\xaf\x9d\x1d" "\x6b\xfd\xab\xf5\xb7\xd6\x47\xad\xdf\xb4\x6e\xb5\xde\x38\xf3\xdd\xf1\x6f" "\x8e\xbf\x32\x96\xd3\x7f\x3d\xfd\xad\xe6\xf4\xa9\xd7\x1a\xaf\x14\x1f\xe7" "\xa3\xfc\x7c\xef\xf3\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\xad\xbf\xff\xc1\xed" "\xa5\x76\x7b\x79\x6d\x5f\xa3\xd3\xe9\xfc\xe2\x01\x43\x4f\xa6\xf1\x97\x3f" "\x0f\x73\xef\x1a\x8f\xb9\xf1\x9f\x4e\xa7\x33\x02\x61\x0c\xd8\xe8\xd4\x46" "\x25\x9e\x61\x34\x86\x7d\x65\x02\x4e\xda\xd5\x8d\x3b\xef\x5e\x5d\x7f\xff" "\x83\xaf\xaf\xdc\x59\x7a\x7b\xf9\xed\xe5\xd5\x85\xf9\xf9\x85\xe9\x85\xf9" "\xd7\xe7\xae\xde\x5c\x69\x2f\x4f\x77\x1f\x87\x1d\x25\x70\x12\xf6\x6e\xfa" "\xc3\x8e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\xd4\x93\xf8\xef\x04" "\xc3\x3e\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\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\xe9\xb6\x38\x95\xe6\xbd\x14\x99\x99\xbe\x32" "\x5d\xf6\xb7\xb7\xe6\xda\x65\xe9\xb5\xf7\xd6\x6c\x26\x69\x24\x29\x7e\x96" "\x14\x9f\x24\xd7\xd2\x2d\x99\xe8\x9b\xae\x78\xd0\x7e\x3e\x5c\x59\x78\xeb" "\xd3\xcf\xb7\x3f\xdb\x9b\xab\xd9\x5b\xbf\x71\xd4\x76\x83\xb9\x5b\x97\x4c" "\x26\x39\x55\xd7\x8f\x6b\xbe\xeb\x8f\x3c\x5f\xb1\x7b\x84\x65\xc2\x2e\xf7" "\x12\x07\xc3\xf6\xdf\x00\x00\x00\xff\xff\xc0\x35\x19\xb6", 1562); syz_mount_image(0x20000040, 0x20000640, 0x50, 0x200003c0, 2, 0x61a, 0x20000d00); memcpy((void*)0x20000000, "./file1\000", 8); res = syscall(__NR_open, 0x20000000ul, 0x147042ul, 0ul); if (res != -1) r[0] = res; *(uint64_t*)0x20000680 = 0x20000200; memset((void*)0x20000200, 5, 1); *(uint64_t*)0x20000688 = 0x60600; syscall(__NR_pwritev2, r[0], 0x20000680ul, 1ul, 0x600, 0, 0ul); return 0; }