// https://syzkaller.appspot.com/bug?id=0b1ac5e39c478b05355e189451b5379dc925fd2e // 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); memcpy((void*)0x20000240, "bfs\000", 4); memcpy((void*)0x20000100, "./file0\000", 8); memcpy((void*)0x20000480, "\x53\x27\xef\x48\x82\x14\xa8\x3a\x03\x98\x1f\xab\x17\xb0\x16\x4c\xc2" "\x0b\xa7\xb1\x82\x93\x8b\x88\x49\x8d\x71\xa7\xa9\xe8\x73\x30\x1e\x02" "\xdd\xaf\x6c\x24\x74\xaa\x63\x68\xc9\x3d\x04\xed\xfc\xe2\xc9\xd1\xae" "\x54\xfd\x76\x71\x62\x0b\x00\xa8\x75\x11\x95\xf2\xab\xa1\x34\x68\xf5" "\xbf\x32\xde\x70\xe2\xf9\x01\xce\x9a\x21\xd8\xfb\x67\xff\x82\xc0\x41" "\x36\x75\xff\x5b\xeb\x23\xa5\xb3\x75\x7b\x50\x00\x00\x8e\xa7\x2d\xf1" "\x47\xb7\x11\x36\x82\xe5\x38\x31\x14\x7d\x1f\xdc\x20\x5e\xa3\x6c\x57" "\xee\x9a\xea\x4a\x7e\x00\x00\x00\x00\x00\x00\x1f\xc9\x2a\x87\xe6\xee" "\x23\xc6\x68\xd4\x5c\xdf\x9f\x45\xc4\x26\xc7\x0a\x3b\x25\x1f\x42\x42" "\x0e\x91\xa2\xf3\xbc\x23\x84\xc7\x5f\xa9\x39\x5b\xee\xe2\x4b\xe5\xcf" "\x48\xeb\x47\xef\x77\x29\xb9\x83\xe8\x3e\x24\xfd\x09\xdb\x46\xf0\xe6" "\xf7\xf6\xb8\x12\xb4\x58\x62\x54\x45\xae\x38\x2b\xcb\xa2\x66\x7d\x44" "\x52\x90\x22\xf5\x72\x8d\x38\xf3\x46\x73\x7d\x5c\x7d\x5c\x74\x56\x92" "\x63\x3a\x66\xed\x56\xf1\x67\x22\xb1\x78\x88\x0c\x0a\x98\x97\xcb\x57" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\xd8\x8d\x00\x66" "\x06\xd7\x5a\x00\x96\x28\x0a\x74\x3a\x8f\x93\xa0\xa9\x64\x1e\x0a\x51" "\x82\x7c\x22\x46\x09\x58\x39\x44\xc0\xcc\x93\x91\x99\xd6\x33\x44\x96" "\x86\x2b\xb4\x62\xd8\xcc\x53\x32\x41\x2b\xd8\xd1\xca\x5c\x18\x04\x5f", 306); *(uint32_t*)0x200005b2 = 0; *(uint16_t*)0x200005b6 = -1; *(uint32_t*)0x200005b8 = -1; memcpy((void*)0x20000040, "\x78\x9c\xec\xd7\x3f\x8a\xc2\x40\x1c\x05\xe0\xb7\x61\xd9\x3f\x4d\xf6" "\x00\x5b\xec\x0d\x72\x87\x3d\x8a\x58\x6a\x67\xa5\x58\x78\x21\x7b\x4f" "\xe1\x11\x04\x0f\x60\x61\x27\x36\x91\x18\x13\x52\xdb\x04\xe4\xfb\x60" "\x86\x79\xfc\x66\xe0\xb5\xb3\xbf\x6e\x7f\x53\x26\xf5\x4f\xee\xea\x81" "\xc5\x72\x35\x9b\xcc\x9b\x7d\x97\xde\x47\x78\x21\x45\x92\xcf\x24\x5f" "\x4d\x28\xdb\x7c\xfa\x6f\x67\x6f\x8f\xf9\xe1\xbc\x9e\x76\x6b\xf0\xf4" "\x7d\xa4\xca\x00\x00\xc0\x93\x8a\x54\x49\xbe\xbb\xb8\x29\x52\x55\xed" "\xf1\xd8\xdf\xf9\x6b\xfe\x02\x97\x51\xea\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\x8c\xee\x16\x00\x00\xff\xff\xe5\x97\x21\x3e", 168); syz_mount_image(/*fs=*/0x20000240, /*dir=*/0x20000100, /*flags=*/0, /*opts=*/0x20000480, /*chdir=*/1, /*size=*/0xa8, /*img=*/0x20000040); memcpy((void*)0x20000000, "./file1\000", 8); syscall(__NR_mknodat, /*dirfd=*/0xffffff9c, /*file=*/0x20000000ul, /*mode=*/0ul, /*dev=*/0x700); memcpy((void*)0x200002c0, "./file0\000", 8); syscall(__NR_creat, /*file=*/0x200002c0ul, /*mode=*/0ul); memcpy((void*)0x20000140, "./file1\000", 8); memcpy((void*)0x20000180, "./file0\000", 8); syscall(__NR_rename, /*old=*/0x20000140ul, /*new=*/0x20000180ul); memcpy((void*)0x20000000, "./file1\000", 8); syscall(__NR_mknodat, /*dirfd=*/0xffffff9c, /*file=*/0x20000000ul, /*mode=*/0ul, /*dev=*/0x700); memcpy((void*)0x20000180, "msdos\000", 6); memcpy((void*)0x20000100, ".\000", 2); memcpy( (void*)0x20000980, "\x14\x27\x0e\x2d\x25\xcc\xcf\xf0\x78\xb9\x14\x0e\x8a\x1e\x19\xf3\xb4\xc3" "\xbd\x09\x96\x8d\xd1\x91\x1a\xce\xf2\x43\x01\xd7\x64\xd9\xe1\x17\xda\x79" "\x06\x3a\x62\xe3\xa5\x92\xfb\x42\xf7\xd9\xdd\xb2\x68\x2b\x4c\x2f\xf5\x80" "\xe2\x5f\xa8\xef\xfb\xd5\x3a\xcf\xb0\xf8\x70\xbc\x1e\x49\xd0\x1a\x5b\x7f" "\xf5\x51\x50\xd2\xbf\x3b\x04\x28\x58\xc5\x32\x5c\x2b\x56\x9b\x32\x0c\xd4" "\x4e\x49\xe2\x46\xcc\x1e\x41\xf0\x4d\x2e\x49\x4a\xdd\xed\x5a\xa4\x75\x0b" "\x7c\xf2\x6f\x85\x6b\xf2\x3c\xb3\x79\x53\x1e\xba\xe1\x77\x4a\xf8\xa4\x95" "\x09\x2c\x89\x04\x20\x5d\xb1\x90\x36\x68\x75\xaa\x90\xaf\xf0\xd1\x1b\xf4" "\x4f\x06\x4c\x23\x39\x0e\x88\x56\x2d\x04\x1e\x50\x53\x62\xf5\xbf\xb0\x66" "\x5c\x3f\xaf\xda\x90\x9f\x59\xad\x28\x6e\xe9\xbd\x87\xd5\xaa\x09\x8d\xc5" "\xb8\x1e\xe3\x4c\xbf\x59\xbf\xa7\x65\xc1\xc9\x6e\x7f\xb5\x57\xcb\x14\x43" "\xf3\xdc\xee\xa4\x4c\x96\x3e\x0c\x93\x47\x54\x5e\x4f\xf3\x53\xbf\x8b\x90" "\x23\xcf\x81\xd7\x86\x73\xa0\xf6\x36\x3e\x5c\xc2\xb0\xd5\x24\xd2\x91\xe2" "\x8f\xc2\x8a\x27\x67\xae\x80\x4a\x98\xb3\x4b\x64\x8f\x0b\xa6\xed\xf5\x10" "\xda\x09\x03\x4a\x27\x0f\x6b\x3a\x29\x4a\x4f\x49\xd5\xed\x57\x1d\xb0\xe0" "\xd8\x30\x7c\x99\xa9\x53\xa8\x17\x5c\x2e\x11\x51\xa0\x65\xa9\xdd\x6f\x26" "\x2d\xf3\x82\x34\xa5\xa0\xe4\x88\x86\x28\xfe\x12\x4e\x56\xfa\xe3\xb1\xc2" "\xab\xbf\xb5\xfd\x11\x95\xbc\x0d\xc7\x08\xd1\x5d\x92\x52\xb9\xef\xe2\x66" "\xf9\xbf\xe1\xa9\x2f\x40\x41\x40\x77\xe9\xb6\x85\x18\x15\x49\x1e\xa6\x4e" "\xc4\x81\x7e\x4f\x74\xd5\xca\xa1\x79\x4d\x94\x83\x8e\xe8\xdc\xfe\x64\xc7" "\xda\xf9\x86\xe6\x06\xda\xab\x96\x61\xf7\xd6\x78\x98\x19\x8d\xc5\xb2\xdb" "\x3c\x9a\xf1\x29\x79\x4d\x1e\x11\x84\xb6\x5a\x7d\x44\x6a\x60\x17\x2f\x81" "\xb8\x15\xc8\xf4\x9c\xb6\x78\x0c\xff\xb3\x36\xf9\xaf\x74\xec\xca\x46\x44" "\x34\x6c\xb3\x51\xb8\x7c\x31\xa5\x3d\x00\xd2\x18\xd8\x5a\xe8\xc0\x75\x4a" "\x1a\xdc\xd2\x68\xb7\xf8\xda\xd2\x16\x56\xab\x6d\x08\xdb\xbb\xa3\x9f\x45" "\xdf\xac\x26\xde\x1e\xbd\xd4\xb3\xb1\xfb\xf2\xbc\x24\xbd\x5a\x63\x87\x80" "\x7e\x0d\x97\x26\x12\x92\xb7\x8f\xe3\x91\x71\x50\x4e\xe7\x1d\x59\xd4\xd0" "\x0c\x20\xbe\x45\x13\x29\xc5\x83\x04\x0e\xc3\x8a\x8b\xa2\x8e\x65\x4c\x8e" "\xc0\xb1\x8b\x6b\x9c\x69\x9e\xdb\x04\x0d\xe2\x22\x42\xd0\x34\xe3\x63\xd6" "\x24\xce\x07\x6a\xbe\x17\xba\xcf\x35\xd8\x49\x75\x03\x5c\x06\x3a\x89\x58" "\xc4\x7b\xb9\x00\x88\x74\x51\xe4\x93\x2f\x7a\x39\x1a\x8f\xee\xa3\x19\x57" "\x7a\x68\xf2\x65\x31\x9c\xcf\xca\xde\x5e\x7d\xc5\x6a\xde\x83\x12\xef\xb5" "\x97\xe8\x85\xd4\xd1\xb4\x1d\x27\xdc\x26\x57\xbb\x34\x49\x41\xd4\x2e\x68" "\xce\x72\xe0\x6d\x82\x64\x3a\x61\x57\x1d\x02\x5c\xe9\x07\xb7\x80\x70\x71" "\x57\x98\x42\x85\xff\x2b\xa1\x8a\x9f\x70\xd5\x34\xa1\x9b\xb6\x83\x57\x25" "\xd6\x53\x8e\x03\xf7\xe7\x77\x01\xbe\x36\x26\x17\x2f\x3d\xe7\x54\x5c\x9c" "\xd1\x3f\x12\x87\xa2\x61\x38\x0e\x79\x7c\x0b\x8b\x89\xa1\xdb\x32\xbc\x6d" "\x83\x7e\x5a\x05\x6f\xd2\xde\x70\xb2\x50\x2d\x51\x83\x54\xf6\x9f\x82\xb3" "\x8d\x72\x95\x9d\x86\x63\x5c\x26\x79\xd1\x31\xe0\x07\xbb\xac\x42\x5b\x8b" "\x59\xf4\xd5\xb2\x7e\xdf\x6f\x62\x03\xcf\xaa\x59\xba\x01\xc4\xb5\x89\xb0" "\xce\xd7\xf9\x25\x62\xb5\x4d\x17\x35\xda\xc9\x72\xa1\x38\x87\xc0\xa5\xa4" "\x34\x2e\x27\xa3\x1f\xe1\xec\x3c\x90\x19\xec\x71\x14\x4b\xcf\xca\x22\x20" "\x3e\x89\x1a\x1f\x2c\x24\x30\x05\x4d\xdb\xdd\x27\x8e\x04\xe4\x15\x03\x88" "\xf3\xdc\x6b\x99\x62\x7c\xb2\x4d\xc0\xe5\x80\x59\xc5\xb8\x12\x6b\x6f\x47" "\xb2\xf8\x7c\x1f\x57\x88\xee\xaa\x4e\x80\x2d\x46\x8d\x9a\x51\xa2\x4a\x59" "\x85\xaf\x12\x57\x3d\xce\x3a\xc5\x6c\xe8\x53\x9a\x75\x13\x0c\xbf\xc4\xc1" "\x8a\xad\x51\x4d\xd2\xc1\xe9\xd0\xb0\xef\x24\x36\xe9\x95\x39\x06\x1e\x84" "\xf8\x3d\x1c\xb3\x9d\xcc\x8a\x77\x6a\xc8\xdc\xcf\x94\xc4\x73\xb8\x99\xe2" "\x6a\x58\xcc\xec\x81\x42\xa1\x9d\x10\x1e\x61\x81\xba\xf6\x48\xe4\x25\x27" "\x7d\xd7\x35\xf8\xe7\xa7\x19\xb1\xad\x6f\xba\xfd\x1e\x10\xa4\xc6\x49\x6b" "\xd4\xf8\x29\x13\xbf\x9b\xe1\x35\xf4\x91\xd6\xc1\x3a\x46\x88\x67\xc1\xaf" "\x06\xe5\x9b\xbc\xa5\xc2\xaa\x90\xb8\x0b\x37\x85\xbf\x5b\x66\xbc\x11\xb2" "\x01\xa5\xe3\x0a\x39\x44\x2a\x6f\xb3\xe5\x16\x0d\x11\x0c\x19\x65\x04\x99" "\xb3\xc7\xfc\xa2\x78\xbb\x0c\x48\x4e\xc7\x7b\x81\x5d\x1b\x53\xc4\x72\x24" "\xc4\x57\x99\x60\x5b\x2b\xbf\x5d\x17\x34\xca\x89\xa9\x9c\x10\x2f\x97\x53" "\xac\xa4\x18\x88\x36\xaf\xc4\x2a\x35\xd0\x00\x00\x8a\x5d\x90\x9a\x39\x94" "\x40\x63\x93\x31\x58\xeb\x08\xad\xb7\xae\x37\x30\x40\xd0\xed\xd5\xe2\xd9" "\xe5\xee\x7f\x9c\xbc", 1031); *(uint8_t*)0x20000d87 = -1; sprintf((char*)0x20000d88, "0x%016llx", (long long)-1); *(uint64_t*)0x20000d9a = -1; *(uint16_t*)0x20000da2 = -1; sprintf((char*)0x20000da4, "0x%016llx", (long long)-1); sprintf((char*)0x20000db6, "0x%016llx", (long long)-1); *(uint16_t*)0x20000dc8 = -1; memcpy( (void*)0x20000dca, "\x6c\x58\x7b\x81\x89\x6b\x23\x50\x36\x9e\xe8\xd8\x3f\x97\x7b\x69\x67\x03" "\x52\x77\x59\xa6\x74\xc6\xd6\x1c\xd9\x29\xeb\xcb\x87\x7b\xdf\xee\x3e\x2d" "\x4e\x5c\xe1\xf0\xdd\x5b\x52\x39\xd7\xed\xeb\x45\x7c\x84\x19\xb1\xe2\x29" "\x74\xea\xfe\x8e\x72\x7b\x9a\x24\x45\xa3\x70\x73\x42\x09\xa6\xe4\xa8\x74" "\xd6\xa3\x48\xb9\xdd\x7f\xf9\x70\x6a\x25\x36\xdf\x37\x1f\xa6\xb2\x63\x53" "\x3b\xf0\x21\xbb\x17\x95\x09\xa9\x10\x96\x6d\x1f\x00\x00\x00\xbe\xc3\x77" "\x7a\x47\x01\x2a\xea\x45\xce\xba\xc0\x00\x00\x00\x00\x22\xff\x70\xde\xda" "\x30\x8f\x59\x03\xf8\x5b\x1e\xab\x3e\xc4\xe5\x39\xdc\x3b\x71\x46\x2b\x66" "\x78\x5e\xc2\xcd\x88\xd2\x15\x0c\x44\x5c\xb1\x96\x89\x39\x21\x9a\x3d\xce" "\xea\x5f\xdf\xb2\x22\x11\x47\x69\x46\x87\x21\xe1\xde\x2a\xf8\x0a\xcc\x39" "\xb0\x41\x5c\x0a\x00\x00\x00\x00\x00\x00\x21\x39\xd4\x82\x37\x06\xa7\x8a" "\xe7\xae\x10\xac\x67\xe8\x63\x9b\x45\x7c\xac\x96\x12\x16\x85\xc2\x2f\x84" "\x3f\xce\x08\x73\x65\xec\x1b\xfc\xda\xfe\x63\x1d\xc7\x03\x1f\xdb\x30\xc5" "\x5a\x9e\xc5\xe9\xe7\xc6\x28\x17\xf7\x38\x73\x69\xfc\x27\x19\xa3\xc6\x53" "\x29\x4e\x29\x10\x00\xf9\xd4\xc3\x70\x28\x5b\x31\xed\x27\x08\xd5\xac\x06" "\x9a\x21\x10\x7c\xb8\xaa\xf2\x94\x8a\x2f\xf7\x5e\x15\xf6\xa3\x3f\x66\xfe" "\xa6\x59\xc6\x50\x3f\xc9\x45\xc9\x9d\x62\x2e\xbd\x33\x74\x7c\x23\xca\x7d" "\xc4\x86\x42\x72\xeb\x7d\xce\xe5\xbe\x07\x34\xb7\x52\x72\xec\x66\x4e\x35" "\x90\x53\x08\xac\x64\xe3\x4c\xdd\xd9\x23\xaa\xd1\xee\x11\xb2\x60\x18\x61" "\x6f\xa4\xb5\xdb\x16\xcb\x0f\xc6\x47\x81\xde\xa5\x4d\x34\x71\x48\xb0\x72" "\xff\x40\xb0\x62\x31\xa1\x0f\x97\xe5\xc1\x21\xde\x5e\xab\x46\x30\x4e\x1e" "\x09\x5e\xde\xd2\x6a\x29\xd7\x12\x14\x39\xdd\x53\x75\xcc\x4e\x62\x1d\x20" "\xf5\xfa\xe9\x89\x0b\xe3\x34\x4b\xe6\xdb\x6e\x41\xee\x3b\x30\x08\x73\xf9" "\xbd\xbb\x9f\xc0\xae\x38\x9f\xbc\xe4\x01\x9e\x8f\x57\x7c\x64\xbe\x75\xbd" "\x7d\x26\x4b\xd0\x8b\x2e\x04\x10\x53\x07\xcd\x5d\xfd\x4b\xfe\x96\xeb\x1b" "\x44\x1a\xb3\x90\x95\x1e\x88\x95\x9f\x67\x94\x8f\x92\x50\x05\xfd\xc2\x4c" "\xc2\xe1\xd5\x6c\x8f\xb2\xf9\x81\x7a\xac\xf3\x6e\xd6\xfc\x59\x5e\x4b\x61" "\x84\x76\x68\x0e\x8c\x29\xa9\x4b\xa5\x53\x2f\x9a\x7b\xde\x13\x6f\xf8\xa2" "\xd3\xc1\xbe\x0e\xc8\x40\x43\x29\x48\xa9\xfe\xa7\xdf\x98\x6e\x8c\x8f\xa6" "\xf2\xf8\x72\xf7\x4b\xa0\xc2\xd1\x29\xeb\x34\x9b\xa9\x89\x5d\x8a\x92\xa9" "\xb9\x11\x60\xeb\x0a\xf0\x73\x78\x7e\x46\x04\x78\x9d\x0d\x6f\x2a\xbd\x4a" "\x82\x89\x76\xef\x17\x7f\x56\xab\x42\x17\xf4\xca\xa8\x00\x8b\x2c\xd9\x4c" "\xf4\x43\x3f\x05\x07\x90\x9c\xbd\xed\x4a\xcd\xdd\xa6\x48\x61\x6e\x71\x8d" "\xf4\x1b\xdc\xbc\xda\x7a\x37\x5a\x9b\x45\x42\x50\x03\x32\xb7\xb8\x8f\x57" "\x60\x29\x79\x5e\xf7\x73\x88\xbe\xe1\x95\x67\x18\x0a\x1e\x00\x00\x00\x00" "\x00\x00", 632); *(uint64_t*)0x20001042 = -1; syz_mount_image( /*fs=*/0x20000180, /*dir=*/0x20000100, /*flags=MS_I_VERSION|MS_PRIVATE|MS_STRICTATIME|MS_REMOUNT|MS_RELATIME|0x48c*/ 0x1a404ac, /*opts=*/0x20000980, /*chdir=*/0xfe, /*size=*/0, /*img=*/0x20000000); memcpy((void*)0x20000140, "./file1\000", 8); memcpy((void*)0x20000180, "./file0\000", 8); syscall(__NR_rename, /*old=*/0x20000140ul, /*new=*/0x20000180ul); return 0; }