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