// https://syzkaller.appspot.com/bug?id=1cfa39c0e28cf4d15012461b4b5646e43675282d // 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*)0x200000c0, "udf\000", 4); memcpy((void*)0x20000180, "./file0\000", 8); memcpy((void*)0x20000540, "lastblock=00000000000000000000,umask=00000000000000000000002,dmode=" "00000000000000000077777,novrs,shortad,shortad,undelete,iocharset=" "cp437,shortad,umask=00000000000000000000006,dmode=" "00000000000000000000002,nostrict,uid=", 219); sprintf((char*)0x2000061b, "%023llo", (long long)0); sprintf((char*)0x20000632, "%020llu", (long long)-1); memcpy( (void*)0x20002540, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x7d\x07\xf0\xdf\x1b\x2d\xc5\x95\xdc\x56" "\x4c\xec\x28\x4e\x1a\x17\x9b\xb6\x48\x65\xc5\x72\xf5\x2f\xa6\x62\x15\xee" "\xaa\xa6\xd9\x06\x90\x65\x21\x14\x73\x0b\xc0\x15\x49\xa9\x0b\x53\x24\x41" "\x52\x8d\x6c\xa4\x05\xd3\x4b\x0f\x3d\x04\x28\x8a\x1e\x72\x22\xd0\x1a\x05" "\x52\x34\x30\x9a\x22\xe8\x91\x69\x5d\x20\xb9\xf8\x50\xe4\xd4\x13\xd1\xc2" "\x46\x50\xf4\xc0\x16\x01\x72\x0a\x18\xcc\xec\x5b\x71\x49\x91\x36\x2d\x92" "\x12\x65\x7d\x3e\x36\xf5\xdd\x9d\x7d\x6f\xf6\xbd\x79\xe3\x19\x59\xd0\x9b" "\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\x40\xc4\x1f\xbc" "\x72\xe9\xf4\x99\xf4\xb0\x5b\x01\x00\x3c\x48\x57\x46\xbe\x7a\xfa\xac\xfb" "\x3f\x00\x3c\x56\xae\xf9\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x38\xe8\x52\x14\xf1\x64\xa4\x98\xbd\xb2\x9a\xc6\xaa\xf7\x1d\xf5\xcb" "\xed\xbe\xdb\x77\x46\x87\x86\xb7\xae\x76\x24\x55\x35\x0f\x55\xe5\xcb\x9f" "\xfa\x99\xb3\xe7\xce\x7f\xe9\x85\xc1\x0b\xdd\xbc\xdc\x9e\xfe\x80\xfa\x7b" "\xed\xb3\xf1\xda\xc8\xb5\x4b\x8d\x97\x67\x6e\xcd\xce\x4d\xce\xcf\x4f\x4e" "\x34\x46\xa7\xdb\xe3\x33\x13\x93\x3b\xde\xc3\x6e\xeb\x6f\x76\xb2\x3a\x00" "\x8d\x5b\xaf\xdf\x9e\xb8\x71\x63\xbe\x71\xf6\xf9\x73\x1b\x3e\xbe\x33\xf0" "\x7e\xff\x13\xc7\x07\x2e\x0e\x3e\x7b\xea\x99\x6e\xd9\xd1\xa1\xe1\xe1\x91" "\xf5\x22\xf5\xde\xf2\xb5\xfb\x6e\x48\xc7\x76\x33\x3c\x0e\x47\x11\xa7\x22" "\xc5\x73\xdf\xfb\x69\x6a\x45\x44\x11\xbb\x3f\x16\xf5\x07\x3b\xf6\x9b\x1d" "\xa9\x3a\x71\xb2\xea\xc4\xe8\xd0\x70\xd5\x91\xa9\x76\x6b\x7a\xa1\xfc\xf0" "\x6a\xf7\x40\x14\x11\x8d\x9e\x4a\xcd\xee\x31\xda\x7a\x2c\xa2\xd6\xf7\x40" "\xfb\xb0\xbd\x66\xc4\x62\xd9\xfc\xb2\xc1\x27\xcb\xee\x8d\xcc\xb6\xe6\x5a" "\xd7\xa7\x26\x1b\x57\x5b\x73\x0b\xed\x85\xf6\xcc\xf4\xd5\xd4\x69\x6d\xd9" "\x9f\x46\x14\x71\x21\x45\x2c\x45\xc4\x4a\xff\xbd\xbb\xeb\x8b\x22\x6a\x91" "\xe2\x3b\xc7\x56\xd3\xf5\x88\x38\xd4\x3d\x0e\x5f\xac\x26\x06\x6f\xdf\x8e" "\x62\x1f\xfb\xb8\x03\x65\x3b\x1b\x7d\x11\x4b\xc5\x23\x30\x66\x07\x58\x7f" "\x14\xf1\x6a\xa4\xf8\xd9\x3b\x27\x62\x3c\x5f\x67\xaa\x6b\xcd\x17\x22\x5e" "\x2d\xf3\x07\x11\x6f\x95\xf9\x52\x44\x2a\x4f\x8c\xf3\x11\xef\x6d\x71\x1e" "\xf1\x68\xaa\x45\x11\x7f\x59\x8e\xff\xc5\xd5\x34\x51\x5d\x0f\xba\xd7\x95" "\xcb\x5f\x6b\x7c\x65\xfa\xc6\x4c\x4f\xd9\xee\x75\xe5\x23\xde\x1f\xee\xb9" "\x52\x3c\xa4\xfb\xc3\x91\x4d\xf9\x60\x1c\xf0\x6b\x53\x3d\x8a\x68\x55\x57" "\xfc\xd5\x74\xff\xbf\xd9\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x60\xaf\x1d\x89\x22\x3e\x13\x29\x5e\xf9\x8f\x3f\xa9\xe6\x15\x47\x35" "\x2f\xfd\xd8\xc5\xc1\x3f\x1c\xf8\xd5\xde\x39\xe3\x4f\x7f\xc8\x7e\xca\xb2" "\xcf\x47\xc4\x62\xb1\xb3\x39\xb9\x87\xf3\xc4\xc0\xab\xe9\x6a\x4a\x0f\x79" "\x2e\xf1\xe3\xac\x1e\x45\xfc\x69\x9e\xff\xf7\xad\x87\xdd\x18\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xc7\x5a\x11\x3f\x89\x14" "\x2f\xbe\x7b\x22\x2d\x45\xef\x9a\xe2\xed\xe9\x9b\x8d\x6b\xad\xeb\x53\x9d" "\x55\x61\xbb\x6b\xff\x76\xd7\x4c\x5f\x5b\x5b\x5b\x6b\xa4\x4e\x36\x73\x8e" "\xe5\x5c\xcc\xb9\x94\x73\x39\xe7\x4a\xce\x28\x72\xfd\x9c\xcd\x9c\x63\x39" "\x17\x73\x2e\xe5\x5c\xce\xb9\x92\x33\x0e\xe5\xfa\x39\x9b\x39\xc7\x72\x2e" "\xe6\x5c\xca\xb9\x9c\x73\x25\x67\xd4\x72\xfd\x9c\xcd\x9c\x63\x39\x17\xcb" "\xac\xaf\x77\x74\x39\x6f\x5f\xc9\x19\x07\x64\xed\x5e\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x80\x8f\x93\x22\x8a\xf8\x45\xa4\xf8\xf6\x37\x56\x53" "\xa4\x88\x68\x46\x8c\x45\x27\x97\xfb\x1f\x76\xeb\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x52\x7f\x2a\xe2" "\xfb\x91\xa2\xf1\x47\xcd\xbb\xdb\x6a\x11\x91\xaa\x7f\x3b\x4e\x94\xbf\x9c" "\x8f\xe6\xe1\x32\x3f\x19\xcd\xc1\x32\x5f\x8a\xe6\xa5\x9c\xad\x2a\x6b\xcd" "\x6f\x3d\x84\xf6\xb3\x3b\x7d\xa9\x88\x1f\x47\x8a\xfe\xfa\xdb\x77\x07\x3c" "\x8f\x7f\x5f\xe7\xdd\xdd\xd3\x20\xde\xfa\xe6\xfa\xbb\xcf\xd6\x3a\x79\xa8" "\xfb\xe1\xc0\xfb\xfd\x4f\x1c\x3f\x76\x71\x70\xf8\x37\x9e\xde\xee\x75\xda" "\xaa\x01\x27\x2f\xb7\xa7\x6f\xdf\x69\x8c\x0e\x0d\x0f\x8f\xf4\x6c\xae\xe5" "\x6f\xff\x64\xcf\xb6\x81\xfc\xbd\xc5\xde\x74\x9d\x88\x98\x7f\xe3\xcd\xd7" "\x5b\x53\x53\x93\x73\xf7\xff\xa2\x3c\x05\x76\x51\xfd\x11\x7a\x91\x6a\x8f" "\x4b\x4f\x1f\xd6\x8b\xc5\xbd\x38\x21\xf7\xee\x45\xd4\x0e\x44\x33\x1e\x4e" "\xdf\x79\x0c\x94\xf7\xff\xf7\x22\xc5\xef\xbe\xfb\x9f\xdd\x1b\x7e\xe7\xfe" "\x5f\x8f\x5f\xe9\xbc\xbb\x7b\x87\x8f\x9f\xff\xd9\xfa\xfd\xff\xc5\xcd\x3b" "\xda\xe1\xfd\xbf\xb6\xb9\x5e\xbe\xff\x97\xf7\xf4\xad\xee\xff\x4f\xf6\x6c" "\x7b\x31\xff\x6e\xa4\xaf\x16\x51\x5f\xb8\x35\xdb\x77\x3c\xa2\x3e\xff\xc6" "\x9b\xa7\xda\xb7\x5a\x37\x27\x6f\x4e\x4e\x9f\x3f\x7d\xfa\xcb\x83\x83\x5f" "\x3e\x77\xba\xef\x70\x44\xfd\x46\x7b\x6a\xb2\xe7\xd5\x9e\x1c\x2e\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x07\x27\x15\xf1\xfb\x91\xa2" "\xf5\xe3\xd5\xd4\x88\x88\x3b\xd5\x7c\xad\x81\x8b\x83\xcf\x9e\x7a\xe6\x50" "\x1c\xaa\xe6\x5b\x6d\x98\xb7\xfd\xda\xc8\xb5\x4b\x8d\x97\x67\x6e\xcd\xce" "\x4d\xce\xcf\x4f\x4e\x34\x46\xa7\xdb\xe3\x33\x13\x93\x3b\xfd\xba\x7a\x35" "\xdd\x6b\x74\x68\x78\x5f\x3a\xf3\xa1\x8e\xec\x73\xfb\x8f\xd4\x5f\x9e\x99" "\x7d\x63\xae\x7d\xf3\x8f\x17\xb6\xfc\xfc\x68\xfd\xd2\xf5\xf9\x85\xb9\xd6" "\xf8\xd6\x1f\xc7\x91\x28\x22\x9a\xbd\x5b\x4e\x56\x0d\x1e\x1d\x1a\xae\x1a" "\x3d\xd5\x6e\x4d\x57\x55\xaf\x6e\x39\x99\xfe\xa3\xeb\x4b\x45\xfc\x57\xa4" "\x18\x3f\xdf\x48\x9f\xcf\xdb\xf2\xfc\xff\xcd\x33\xfc\x37\xcc\xff\x5f\xdc" "\xbc\xa3\x7d\x9a\xff\xff\x89\x9e\x6d\xe5\x77\xa6\x54\xc4\xcf\x23\xc5\xef" "\xfc\xd5\xd3\xf1\xf9\xaa\x9d\x47\xe3\x9e\x63\x96\xcb\xfd\x5d\xa4\x38\x79" "\xe1\x73\xb9\x5c\x1c\x2e\xcb\x75\xdb\xd0\x79\xae\x40\x67\x66\x60\x59\xf6" "\xff\x22\xc5\x3f\xfd\x62\x63\xd9\xee\x7c\xc8\x27\xd7\xcb\x9e\xd9\xf1\x81" "\x7d\x44\x94\xe3\x7f\x2c\x52\x7c\xff\x2f\xbe\x1b\xbf\x99\xb7\x6d\x7c\xfe" "\xc3\xd6\xe3\x7f\x74\xf3\x8e\xf6\x69\xfc\x9f\xea\xd9\x76\x74\xc3\xf3\x0a" "\x76\xdd\x75\xf2\xf8\x9f\x8a\x14\x2f\x3d\xf9\x76\xfc\x56\xde\xf6\x41\xcf" "\xff\xe8\x3e\x7b\xe3\x44\x2e\x7c\xf7\xf9\x1c\xfb\x34\xfe\x9f\xea\xd9\x36" "\x90\xbf\xf7\xb7\xf7\xa6\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\xb4" "\xbe\x54\xc4\xdf\x47\x8a\x1f\x0e\xd7\xd2\x0b\x79\xdb\x4e\xfe\xfe\xdf\xc4" "\xe6\x1d\xed\xd3\xdf\xff\xfa\x74\xcf\xb6\x89\xbd\x59\xaf\xe8\x43\x5f\xec" "\xfa\xa0\x02\x00\x00\x00\xc0\x01\xd1\x97\x8a\xf8\x49\xa4\xb8\xb9\xf0\xf6" "\xdd\x39\xd4\x1b\xe7\x7f\xf7\xcc\xff\xfc\xbd\xf5\xf9\x9f\x43\x69\xd3\xa7" "\xd5\x9f\xf3\xfd\x5a\xf5\xdc\x80\xbd\xfc\xf3\xbf\x5e\x03\xf9\x7b\xc7\x76" "\xdf\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38" "\x50\x52\x2a\xe2\x85\xbc\x9e\xfa\x58\x35\x9f\x7f\x62\xdb\xf5\xd4\x97\x23" "\xc5\x2b\xff\xf3\x5c\x2e\x97\x8e\x97\xe5\xba\xeb\xc0\x0f\x54\xbf\xd6\xaf" "\xcc\x4c\x9f\xba\x34\x35\x35\x33\xde\x5a\x68\x5d\x9f\x9a\x6c\x8c\xcc\xb6" "\xc6\x27\xcb\xba\x4f\x45\x8a\xd5\xbf\xfd\x5c\xae\x5b\x54\xeb\xab\x77\xd7" "\x9b\xef\xac\xf1\xbe\xbe\x16\xfb\x5c\xa4\x18\xfe\x87\x6e\xd9\xce\x5a\xec" "\xdd\xb5\xc9\x9f\x5a\x2f\x7b\xa6\x2c\xfb\x89\x48\xf1\xdf\xff\xb8\xb1\x6c" "\x77\x1d\xeb\x4f\xad\x97\x3d\x5b\x96\xfd\x9b\x48\xf1\xf5\x7f\xd9\xba\xec" "\xf1\xf5\xb2\xe7\xca\xb2\xdf\x8d\x14\x3f\xfa\x7a\xa3\x5b\xf6\x68\x59\xb6" "\xfb\x7c\xd4\x4f\xaf\x97\x7d\x7e\x7c\xa6\xd8\x87\x51\x01\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x71\xd3\x97\x8a\xf8\xf3\x48" "\xf1\xbf\xb7\x96\xee\xce\xe5\xcf\xeb\xff\xf7\xf5\xbc\xad\xbc\xf5\xcd\x9e" "\xf5\xfe\x37\xb9\x53\xad\xf3\x3f\x50\xad\xff\xbf\xdd\xeb\xfb\x59\xff\xbf" "\x7a\xae\xc0\xe2\x76\xdf\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\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\x4f\x29\x8a\x78\x33\x52\xcc\x5e\x59\x4d\xcb" "\xfd\xe5\xfb\x8e\xfa\xe5\xf6\xf4\xed\x3b\xa3\x43\xc3\x5b\x57\x3b\x92\xaa" "\x9a\x87\xaa\xf2\xe5\x4f\xfd\xcc\xd9\x73\xe7\xbf\xf4\xc2\xe0\x85\x6e\x7e" "\x70\xfd\xbd\xf6\x99\x78\x6d\xe4\xda\xa5\xc6\xcb\x33\xb7\x66\xe7\x26\xe7" "\xe7\x27\x27\x1a\xa3\xd3\xed\xf1\x99\x89\xc9\x1d\xef\x61\xb7\xf5\x37\x3b" "\x59\x1d\x80\xc6\xad\xd7\x6f\x4f\xdc\xb8\x31\xdf\x38\xfb\xfc\xb9\x0d\x1f" "\xdf\x19\x78\xbf\xff\x89\xe3\x03\x17\x07\x9f\x3d\xf5\x4c\xb7\xec\xe8\xd0" "\xf0\xf0\x48\x4f\x99\x5a\xdf\x7d\x7f\xfb\x3d\xd2\x36\xdb\x0f\x47\x11\x7f" "\x1d\x29\x9e\xfb\xde\x4f\xd3\x0f\xfb\x23\x8a\xd8\xfd\xb1\xf8\x90\x73\x67" "\xbf\x1d\xa9\x3a\x71\xb2\xea\xc4\xe8\xd0\x70\xd5\x91\xa9\x76\x6b\x7a\xa1" "\xfc\xf0\x6a\xf7\x40\x14\x11\x8d\x9e\x4a\xcd\xee\x31\x7a\x00\x63\xb1\x2b" "\xcd\x88\xc5\xb2\xf9\x65\x83\x4f\x96\xdd\x1b\x99\x6d\xcd\xb5\xae\x4f\x4d" "\x36\xae\xb6\xe6\x16\xda\x0b\xed\x99\xe9\xab\xa9\xd3\xda\xb2\x3f\x8d\x28" "\xe2\x42\x8a\x58\x8a\x88\x95\xfe\x7b\x77\xd7\x17\x45\xbc\x1e\x29\xbe\x73" "\x6c\x35\xfd\x6b\x7f\xc4\xa1\xee\x71\xf8\xe2\x95\x91\xaf\x9e\x3e\xbb\x7d" "\x3b\x8a\x7d\xec\xe3\x0e\x94\xed\x6c\xf4\x45\x2c\x15\x8f\xc0\x98\x1d\x60" "\xfd\x51\xc4\x3f\x47\x8a\x9f\xbd\x73\x22\xfe\xad\x3f\xa2\x16\x9d\x9f\xf8" "\x42\xc4\xab\x65\xfe\x20\xe2\xad\xe8\x8c\x77\x2a\x4f\x8c\xf3\x11\xef\x6d" "\x71\x1e\xf1\x68\xaa\x45\x11\xff\x5f\x8e\xff\xc5\xd5\xf4\x4e\x7f\x79\x3d" "\xe8\x5e\x57\x2e\x7f\xad\xf1\x95\xe9\x1b\x33\x3d\x65\xbb\xd7\x95\x47\xfe" "\xfe\xf0\x20\x1d\xf0\x6b\x53\x3d\x8a\xf8\x51\x75\xc5\x5f\x4d\xff\xee\xbf" "\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x03\xa4\x88\x5f" "\x8f\x14\x2f\xbe\x7b\x22\x55\xf3\x83\xef\xce\x29\x6e\x4f\xdf\x6c\x5c\x6b" "\x5d\x9f\xea\x4c\xeb\xeb\xce\xfd\xeb\xce\x99\x5e\x5b\x5b\x5b\x6b\xa4\x4e" "\x36\x73\x8e\xe5\x5c\xcc\xb9\x94\x73\x39\xe7\x4a\xce\x28\x72\xfd\x9c\xcd" "\x32\xeb\x6b\x6b\x63\xf9\xfd\x62\xce\xa5\x9c\xcb\x39\x57\x72\xc6\xa1\x5c" "\x3f\x67\x33\xe7\x58\xce\xc5\x9c\x4b\x39\x97\x73\xae\xe4\x8c\x5a\xae\x9f" "\xb3\x99\x73\x2c\xe7\x62\xce\xa5\x9c\xcb\x39\x57\x72\xc6\x01\x99\xbb\x07" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\xbc\x14\xd5" "\x3f\x29\xbe\xfd\x8d\xd5\xb4\xd6\xdf\x59\x5f\x7a\x2c\x3a\xb9\x6c\x3d\xd0" "\x8f\xbd\x5f\x06\x00\x00\xff\xff\x1d\xab\xf3\xbc", 3126); syz_mount_image(/*fs=*/0x200000c0, /*dir=*/0x20000180, /*flags=MS_REC|MS_DIRSYNC*/ 0x4080, /*opts=*/0x20000540, /*chdir=*/2, /*size=*/0xc36, /*img=*/0x20002540); memcpy((void*)0x20000000, "./control\000", 10); syscall(__NR_mkdir, /*path=*/0x20000000ul, /*mode=*/0ul); memcpy((void*)0x200002c0, "./control/file0\000", 16); syscall(__NR_open, /*file=*/0x200002c0ul, /*flags=O_CREAT|O_CLOEXEC*/ 0x80040ul, /*mode=S_IRGRP*/ 0x20ul); memcpy((void*)0x200001c0, "./control/file0\000", 16); syscall(__NR_unlink, /*path=*/0x200001c0ul); memcpy((void*)0x20000040, "./control\000", 10); syscall(__NR_rmdir, /*path=*/0x20000040ul); memcpy((void*)0x200000c0, "./file0\000", 8); memcpy((void*)0x20000100, "./control\000", 10); syscall(__NR_rename, /*old=*/0x200000c0ul, /*new=*/0x20000100ul); return 0; }