// https://syzkaller.appspot.com/bug?id=7ee6f789df99bead0bded3c4b044a21896aca50c // 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 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; } 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; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000f00, "udf\000", 4); memcpy((void*)0x20000f40, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 253); memcpy( (void*)0x20000380, "\x69\x6f\x63\x68\x61\x72\x73\x65\x74\x3d\x63\x70\x38\x36\x34\x2c\x6e\x6f" "\x73\x74\x72\x69\x63\x74\x2c\x6c\x61\x73\x74\x62\x6c\x6f\x63\x6b\x3d\x30" "\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x35\x34" "\x36\x2c\x67\x69\x64\x3d\x66\x6f\x72\x67\x65\x74\x2c\x6c\x6f\x6e\x67\x61" "\x64\x2c\x6e\x6f\x76\x72\x73\x2c\x75\x6e\x64\x65\x6c\x65\x74\x65\x2c\x6c" "\x61\x73\x74\x62\x6c\x6f\x63\x6b\x3d\x30\x30\x30\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x37\x2c\x66\x69\x6c\x65\x73\x65" "\x74\x3d\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x36\x2c\x00\x50\x7e\x81\x3e\xab\xdb\x64\xdf\xa5\x53\xfb\xca" "\x28\x88\xd9\x54\x9d\x26\xd9\x1e\x12\xec\xff\x62\x65", 175); memcpy( (void*)0x20001040, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x79\x00\xf0\xef\x8d\x96\xe2\x52\x6e\x6b" "\x26\x76\x15\x27\x8d\x83\x4d\x5b\xa4\x32\x63\xb9\xfa\x17\x53\xb1\x0a\x77" "\x55\xd3\x6c\x03\xc8\x32\x11\x8a\xb9\x05\xe0\x4a\xa4\xd4\x85\x29\x92\x20" "\xa9\x46\x36\xd2\x82\xe9\xa5\x87\x1e\x02\x14\x45\x0f\x39\x11\x68\x8d\x02" "\x29\x1a\x18\x4d\x11\xf4\xc8\xb4\x2e\x90\x5c\x7c\x28\x72\xea\x89\x68\x61" "\x23\x28\x7a\x60\x8b\x00\x01\x0a\x04\x2c\x66\xf6\xad\xb8\xa4\x49\x5b\x16" "\x49\x89\x92\x7f\x3f\x9b\xfa\x76\x66\xbe\x37\xf3\xde\xcc\x7a\x46\x16\xf4" "\xcd\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\xe2\xf7" "\x5e\xbe\x78\xea\x74\xda\x61\xc3\x91\x07\xd0\x19\x00\xe0\xbe\xb8\x3c\xfe" "\xd5\x53\x67\x76\x7a\xfe\x03\x00\x8f\xac\x2b\xbb\xfd\xff\xff\x6e\x36\xfa" "\x0f\xb0\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x0e\x52\x14" "\xf1\x44\xa4\x98\xbf\xbc\x9e\x26\xab\xe5\x8e\xfa\xa5\x76\xdf\xad\xdb\x13" "\x23\xa3\x3b\x37\x1b\x48\x55\xcb\x23\x55\x7e\xf9\x53\x3f\x7d\xe6\xec\xb9" "\x2f\x3d\x3f\x7c\xbe\x1b\x2f\xb5\x67\x3f\xa0\xfd\x7e\xfb\x4c\xbc\x3a\x7e" "\xe5\x62\xe3\xa5\xb9\x9b\xf3\x0b\xd3\x8b\x8b\xd3\x53\x8d\x89\xd9\xf6\xb5" "\xb9\xa9\xe9\xbb\xde\xc3\x5e\xdb\x6f\x37\x54\x9d\x80\xc6\xcd\xd7\x6e\x4d" "\x5d\xbf\xbe\xd8\x38\xf3\xdc\xd9\x2d\x9b\x6f\x0f\xbe\xd7\xff\xd8\xf1\xc1" "\x0b\xc3\xcf\x9c\x7c\xba\x9b\x3b\x31\x32\x3a\x3a\xbe\x99\x52\xef\xcd\xaf" "\xdd\x73\x47\x3a\x76\xab\xf0\x38\x1a\x45\x9c\x8c\x14\xcf\x7e\xef\xa7\xa9" "\x15\x11\x45\xec\xfd\x5c\xd4\xef\xef\xb5\xdf\x6e\xa0\x1a\xc4\x50\x35\x88" "\x89\x91\xd1\x6a\x20\x33\xed\xd6\xec\x52\xb9\x71\xac\x7b\x22\x8a\x88\x46" "\x4f\xa3\x66\xf7\x1c\xed\x7c\x2d\xa2\xd6\x77\x5f\xc7\xb0\xbb\x66\xc4\x72" "\xd9\xfd\xb2\xc3\x43\xe5\xf0\xc6\xe7\x5b\x0b\xad\xab\x33\xd3\x8d\xb1\xd6" "\xc2\x52\x7b\xa9\x3d\x37\x3b\x96\x3a\xbd\x2d\xc7\xd3\x88\x22\xce\xa7\x88" "\x95\x88\x58\xdb\xa1\x72\xa7\x2f\x8a\xa8\x45\x8a\xef\x3c\xbe\x9e\xae\xe6" "\xb7\x7e\x54\xe7\xe1\x8b\x55\x61\xf0\xee\xfd\x28\x0e\x70\x8c\x77\xa1\xec" "\x67\xa3\x2f\x62\xa5\x78\x08\xae\xd9\x21\xd6\x1f\x45\xbc\x12\x29\x7e\xf6" "\xf6\x89\xb8\x96\xef\x33\xd5\xbd\xe6\x0b\x11\xaf\x94\xf1\x07\x11\x6f\x96" "\xf1\xc5\x88\x54\x7e\x31\xce\x45\xbc\xab\x02\xec\x91\x51\x8b\x22\xfe\xbc" "\xbc\xfe\x17\xd6\xd3\x54\x75\x3f\xe8\xde\x57\x2e\x7d\xad\xf1\x95\xd9\xeb" "\x73\x3d\xb9\xdd\xfb\xca\x47\x7c\x3e\xbc\xef\x4e\xf1\x80\x9e\x0f\x03\xdb" "\xe2\xfd\x71\xc8\xef\x4d\xf5\x28\xa2\x55\xdd\xf1\xd7\xd3\xbd\xff\x66\x07" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xfd\x36\x10\x45\x7c" "\x3a\x52\xbc\xfc\x6f\x7f\x54\xd5\x15\x47\x55\x97\xfe\xf8\x85\xe1\xdf\x1f" "\xfc\xe5\xde\x9a\xf1\xa7\x3e\x64\x3f\x65\xee\x73\x11\xb1\x5c\xdc\x5d\x4d" "\xee\xd1\x5c\x18\x38\x96\xc6\x52\x7a\xc0\xb5\xc4\x1f\x67\xf5\x28\xe2\x8f" "\x73\xfd\xdf\xb7\x1e\x74\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x3e\xd6\x8a\xf8\x49\xa4\x78\xe1\x9d\x13\x69\x25\x7a\xe7" "\x14\x6f\xcf\xde\x68\x5c\x69\x5d\x9d\xe9\xcc\x0a\xdb\x9d\xfb\xb7\x3b\x67" "\xfa\xc6\xc6\xc6\x46\x23\x75\x62\x33\xc7\xc9\x1c\x97\x73\x5c\xc9\x71\x35" "\xc7\xb5\x1c\xa3\xc8\xed\x73\x6c\xe6\x38\x99\xe3\x72\x19\x8f\x6e\x6c\xac" "\xe4\xe5\xd5\x1c\xd7\x72\x8c\x23\xb9\x7d\x8e\xcd\x1c\x27\x73\x5c\xce\x71" "\x25\xc7\xd5\x1c\xd7\x72\x8c\x5a\x6e\x9f\x63\x33\xc7\x81\x3c\xae\xe5\xbc" "\xbc\x92\xe3\x6a\x8e\x6b\x39\xc6\x21\x99\xbb\x17\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x51\x52\x44\x11\xbf\x88\x14\xdf\xfe\xc6\x7a\x8a\x14" "\x11\xcd\x88\xc9\xe8\xc4\xd5\xfe\x07\xdd\x3b\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\xd4\x9f\x8a\xf8\x7e" "\xa4\x68\xfc\x41\xf3\xce\xba\x5a\x44\xa4\xea\xdf\x8e\x13\xe5\x2f\xe7\xa2" "\x79\xb4\x8c\x9f\x8c\xe6\x70\x19\x5f\x8c\xe6\xc5\x1c\x5b\x55\xac\x35\xbf" "\xf5\x00\xfa\xcf\xde\xf4\xa5\x22\x7e\x1c\x29\xfa\xeb\x6f\xdd\xb9\xe0\xf9" "\xfa\xf7\x75\x96\xee\x7c\x0d\xe2\xcd\x6f\x6e\x2e\x7d\xa6\xd6\x89\x47\xba" "\x1b\x07\xdf\xeb\x7f\xec\xf8\xe3\x17\x86\x47\x3f\xf7\xd4\x6e\x9f\xd3\x4e" "\x1d\x18\xba\xd4\x9e\xbd\x75\xbb\x31\x31\x32\x3a\x3a\xde\xb3\xba\x96\x8f" "\xfe\xc9\x9e\x75\x83\xf9\xb8\xc5\xfe\x0c\x9d\x88\x58\x7c\xfd\x8d\xd7\x5a" "\x33\x33\xd3\x0b\xf7\xfe\xa1\xfc\x0a\xec\xa1\xf9\x43\xf4\x21\xd5\x3e\x2e" "\x23\xf5\xa1\xfa\x10\xb5\x43\xd1\x8d\x07\x33\xf6\x2d\xea\x0f\xea\x06\xc5" "\x81\x2a\x9f\xff\xef\x46\x8a\xdf\x7e\xe7\xdf\xbb\x0f\xfc\xce\xf3\xbf\x1e" "\xbf\xd4\x59\xba\xf3\x84\x8f\x9f\xff\xc9\xe6\xf3\xff\x85\xed\x3b\xba\xcb" "\xe7\x7f\x6d\x7b\xbb\xfc\xfc\x2f\x9f\xe9\x3b\x3d\xff\x9f\xe8\x59\xf7\x42" "\xfe\xdd\x48\x5f\x2d\xa2\xbe\x74\x73\xbe\xef\x78\x44\x7d\xf1\xf5\x37\x4e" "\xb6\x6f\xb6\x6e\x4c\xdf\x98\x9e\x3d\x77\xea\xd4\x97\x87\x87\xbf\x7c\xf6" "\x54\xdf\xd1\x88\xfa\xf5\xf6\xcc\x74\xcf\xa7\x7d\x39\x5d\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\x4f\x2a\xe2\x77\x23\x45\xeb\xc7" "\xeb\xa9\x11\x11\xb7\xab\x7a\xad\xc1\x0b\xc3\xcf\x9c\x7c\xfa\x48\x1c\xa9" "\xea\xad\xb6\xd4\x6d\xbf\x3a\x7e\xe5\x62\xe3\xa5\xb9\x9b\xf3\x0b\xd3\x8b" "\x8b\xd3\x53\x8d\x89\xd9\xf6\xb5\xb9\xa9\xe9\xbb\x3d\x5c\xbd\x2a\xf7\x9a" "\x18\x19\x3d\x90\xc1\x7c\xa8\x81\x03\xee\xff\x40\xfd\xa5\xb9\xf9\xd7\x17" "\xda\x37\xfe\x70\x69\xc7\xed\xc7\xea\x17\xaf\x2e\x2e\x2d\xb4\xae\xed\xbc" "\x39\x06\xa2\x88\x68\xf6\xae\x19\xaa\x3a\x3c\x31\x32\x5a\x75\x7a\xa6\xdd" "\x9a\xad\x9a\x8e\xed\x58\x4c\xff\xd1\xf5\xa5\x22\xfe\x23\x52\x5c\x3b\xd7" "\x48\x9f\xcf\xeb\x72\xfd\xff\xf6\x0a\xff\x2d\xf5\xff\xcb\xdb\x77\xb4\x8f" "\xf5\xff\x9f\x3b\xb6\x59\xff\xf7\x89\x9e\xd4\xf2\x98\x29\x15\xf1\xf3\x48" "\xf1\x5b\x7f\xf1\x54\x7c\xbe\xea\xe7\xb1\x78\xdf\x39\xcb\x79\x7f\x13\x29" "\x86\xce\x7f\x36\xe7\xc5\xd1\x32\xaf\xdb\x87\xce\x7b\x05\x3a\x95\x81\x65" "\xee\xff\x44\x8a\x7f\xf8\xc5\xd6\xdc\x6e\x3d\xe4\x13\x9b\xb9\xa7\x3f\xd2" "\xc9\x7d\x08\x94\xd7\xff\xf1\x48\xf1\xfd\x3f\xfb\x6e\xfc\x7a\x5e\xb7\xf5" "\xfd\x0f\x3b\x5f\xff\x63\xdb\x77\x74\x40\xef\x7f\x78\xb2\x67\xdd\xb1\x2d" "\xef\x2b\xd8\xf3\xd0\xc9\xd7\xff\x64\xa4\x78\xf1\x89\xb7\xe2\x37\xaa\x35" "\xff\xf7\x81\xef\xff\xe8\xbe\x7b\xe3\x44\x27\x79\xf3\xfd\x1c\x07\x74\xfd" "\x7f\xb5\x67\xdd\x60\x3e\xee\x6f\xee\xd7\xe0\x01\x00\x00\x00\x00\x00\x00" "\x00\x00\x1e\x62\x7d\xa9\x88\xbf\x8d\x14\x3f\x1c\xad\xa5\xe7\xf3\xba\xbb" "\xf9\xfb\x7f\x53\xdb\x77\x74\x40\x7f\xff\xeb\x53\x3d\xeb\xa6\xf6\x67\xbe" "\xa2\x0f\xfd\xb0\xe7\x93\x0a\x00\x00\x00\x00\x87\x44\x5f\x2a\xe2\x27\x91" "\xe2\xc6\xd2\x5b\x77\x6a\xa8\xb7\xd6\x7f\xf7\xd4\x7f\xfe\xce\x66\xfd\xe7" "\x48\xda\xb6\xb5\xfa\x73\xbe\x5f\xa9\xde\x1b\xb0\x9f\x7f\xfe\xd7\x6b\x30" "\x1f\x77\x72\xef\xc3\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x80\x43\x25\xa5\x22\x9e\xcf\xf3\xa9\x4f\x56\xf5\xfc\x53\xbb\xce" "\xa7\xbe\x1a\x29\x5e\xfe\xaf\x67\x73\x5e\x3a\x5e\xe6\x75\xe7\x81\x1f\xac" "\x7e\xad\x5f\x9e\x9b\x3d\x79\x71\x66\x66\xae\x1e\x4b\xad\xab\x33\xd3\x8d" "\xf1\xf9\xd6\xb5\xe9\xb2\xed\x93\x91\x62\xfd\xaf\x3f\x9b\xdb\x16\xd5\xfc" "\xea\xdd\xf9\xe6\x3b\x73\xbc\x6f\xce\xc5\xbe\x10\x29\x46\xff\xae\x9b\xdb" "\x99\x8b\xbd\x3b\x37\xf9\x93\x9b\xb9\xa7\xcb\xdc\x4f\x44\x8a\xff\xfc\xfb" "\xad\xb9\x79\x6a\xea\x3c\x77\x74\x95\x7b\xa6\xcc\xfd\xab\x48\xf1\xf5\x7f" "\xda\x39\xf7\xf8\x66\xee\xd9\x32\xf7\xbb\x91\xe2\x47\x5f\x6f\x74\x73\x8f" "\x95\xb9\xdd\xf7\xa3\x7e\x6a\x33\xf7\xb9\x6b\x73\xc5\x01\x5c\x15\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x6e\xfa\x52\x11" "\x7f\x1a\x29\xfe\xfb\xe6\xca\x9d\x5a\xfe\x3c\xff\x7f\x5f\xcf\x62\xe5\xcd" "\x6f\xf6\xcc\xf7\xbf\xcd\xed\x6a\x9e\xff\xc1\x6a\xfe\xff\xdd\x3e\xdf\xcb" "\xfc\xff\xd5\x7b\x05\x96\x77\x3b\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x9a\x52\x14\xf1\x46\xa4\x98\xbf\xbc" "\x9e\x56\xfb\xcb\xe5\x8e\xfa\xa5\xf6\xec\xad\xdb\x13\x23\xa3\x3b\x37\x1b" "\x48\x55\xcb\x23\x55\x7e\xf9\x53\x3f\x7d\xe6\xec\xb9\x2f\x3d\x3f\x7c\xbe" "\x1b\x3f\xb8\xfd\x7e\xfb\x74\xbc\x3a\x7e\xe5\x62\xe3\xa5\xb9\x9b\xf3\x0b" "\xd3\x8b\x8b\xd3\x53\x8d\x89\xd9\xf6\xb5\xb9\xa9\xe9\xbb\xde\xc3\x5e\xdb" "\x6f\x37\x54\x9d\x80\xc6\xcd\xd7\x6e\x4d\x5d\xbf\xbe\xd8\x38\xf3\xdc\xd9" "\x2d\x9b\x6f\x0f\xbe\xd7\xff\xd8\xf1\xc1\x0b\xc3\xcf\x9c\x7c\xba\x9b\x3b" "\x31\x32\x3a\x3a\xde\x93\x53\xeb\xbb\xe7\xa3\xbf\x4f\xda\x65\xfd\xd1\x28" "\xe2\x2f\x23\xc5\xb3\xdf\xfb\x69\xfa\x61\x7f\x44\x11\x7b\x3f\x17\x1f\xf2" "\xdd\x39\x68\x03\xd5\x20\x86\xaa\x41\x4c\x8c\x8c\x56\x03\x99\x69\xb7\x66" "\x97\xca\x8d\x63\xdd\x13\x51\x44\x34\x7a\x1a\x35\xbb\xe7\xe8\x3e\x5c\x8b" "\x3d\x69\x46\x2c\x97\xdd\x2f\x3b\x3c\x54\x0e\x6f\x7c\xbe\xb5\xd0\xba\x3a" "\x33\xdd\x18\x6b\x2d\x2c\xb5\x97\xda\x73\xb3\x63\xa9\xd3\xdb\x72\x3c\x8d" "\x28\xe2\x7c\x8a\x58\x89\x88\xb5\xfe\xf7\xef\xae\x2f\x8a\x78\x2d\x52\x7c" "\xe7\xf1\xf5\xf4\xcf\xfd\x11\x47\xba\xe7\xe1\x8b\x97\xc7\xbf\x7a\xea\xcc" "\xee\xfd\x28\x0e\x70\x8c\x77\xa1\xec\x67\xa3\x2f\x62\xa5\x78\x08\xae\xd9" "\x21\xd6\x1f\x45\xfc\x63\xa4\xf8\xd9\xdb\x27\xe2\x5f\xfa\x23\x6a\xd1\xf9" "\x89\x2f\x44\xbc\x52\xc6\x1f\x44\xbc\x19\x9d\xeb\x9d\xca\x2f\xc6\xb9\x88" "\x77\x77\xf8\x1e\xf1\x70\xaa\x45\x11\xff\x5b\x5e\xff\x0b\xeb\xe9\xed\xfe" "\xf2\x7e\xd0\xbd\xaf\x5c\xfa\x5a\xe3\x2b\xb3\xd7\xe7\x7a\x72\xbb\xf7\x95" "\x87\xfe\xf9\x70\x3f\x1d\xf2\x7b\x53\x3d\x8a\xf8\x51\x75\xc7\x5f\x4f\xff" "\xea\xbf\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\xa4" "\x88\x5f\x8b\x14\x2f\xbc\x73\x22\x55\xf5\xc1\x77\x6a\x8a\xdb\xb3\x37\x1a" "\x57\x5a\x57\x67\x3a\x65\x7d\xdd\xda\xbf\x6e\xcd\xf4\xc6\xc6\xc6\x46\x23" "\x75\x62\x33\xc7\xc9\x1c\x97\x73\x5c\xc9\x71\x35\xc7\xb5\x1c\xa3\xc8\xed" "\x73\x6c\x96\xb1\xbe\xb1\x31\x99\x97\x97\x73\x5c\xc9\x71\x35\xc7\xb5\x1c" "\xe3\x48\x6e\x9f\x63\x33\xc7\xc9\x1c\x97\x73\x5c\xc9\x71\x35\xc7\xb5\x1c" "\xa3\x96\xdb\xe7\xd8\xcc\x71\x32\xc7\xe5\x1c\x57\x72\x5c\xcd\x71\x2d\xc7" "\x38\x24\xb5\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\xc0\xa3\xa5\xa8\xfe\x49\xf1\xed\x6f\xac\xa7\x8d\xfe\xce\xfc\xd2\x93\xd1" "\x89\xab\xe6\x03\x7d\xe4\xfd\x7f\x00\x00\x00\xff\xff\x9e\xd3\xf8\xce", 3149); syz_mount_image(/*fs=*/0x20000f00, /*dir=*/0x20000f40, /*flags=MS_I_VERSION|MS_SYNCHRONOUS|MS_RELATIME*/ 0xa00010, /*opts=*/0x20000380, /*chdir=*/1, /*size=*/0xc4d, /*img=*/0x20001040); memcpy((void*)0x20000300, "./bus\000", 6); syscall(__NR_mkdir, /*path=*/0x20000300ul, /*mode=*/0ul); memcpy((void*)0x20000140, "./bus\000", 6); syscall(__NR_chdir, /*dir=*/0x20000140ul); memcpy((void*)0x20000200, "./file0\000", 8); syscall(__NR_open, /*file=*/0x20000200ul, /*flags=O_LARGEFILE|O_CREAT|0x4000000*/ 0x4008040ul, /*mode=*/0ul); memcpy((void*)0x200003c0, "./file0\000", 8); memcpy((void*)0x20000f40, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 252); syscall(__NR_rename, /*old=*/0x200003c0ul, /*new=*/0x20000f40ul); memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000080, "./file1\000", 8); syscall(__NR_rename, /*old=*/0x20000000ul, /*new=*/0x20000080ul); return 0; }