// https://syzkaller.appspot.com/bug?id=706b943a0b26e4dada264aafdee297f3de937d81 // 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 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, loopfd = -1, 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) { memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; 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) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } errno = err; return res; } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); memcpy((void*)0x20000000, "hfsplus\000", 8); memcpy((void*)0x20000080, "./bus\000", 6); memcpy( (void*)0x200012c0, "\x78\x9c\xec\xdd\x4b\x68\x5c\xd7\x1d\x07\xe0\xdf\x1d\x8f\x64\x8d\x0b\x8e" "\x92\xc8\x89\x5b\x02\x15\x31\xa4\xa5\xa2\xb6\x1e\x28\xad\xba\xa9\x5b\x4a" "\xd1\x22\x94\x90\x2e\xba\x16\xb6\x1c\x0b\x8f\x95\x20\x29\x45\x09\xa5\xb8" "\x2f\xba\xed\x22\x74\x9d\x2e\xb4\xeb\xaa\xd0\xbd\x21\x5d\xb7\xbb\x6c\xb5" "\x0c\x14\xb2\xc9\xa2\x68\xe7\x72\xef\xdc\x91\x46\x6f\xc9\xb2\x3c\xa3\xe4" "\xfb\xc4\x99\x73\xce\x9c\xc7\x3d\xf3\x9f\x7b\xef\x3c\xc4\x70\x03\x7c\x6d" "\xcd\x4f\xa4\xf9\x38\x45\xe6\x27\xde\x5a\x2f\xeb\x9b\x1b\x33\xed\xcd\x8d" "\x99\xcb\x75\x73\x3b\x49\x59\x6e\x24\xcd\x4e\x96\x62\x39\x29\x3e\x4d\x6e" "\xa7\x93\xf2\xcd\xf2\xce\xba\x7f\x71\xd8\x76\x3e\x5e\x9a\x7b\xe7\xb3\x2f" "\x37\x3f\xef\xd4\x9a\x75\xaa\xfa\x37\x32\x72\xf8\xb8\x93\x79\x54\xa7\x8c" "\x27\xb9\x54\xe7\xfb\x0d\x3d\xd5\x7c\x77\x0e\x9d\xef\xa4\x8a\x5d\x91\xb9" "\xd1\x0d\x1c\xf4\xdb\x93\x7d\x1e\x9d\x66\xf8\x19\x8f\x5b\x60\x10\x14\x9d" "\xd7\xcd\x7d\x46\x93\x2b\x49\x46\xea\xf7\x01\xa9\xcf\x0e\x8d\xe7\xbb\xba" "\x67\xef\x54\x67\x39\x00\x00\x00\xb8\xa0\x5e\xd8\xca\x56\xd6\x73\xb5\xdf" "\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\x80\x8b\xa4\xbe\xfe\x7f\x51\xa7" "\x46\x27\x6f\x16\xe3\x29\xba\xd7\xff\x1f\xae\xdb\x52\x97\x2f\xb4\xc7\xfd" "\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x03\xdf\xde\xca\x56\xd6\x73\xb5" "\x5b\x7f\x52\x54\xff\xf3\x7f\xbd\xaa\x8c\x55\xb7\xdf\xc8\x07\x59\xcd\x62" "\x56\x72\x33\xeb\x59\xc8\x5a\xd6\xb2\x92\xa9\x24\xa3\x3d\x13\x0d\xaf\x2f" "\xac\xad\xad\x4c\x9d\x60\xe4\xf4\x81\x23\xa7\x9f\xcf\xe3\x05\x00\x00\x00" "\x00\x00\x00\x80\xaf\xa8\xdf\x67\x7e\xe7\xff\xff\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x30\x08\x8a\xe4\x52\x27\xab\xd2\x58\xb7\x3c\x9a\x46" "\x33\xc9\x48\x92\xe1\xb2\xdf\xa3\xe4\x3f\xdd\xf2\x45\xf6\xb8\xdf\x0b\x00" "\x00\x00\x80\xe7\xe0\x85\xad\x6c\x65\x3d\x57\xbb\xf5\x27\x45\xf5\x99\xff" "\x95\xea\x73\xff\x48\x3e\xc8\x72\xd6\xb2\x94\xb5\xb4\xb3\x98\xbb\xd5\x77" "\x01\x9d\x4f\xfd\x8d\xcd\x8d\x99\xf6\xe6\xc6\xcc\xc3\x32\xed\x9f\xf7\xaf" "\xff\x7b\x52\x39\xe1\x32\xaa\x19\xd3\xf9\xee\xe1\xe0\x2d\x5f\xaf\x7a\xb4" "\x72\x2f\x4b\xd5\x3d\x37\x73\x27\xef\xa5\x9d\xbb\x69\x54\x23\x4b\xd7\xbb" "\xeb\x39\x78\x5d\xbf\xfb\xa2\x9c\xfb\xc7\xb5\x13\xae\xec\x6e\x9d\x97\x8f" "\xfc\x2f\x75\x3e\x18\x46\xab\x88\x0c\x6d\x47\x64\xb2\x5e\x5b\x19\x8d\x17" "\x8f\x8e\xc4\x4f\xbe\x38\xd3\x96\xa6\xd2\xd8\xfe\xe6\x67\xec\x1c\x62\x7e" "\xa5\xce\xbb\xb1\xbe\x7c\xaa\xd5\x9e\xa7\xbd\x91\x98\xee\xd9\xfb\x5e\x39" "\x3a\x12\xc9\x77\xfe\xf9\xf7\x5f\xdd\x6f\x2f\x3f\xb8\x7f\x6f\x75\x62\x70" "\x76\xa3\xa7\xb4\x37\x12\x33\x3d\x91\x78\xf5\x6b\x15\x89\xc9\x2a\x12\xd7" "\xb6\xeb\xf3\xf9\x79\x7e\x99\x89\x8c\xe7\xed\xac\x64\x29\xbf\xce\x42\xd6" "\xb2\x98\xf1\xfc\xac\x2a\x2d\xd4\xfb\x75\x79\x3b\x7a\x74\xa4\x6e\xef\xaa" "\xbd\x7d\xdc\x4a\x86\xeb\xe7\xa5\x73\x16\x3d\xdd\x9a\x5e\xaf\xc6\x5e\xcd" "\x52\x7e\x91\xf7\x72\x37\x8b\x79\xb3\xfa\x9b\xce\x54\x7e\x90\xd9\xcc\x66" "\xae\xe7\x19\xbe\x76\x82\xa3\xbe\x71\xba\xa3\xfe\xc6\x77\xeb\x42\x2b\xc9" "\x9f\xeb\x7c\x30\x94\x71\x7d\xb1\x27\xae\xbd\xe7\xdc\xd1\xaa\xad\xf7\x9e" "\x9d\x28\xbd\xf4\xec\xcf\x8d\xcd\x6f\xd5\x85\x72\x1b\x7f\xa8\xf3\xc1\xb0" "\x37\x12\x53\x3d\x91\x78\xf9\xe8\x48\xfc\xad\x7a\x9f\xb0\xda\x5e\x7e\xb0" "\x72\x7f\xe1\xfd\xc3\x36\xb0\xfb\x68\xc8\x1b\x75\x5e\x1e\x47\x7f\x1a\xa8" "\x57\xe6\x72\x7f\x79\xa9\x7c\xb2\xaa\xda\xee\xbd\xa3\x6c\x7b\xb9\x6c\x6b" "\xed\x6d\x9b\xaa\xda\xc6\xb6\xc7\x35\xf6\xb5\x5d\xdb\x6e\x3b\xee\x48\x1d" "\xae\xdf\xc3\xed\x9f\x69\xba\x6a\x7b\xf5\xc0\xb6\x99\xaa\xed\x7a\x4f\xdb" "\x41\xef\xb7\x00\x18\x78\x57\xbe\x77\x65\xb8\xf5\xdf\xd6\xbf\x5b\x9f\xb4" "\xfe\xd8\xba\xdf\x7a\x6b\xe4\xa7\x97\x7f\x78\xf9\xb5\xe1\x0c\xfd\x6b\xe8" "\x47\xcd\xc9\x4b\x6f\x34\x5e\x2b\xfe\x91\x4f\xf2\xdb\x9d\xcf\xff\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xc0\xd3\x5b\xfd\xf0\xa3\x07\x0b\xed\xf6\xe2\xca\xb9\x15\xba" "\x97\x73\x3a\xba\x73\x51\x5f\xc8\xe7\xfc\xd7\xa3\xa0\xa0\x70\x7c\xa1\xcf" "\x27\x26\xe0\xdc\xdd\x5a\x7b\xf8\xfe\xad\xd5\x0f\x3f\xfa\xfe\xd2\xc3\x85" "\x77\x17\xdf\x5d\x5c\x1e\x9a\x9d\x9d\x9b\x9c\x9b\x7d\x73\xe6\xd6\xbd\xa5" "\xf6\xe2\x64\xe7\xb6\xdf\xab\x04\xce\xc3\xce\x8b\xfe\xde\x96\xe1\xfe\x2c" "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\xd6\xd1\x3f\x03\x18\xaa\x7b" "\x9d\xed\xe7\x04\x7d\x7e\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\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\x05\x37\x3f\x91\xe6\xe3\x14" "\x99\x9a\xbc\x39\x59\xd6\x37\x37\x66\xda\x65\xea\x96\x77\x7a\x36\x93\x34" "\x92\x14\xbf\x49\x8a\x4f\x93\xdb\xe9\xa4\x8c\xf6\x4c\x57\x1c\xb6\x9d\x8f" "\x97\xe6\xde\xf9\xec\xcb\xcd\xcf\x77\xe6\x6a\x76\xfb\x37\x8e\x1a\x77\xb4" "\xb1\x3a\x7f\x54\xa7\x8c\x27\xb9\x54\xe7\x67\xb0\x6b\xbe\x3b\x67\x9e\xaf" "\xd8\x7e\x84\x65\xc0\x6e\x74\x03\x07\xfd\xf6\xff\x00\x00\x00\xff\xff\x4b" "\xeb\x09\x26", 1533); syz_mount_image(/*fs=*/0x20000000, /*dir=*/0x20000080, /*flags=*/0x200008, /*opts=*/0x20000180, /*chdir=*/4, /*size=*/0x5fd, /*img=*/0x200012c0); memcpy((void*)0x200000c0, "./file1\000", 8); memcpy((void*)0x20000100, "trusted.overlay.nlink\000", 22); syscall(__NR_lsetxattr, /*path=*/0x200000c0ul, /*name=*/0x20000100ul, /*val=*/0ul, /*size=*/0ul, /*flags=*/3ul); return 0; }