// 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*)0x20000c40, "udf\000", 4); memcpy((void*)0x200000c0, "./file0\000", 8); memcpy((void*)0x20000100, "noadinicb,nostrict,mode=00000000000000000000004,uid=forget,noadinicb," "umask=00000000000000040002000,lastblock=00000000000000000013," "undelete,partition=00000000000000000005,\000", 171); memcpy( (void*)0x20000d00, "\x78\x9c\xec\xdd\x5d\x68\x5c\xe9\x79\x07\xf0\xe7\x9d\x23\xad\x46\xda\x34" "\xd1\x66\x13\x6f\xd2\x66\xd3\x81\x94\xc4\x28\xb5\xf1\x57\x6c\x05\x97\x20" "\x67\x15\xb5\x01\xc7\x1b\x22\x2b\x74\xaf\xa2\xd1\x87\x9d\x61\xe5\x91\x91" "\xe4\xc6\x9b\xb6\x41\x6d\x49\x0b\xbd\x09\xdd\x9b\xd2\x9b\x22\x9a\x2e\x2d" "\xe4\xa2\x57\xdd\x5e\x56\x69\xb6\x90\x50\x0a\x25\xe4\x22\xbd\x28\x08\x9a" "\x2c\x7b\xd1\x0b\x5d\x04\x0a\x2d\x1b\x85\x73\xe6\x1d\x69\x64\xcb\xb6\xb2" "\x5e\x5b\xd2\xee\xef\xb7\xcc\xfe\xcf\x9c\x79\xce\xf8\xfd\x18\x9f\x39\x02" "\xbf\x3a\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\x44\x7c" "\xf6\x73\x97\x4e\x9d\x4e\x07\xdd\x0a\x00\xe0\x71\xba\x32\xf9\xa5\x53\x67" "\x7d\xff\x03\xc0\xbb\xca\x55\x3f\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\xc0\x61\x97\xa2\x88\x63\x91\x62\xe8\xd5\xcd\x34\x5d\x3d\xef\xa8" "\x5f\x6e\xb5\x6f\xdd\x9e\x1a\x9f\xd8\xfb\xb0\xc1\x14\x29\x6a\x51\x54\xf5" "\xe5\xa3\x7e\xfa\xcc\xd9\x73\x9f\x3a\x7f\x61\xb4\x9b\xf7\x3f\xfe\xed\xf6" "\xe1\x78\x7e\xf2\xea\xa5\xc6\x73\x8b\x37\x6e\x2e\xcd\x2f\x2f\xcf\xcf\x35" "\xa6\xda\xad\xd9\xc5\xb9\xf9\x7d\xbf\xc3\xc3\x1e\x7f\xa7\x91\x6a\x00\x1a" "\x37\x5e\xbc\x35\x77\xed\xda\x72\xe3\xcc\xc9\xb3\xbb\x5e\xbe\x3d\xfc\xfa" "\xc0\x93\xc7\x86\x2f\x5e\x38\x71\x7e\xb4\x5b\x3b\x35\x3e\x31\x31\xd9\x53" "\xd3\xd7\xff\x96\xff\xf4\xbb\xdc\x6b\x85\xc7\x13\x51\x44\x33\x52\xbc\x39" "\xfc\x46\x6a\x46\x44\x2d\x1e\x7e\x2c\x1e\xf0\xd9\x79\xd4\x06\xab\x4e\x8c" "\x54\x9d\x98\x1a\x9f\xa8\x3a\xb2\xd0\x6a\xb6\x57\xca\x17\x53\x2d\x57\xd5" "\x22\x1a\x3d\x07\x8d\x75\xc7\xe8\x31\xcc\xc5\x43\x19\x8b\x58\x2d\x9b\x5f" "\x36\x78\xa4\xec\xde\xe4\xcd\xe6\x52\x73\x66\x61\xbe\xf1\xc5\xe6\xd2\x4a" "\x6b\xa5\xb5\xd8\x4e\xb5\x4e\x6b\xcb\xfe\x34\xa2\x16\xa3\x29\x62\x2d\x22" "\x36\x06\xee\x7e\xbb\xfe\x28\xe2\xa3\x91\xe2\xe5\x53\x9b\x69\x26\x22\x8a" "\xee\x38\x7c\xb2\x5a\x18\xfc\xe0\xf6\xd4\x1e\x41\x1f\xf7\xa1\x6c\x67\xa3" "\x3f\x62\xad\x76\x04\xe6\xec\x10\x1b\x88\x22\xae\x44\x8a\x9f\xbd\x76\x3c" "\x66\xcb\x31\xcb\x8f\xf8\x78\xc4\x17\xca\x7c\x35\xe2\x95\x32\x3f\x13\x91" "\xca\x0f\xc6\xb9\x88\x9f\xee\xf1\x39\xe2\x68\xea\x8b\x22\xfe\x3d\x52\x2c" "\xa6\xcd\x34\x57\x9d\x0f\xba\xe7\x95\xcb\x5f\x6e\x7c\xbe\x7d\x6d\xb1\xa7" "\xb6\x7b\x5e\x39\xf2\xdf\x0f\x8f\xd3\x21\x3f\x37\xd5\xa3\x88\x99\xea\x8c" "\xbf\x99\xde\xfa\xc5\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x6f\xb7\xc1\x28\xe2\xdb\x91\xe2\x4f\x9e\xfd\xbd\x6a\x5d\x71\x54\xeb" "\xd2\xdf\x77\x71\xf4\x3d\x2f\xfc\x76\xef\x9a\xf1\x67\x1e\xf0\x3e\x65\xed" "\xc9\x88\x58\xad\xed\x6f\x4d\x6e\x7f\x5e\x3a\x9c\x6a\xe5\x7f\x8f\xa0\x63" "\xec\x4b\x3d\x8a\xf8\x46\x5e\xff\xf7\x47\x07\xdd\x18\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x77\xb5\x22\x5e\x88\x14\x5f\x39" "\x71\x3c\xad\x45\xef\x3d\xc5\x5b\xed\xeb\x8d\xab\xcd\x99\x85\xce\x5d\x61" "\xbb\xf7\xfe\xed\xde\x33\x7d\x6b\x6b\x6b\xab\x91\x3a\x39\x96\x73\x3a\xe7" "\x6a\xce\xb5\x9c\xeb\x39\x37\x72\x46\x2d\x1f\x9f\x73\x2c\xe7\x74\xce\xd5" "\x9c\x6b\x39\xd7\x73\x6e\xe4\x8c\x22\x1f\x9f\x73\x2c\xe7\x74\xce\xd5\x9c" "\x6b\x39\xd7\x73\x6e\xe4\x8c\xbe\x7c\x7c\xce\xb1\x9c\xd3\x39\x57\x73\xae" "\xe5\x5c\xcf\xb9\x91\x33\x0e\xc9\xbd\x7b\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\xde\x49\x6a\x51\xc4\xcf\x23\xc5\xb7\xbe\xb6\x99\x22\x45\xc4" "\x58\xc4\x74\x74\x72\x7d\xe0\xa0\x5b\x07\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\xea\xa9\x88\x93\x91\x62" "\xfd\x85\x7a\xf5\x7c\xad\x16\x71\x35\x22\x7e\xbe\xb5\xb5\xd5\x7d\x44\xc4" "\x66\x99\x0f\xeb\xa0\xfb\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x87\x56\x2a\xe2\x63\x91\xe2\xe9\xff\xdb\x4c\x8d\x88\xb8" "\x3d\xfc\xfa\xc0\x93\xc7\x86\x2f\x5e\x38\x71\x7e\xb4\x88\x22\x52\x59\xd2" "\x5b\xff\xfc\xe4\xd5\x4b\x8d\xe7\x16\x6f\xdc\x5c\x9a\x5f\x5e\x9e\x9f\x6b" "\x4c\xb5\x5b\xb3\x8b\x73\xf3\xfb\xfd\xe3\xea\x97\x5b\xed\x5b\xb7\xa7\xc6" "\x27\x1e\x49\x67\x1e\x68\xf0\x11\xb7\x7f\xb0\xfe\xdc\xe2\xcd\x97\x96\x5a" "\xd7\xbf\xba\xb2\xe7\xeb\x43\xf5\x4b\x33\xcb\x2b\x4b\xcd\xd9\xbd\x5f\x8e" "\xc1\xa8\x45\x4c\xf7\xee\x19\xa9\x1a\x3c\x35\x3e\x51\x35\x7a\xa1\xd5\x6c" "\x57\x87\xa6\xda\x3d\x1a\x58\x8b\x18\xdb\x6f\x67\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x86\x52\x11\x9f\x8b\x14\x3f" "\xf9\xaf\x73\xa9\xbb\x6e\xbc\xaf\xb3\xe6\xff\x57\x3a\xcf\x8a\xed\xda\x57" "\xfe\x60\xe7\x77\x01\x2c\xdc\x91\x5d\xbd\xbf\x3f\x60\x3f\xdb\x69\xbf\x0d" "\x1d\xa9\x16\xde\x37\xa6\xc6\x27\x26\x26\x7b\x76\xf7\xf5\xdf\x5d\x5a\xb6" "\x29\xa5\x22\x9e\x89\x14\x9f\x78\xf9\x43\xd5\x7a\xf8\x14\x43\x7b\xae\x8d" "\x2f\xeb\xde\x5b\xd6\xdd\x38\x97\xeb\x86\x7f\xad\xac\x5b\xdd\x55\x55\x1f" "\x99\x1a\x9f\x68\x5c\x59\x6c\x9f\xb8\xb4\xb0\xb0\x38\xdb\x5c\x69\xce\x2c" "\xcc\x37\x26\x6f\x36\x67\xf7\xfd\x8b\x03\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\xe0\x3e\x86\x52\x11\x3f\x8a\x14\xff\xf3\xf7" "\xff\x91\xba\xf7\x9d\xcf\xeb\xff\xfb\x3a\xcf\x7a\xd6\xff\xff\x56\xb5\x84" "\xbe\x52\x4f\xbb\x73\x5b\xb5\xb6\xff\xbd\xd5\xda\xfe\xce\xf6\xfb\x2e\x8e" "\x0e\x7d\xf4\xd9\x7b\xed\x7f\x14\xeb\xff\xcb\x36\xa5\x54\xc4\x37\x23\xc5" "\xd9\x1f\x7d\xa8\xba\x9f\x7e\x77\xfd\xff\xf4\x1d\xb5\x65\xdd\x9f\x45\x8a" "\x37\x9e\xfd\x48\xae\xab\x3d\x51\xd6\x35\xbb\xdd\xe9\xbc\xe3\xb5\xd6\xc2" "\xfc\xa9\xb2\xf6\xaf\x23\xc5\xaf\xbf\xd9\xad\x8d\xaa\xf6\x7a\xae\x7d\x7a" "\xa7\xf6\x74\x59\x3b\x18\x29\xfe\x72\x73\x77\xed\x57\x73\xed\x07\x76\x6a" "\xcf\x94\xb5\xc7\x23\xc5\xf7\xfe\x7b\xef\xda\x0f\xee\xd4\x9e\x2d\x6b\x7f" "\x12\x29\xfe\xe9\xef\x1a\xdd\xda\xa1\xb2\xf6\xf7\x73\xed\xb1\x9d\xda\x93" "\xb3\x8b\x0b\x73\x0f\x1a\xd6\x72\xfe\xbf\x13\x29\xfe\xf6\xca\xef\xa4\x6e" "\x9f\xef\x39\xff\x3d\xbf\xff\x61\xf5\x8e\xdc\x76\xd7\x9c\xdf\x7f\xfb\xed" "\x9a\xff\xe1\x9e\x7d\xab\x79\x5e\xff\x34\xcf\x7f\xf3\x01\xf3\x7f\x3e\x52" "\x7c\xa7\xfe\x91\x5c\xd7\x19\xfb\x99\xfc\xfa\x53\xd5\xff\x77\xe6\xff\x13" "\x91\xe2\x3f\xff\x6d\x77\xed\xb5\x5c\xfb\xfe\x9d\xda\xd3\xfb\xed\xd6\x41" "\x2b\xe7\xff\xdb\x91\xe2\xbb\x7f\xf5\xe3\xed\x3e\xe7\xf9\xcf\x23\xbb\x33" "\x43\xbd\xf3\xff\xab\x7d\xbb\x73\xfb\x53\x72\x40\xf3\xff\x54\xcf\xbe\xe1" "\xdc\xae\xd9\x5f\x72\x2c\xde\x8d\x96\x5f\xfa\xfa\x8b\xcd\x85\x85\xf9\x25" "\x1b\x36\x6c\xd8\xd8\xde\x38\xe8\x33\x13\x8f\x43\xf9\xfd\xff\xe7\x91\xe2" "\xff\x8f\x15\xa9\x7b\x1d\x93\xbf\xff\xdf\xd3\x79\xb6\x73\xfd\xf7\xbf\xdf" "\xd8\xf9\xfe\xbf\x78\x47\x6e\x3b\xa0\xef\xff\xf7\xf7\xec\xbb\x98\xaf\x5a" "\xfa\xfb\x22\xea\x2b\x37\x6e\xf6\x3f\x13\x51\x5f\x7e\xe9\xeb\x27\x5a\x37" "\x9a\xd7\xe7\xaf\xcf\xb7\xcf\x9c\x3e\xf5\xe9\x4f\x9f\x3f\x7d\xea\xf4\xf9" "\xfe\x27\xba\x17\x77\x3b\x5b\xfb\x1e\xbb\x77\x82\x72\xfe\x7f\x10\x29\x7e" "\xf8\x0f\x3f\xdc\xfe\x39\x66\xf7\xf5\xdf\xde\xd7\xff\x43\x77\xe4\xb6\x03" "\x9a\xff\xa7\x7b\xfb\xb4\xeb\xba\x66\xdf\x43\xf1\xae\x54\xce\xff\xdf\x44" "\x8a\xa7\x3e\xfb\xe3\xed\x9f\x37\xef\x77\xfd\xdf\xfd\xf9\xff\xf8\xc7\x76" "\xe7\xf6\xdf\xbf\x03\x9a\xff\x0f\xf4\xec\x1b\xce\xed\x6a\xfd\x92\x63\x01" "\x00\x00\x00\x00\x00\x00\x00\x00\x70\x94\x0c\xa5\x22\xfe\x22\x52\xfc\xee" "\x1f\xff\x66\xea\xae\x21\xda\xcf\xbf\xff\x9b\xbb\x23\xb7\x1d\xd0\xbf\xff" "\x3a\xd6\xb3\x6f\xee\x31\xad\x6b\xd8\xf7\x20\x03\x00\x1c\x22\xe5\xf5\xdf" "\x07\x23\xc5\x3f\x6f\x7d\x7f\x7b\x2d\xf7\xee\xeb\xbf\xf8\x8d\x6e\x6d\xef" "\xf5\xdf\xbd\x1c\x86\xfb\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" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\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\x51\x97\xa2\x88\x3f\x8c\x14\x43\xaf\x6e\xa6" "\xf5\x81\xf2\x79\x47\xfd\x72\xab\x7d\xeb\xf6\xd4\xf8\xc4\xde\x87\x0d\xa6" "\x48\x51\x8b\xa2\xaa\x2f\x1f\xf5\xd3\x67\xce\x9e\xfb\xd4\xf9\x0b\xa3\xdd" "\xbc\xff\xf1\x6f\xb7\x0f\xc7\xf3\x93\x57\x2f\x35\x9e\x5b\xbc\x71\x73\x69" "\x7e\x79\x79\x7e\xae\x31\xd5\x6e\xcd\x2e\xce\xcd\xef\xfb\x1d\x1e\xf6\xf8" "\x3b\x8d\x54\x03\xd0\xb8\xf1\xe2\xad\xb9\x6b\xd7\x96\x1b\x67\x4e\x9e\xdd" "\xf5\xf2\xed\xe1\xd7\x07\x9e\x3c\x36\x7c\xf1\xc2\x89\xf3\xa3\xdd\xda\xa9" "\xf1\x89\x89\xc9\x9e\x9a\xbe\xfe\xb7\xfc\xa7\xdf\x25\xdd\x63\xff\x13\x51" "\xc4\xf7\x23\xc5\x9b\xc3\x6f\xa4\xef\x0e\x44\xd4\xe2\xe1\xc7\xe2\x01\x9f" "\x9d\x47\x6d\xb0\xea\xc4\x48\xd5\x89\xa9\xf1\x89\xaa\x23\x0b\xad\x66\x7b" "\xa5\x7c\x31\xd5\x72\x55\x2d\xa2\xd1\x73\xd0\x58\x77\x8c\x1e\xc3\x5c\x3c" "\x94\xb1\x88\xd5\xb2\xf9\x65\x83\x47\xca\xee\x4d\xde\x6c\x2e\x35\x67\x16" "\xe6\x1b\x5f\x6c\x2e\xad\xb4\x56\x5a\x8b\xed\x54\xeb\xb4\xb6\xec\x4f\x23" "\x6a\x31\x9a\x22\xd6\x22\x62\x63\xe0\xee\xb7\xeb\x8f\x22\xbe\x19\x29\x5e" "\x3e\xb5\x99\xfe\x65\x20\xa2\xe8\x8e\xc3\x27\xaf\x4c\x7e\xe9\xd4\xd9\x07" "\xb7\xa7\xf6\x08\xfa\xb8\x0f\x65\x3b\x1b\xfd\x11\x6b\xb5\x23\x30\x67\x87" "\xd8\x40\x14\xf1\x8f\x91\xe2\x67\xaf\x1d\x8f\xef\x0d\x44\xf4\x45\xe7\x11" "\x1f\x8f\xf8\x42\x99\xaf\x46\xbc\x52\xe6\x67\x22\x52\xf9\xc1\x38\x17\xf1" "\xd3\x3d\x3e\x47\x1c\x4d\x7d\x51\xc4\xb9\x48\xb1\x98\x36\xd3\x6b\x03\xe5" "\xf9\xa0\x7b\x5e\xb9\xfc\xe5\xc6\xe7\xdb\xd7\x16\x7b\x6a\xbb\xe7\x95\x23" "\xff\xfd\xf0\x38\x1d\xf2\x73\x53\x3d\x8a\xf8\x41\x75\xc6\xdf\x4c\xff\xea" "\xef\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x21\x52\xc4" "\x5a\xa4\xf8\xca\x89\xe3\xa9\x5a\x1f\xbc\xbd\xa6\xb8\xd5\xbe\xde\xb8\xda" "\x9c\x59\xe8\x2c\xeb\xeb\xae\xfd\xeb\xae\x99\xde\xda\xda\xda\x6a\xa4\x4e" "\x8e\xe5\x9c\xce\xb9\x9a\x73\x2d\xe7\x7a\xce\x8d\x9c\x51\xcb\xc7\xe7\x1c" "\xcb\x39\x9d\x73\x35\xe7\x5a\xce\xf5\x9c\x1b\x39\xa3\xc8\xc7\xe7\x1c\xcb" "\x39\x9d\x73\x35\xe7\x5a\xce\xf5\x9c\x1b\x39\xa3\x2f\x1f\x9f\x73\x2c\xe7" "\x74\xce\xd5\x9c\x6b\x39\xd7\x73\x6e\xe4\x8c\x43\xb2\x76\x0f\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x67\xa9\x45\x51\xdd\xc5" "\xfd\x5b\x5f\xdb\x4c\x5b\x03\x9d\xfb\x4b\x4f\x47\x27\xd7\xdd\x0f\xf4\x1d" "\xef\x17\x01\x00\x00\xff\xff\x49\x02\x74\xf7", 3089); syz_mount_image(/*fs=*/0x20000c40, /*dir=*/0x200000c0, /*flags=*/0, /*opts=*/0x20000100, /*chdir=*/0x43, /*size=*/0xc11, /*img=*/0x20000d00); memcpy((void*)0x20000000, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 250); syscall(__NR_mknod, /*file=*/0x20000000ul, /*mode=S_ISGID|0x8*/ 0x408ul, /*dev=*/0x700); memcpy((void*)0x20000300, "./file1\000", 8); syscall( __NR_open, /*file=*/0x20000300ul, /*flags=__O_TMPFILE|O_SYNC|O_PATH|O_NONBLOCK|O_NOFOLLOW|O_NOATIME|O_CREAT|0x2000*/ 0x763840ul, /*mode=S_IWOTH|S_IROTH|S_IXGRP|S_IRGRP|S_IXUSR|S_IRUSR*/ 0x16eul); memcpy((void*)0x20000c40, "./file1\000", 8); syscall(__NR_unlinkat, /*fd=*/0xffffff9c, /*path=*/0x20000c40ul, /*flags=*/0ul); memcpy((void*)0x200001c0, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 250); memcpy((void*)0x20000f00, "./file1\000", 8); syscall(__NR_rename, /*old=*/0x200001c0ul, /*new=*/0x20000f00ul); return 0; }