// autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include <endian.h> #include <errno.h> #include <fcntl.h> #include <setjmp.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/mount.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> #include <unistd.h> #include <linux/loop.h> #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*)0x20000600, "hfsplus\000", 8); memcpy((void*)0x20000280, "./file1\000", 8); memcpy((void*)0x20000240, "\x00\xe6\x40\xab\xfb\xec\xbc\x70\xe7\x63\x79\x20\xd0\x51\x68\x55\x97\x1c\x96\x75\xae\x99\xdf\x64\x85\x32\x0d\xdd\x97\x45\x9b\xb4", 32); memcpy((void*)0x20000cc0, "\x78\x9c\xec\xdd\x41\x6f\x1c\x67\x19\x07\xf0\xff\x6c\x62\xc7\x0e\x52\xba\x49\x93\xa6\x20\x24\xac\x72\x00\x35\x22\x59\xef\x46\x26\x48\x48\x40\x29\xc8\x42\x15\xaa\xc4\xa5\x57\x2b\xd9\xd4\x56\x36\x69\x64\x6f\x91\xdb\x03\x0a\x88\x73\xfb\x15\xca\xc1\x9c\x39\x70\x42\x41\xca\x81\x33\x5f\xc1\xa8\x47\x04\x77\xdf\x52\xcd\xec\xec\x7a\x1d\xbb\xae\xd3\xb8\xde\x75\xfb\xfb\x49\xb3\xef\x33\xfb\xce\xbc\xf3\xcc\x93\x99\xd1\xcc\x58\xd1\x06\xf8\xc6\x5a\x7e\x27\x33\x4f\x52\x64\xf9\xda\x5b\x9b\xe5\xfc\xf6\x56\xa7\xb7\xbd\xd5\xb9\x3f\x8c\x93\x9c\x4b\xd2\x48\xe6\x92\x14\xe5\xd7\x7f\x4f\xf2\x69\xf2\x28\x83\x29\xdf\x1e\x76\x8c\xb5\xfb\x14\x1f\x2f\xdf\x5e\x7d\xfc\xd1\xd5\xc1\xdc\x5c\x3d\x55\xcb\x17\x87\xad\x77\x34\xa3\x5c\x9a\x83\x5c\xab\xf6\xb8\xc6\x6b\xbf\xf0\x78\xbb\x7b\xb8\x90\xe4\x52\xdd\xc2\xc4\x3d\x1d\xfa\xcf\x81\xdd\x2f\x78\x5e\x02\x00\xd3\xac\x48\xce\x1c\xf4\x7d\x33\x39\x5f\xdf\xac\x97\xcf\x01\x83\xbb\xe2\xc1\x3d\xf6\xa9\xf6\x68\xd2\x09\x00\x00\x00\xc0\x09\x78\x69\x27\x3b\xd9\xcc\x85\x49\xe7\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\xa7\x49\xfd\xfb\xff\x45\x3d\x35\x86\xf1\x42\x8a\xe1\xef\xff\xcf\xd6\xdf\xa5\x8e\x4f\xb5\x27\x93\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x8e\xc1\xf7\x76\xb2\x93\xcd\x5c\xa8\x66\x8a\xe4\x69\x51\xfd\xcd\xff\xb5\x6a\xfe\x72\xf5\xf9\xad\xbc\x9f\x8d\x74\xb3\x9e\xeb\xd9\xcc\x4a\xfa\xe9\x67\x3d\x8b\x49\x9a\x63\x03\xcd\x6e\xae\xf4\xfb\xeb\x8b\x47\x58\xb3\x7d\xe0\x9a\xed\x13\xdb\x65\x00\x00\x00\x00\x00\x00\x00\xf8\x3a\xfa\x53\x96\xeb\xbf\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x94\x28\x92\x33\x83\xa6\x9a\x2e\x0f\xe3\x66\x1a\x67\x93\xcc\x25\x99\x2d\x97\x7b\x94\x3c\x1e\xc6\xa7\xd9\x93\x49\x27\x00\x00\x00\x00\x27\xe0\xa5\x9d\xec\x64\x33\x17\x86\xf3\x4f\x8b\xea\x99\xff\x95\xea\xb9\x7f\x2e\xef\xe7\x41\xfa\x59\x4b\x3f\xbd\x74\x73\xa7\x7a\x17\x30\x78\xea\x6f\x6c\x6f\x75\x7a\xdb\x5b\x9d\xfb\xe5\xb4\x7f\xdc\x5f\xfc\xff\xb9\xd2\xa8\x46\xcc\xe0\xdd\xc3\xc1\x5b\x6e\x55\x4b\x5c\x19\xad\xb1\x9c\x5f\xe7\x77\xb9\x96\x85\xbc\x9d\xf5\xac\xe5\xf7\x59\x49\x3f\xdd\x2c\xe4\xcd\x2a\x5a\x49\x91\x66\xfd\xf6\xa2\x39\xcc\x73\x94\xef\xd9\xf1\x8d\xff\x7c\x4f\x2a\x6f\x7f\x51\xae\xaf\x56\x99\xcc\xe7\x6e\xd6\xaa\xdc\xae\xe7\x76\xde\x4b\x2f\x77\xd2\xa8\xf6\xa1\x5a\x66\xdf\x16\xf7\xf8\x63\x59\x9d\xe2\x67\xb5\x23\xd6\xe8\x4e\xdd\x96\x7b\xf4\x9b\xba\x9d\x0e\xcd\xaa\x22\x33\xa3\x8a\xb4\xea\xda\x97\xd5\xb8\x78\x78\x25\x9e\xf3\x38\x79\x76\x4b\x8b\x69\x8c\xde\x41\x5d\xfe\x0a\x6a\x7e\xbe\x6e\xcb\x5a\xbf\x39\xd5\x35\x6f\x8f\x1d\x7d\xaf\x1c\x5e\x89\xa4\xd5\xfe\xdf\xc3\xd5\xde\x83\x7b\xab\x77\x37\xae\x4d\xcf\x2e\x7d\x49\xcf\x56\xa2\x33\x56\x89\xab\xdf\xa8\x4a\xcc\xd6\xd5\x18\x5c\x45\x9f\xef\x6a\xf9\x5a\xb5\xee\x85\xac\xe5\xb7\x79\x2f\x77\xd2\xcd\xad\xb4\x72\x2b\x4b\xb9\x99\x4e\x96\xf2\x93\x2c\x8d\xd5\xf5\xca\x11\xce\xb5\xc6\xf3\x9d\x6b\xdf\xff\x61\x1d\xcc\x24\xf9\x55\xdd\x4e\x87\xb2\xae\x17\xc7\xea\x3a\x7e\xa5\x6b\x56\x7d\xe3\xdf\xec\x56\xe9\xd2\x71\x5c\x91\xce\xee\x9d\xfb\x4e\x1d\x94\x07\xeb\x1b\x53\x77\x45\xba\xf8\xcc\xb5\x79\x58\x89\x97\x0f\xaf\xc4\x5f\x9e\x96\x9f\x1b\xbd\x07\xf7\xd6\x57\x57\x1e\x1e\x71\x7b\x3f\xa8\xdb\xb2\x02\xbf\x9c\xaa\x4a\x94\xc7\xcb\xa5\xd1\x3f\xdd\xde\xa3\xa3\xec\x7b\xf9\xc0\xbe\xc5\xaa\xef\xf2\xa8\xaf\xb1\xaf\xef\xca\xa8\xef\x8b\xce\xd4\xd9\xfa\x1e\x6e\xff\x48\xed\xaa\xef\xea\x81\x7d\x9d\xaa\xef\xd5\xb1\xbe\x83\xee\x72\x00\x98\x7a\xe7\x5f\x3f\x3f\x3b\xff\xdf\xf9\x7f\xcf\x7f\x32\xff\xe7\xf9\xd5\xf9\xb7\xe6\xde\x38\x77\xeb\xdc\x77\x67\x33\xf3\xaf\xb3\xff\x38\xf3\xb7\xc6\x5f\x1b\x3f\x2d\x5e\xcf\x27\xf9\xc3\xee\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\xe5\x6d\x7c\xf0\xe1\xbd\x95\x5e\xaf\xbb\x2e\x10\x08\x04\xa3\x60\xd2\x57\x26\xe0\xab\x76\xa3\x7f\xff\xe1\x8d\x8d\x0f\x3e\xfc\xd1\xda\xfd\x95\x77\xbb\xef\x76\x1f\xdc\x5c\x5c\x6a\xdf\xbc\xd9\x5a\xfa\xf1\xad\x1b\x77\xd7\x7a\xdd\xd6\xe0\x73\xd2\x69\x02\x00\xc7\x68\xf7\xa6\x7f\xd2\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\xe7\x24\xfe\x3b\xf1\xa4\xf7\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x7a\x5b\x7e\x27\x33\x4f\x52\x64\xb1\x75\xbd\x55\xce\x6f\x6f\x75\x7a\xe5\x34\x8c\x77\x97\x9c\x4b\x52\x94\xc1\x3f\x93\x7c\x9a\x3c\xca\x60\x4a\x73\x6c\xb8\xe2\xf3\xb6\x53\x7c\xbc\x7c\x7b\xf5\xf1\x47\x57\x77\xc7\x9a\x1b\x2e\x5f\x1c\xb6\xde\xd1\xec\xc9\xa5\xf1\x4c\x4e\x2f\x3a\x5e\xfb\x85\xc7\xdb\xdd\xc3\x85\x24\x97\xea\x16\x26\xee\xb3\x00\x00\x00\xff\xff\xaa\x3c\x03\x5c", 1488); syz_mount_image(/*fs=*/0x20000600, /*dir=*/0x20000280, /*flags=*/0, /*opts=*/0x20000240, /*chdir=*/1, /*size=*/0x5d0, /*img=*/0x20000cc0); memcpy((void*)0x20000000, "./file0/file0\000", 14); memcpy((void*)0x200000c0, "./file1\000", 8); syscall(__NR_rename, /*old=*/0x20000000ul, /*new=*/0x200000c0ul); return 0; }