// https://syzkaller.appspot.com/bug?id=19dc6f10777fbb1b30af85af5e77cac6732d6a8a // 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"); } else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts, "errors=panic") || strstr(opts, "debug"))) { strcat(opts, ",errors=withdraw"); } 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=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$hfsplus arguments: [ // fs: ptr[in, buffer] { // buffer: {68 66 73 70 6c 75 73 00} (length 0x8) // } // dir: ptr[in, buffer] { // buffer: {13 13 77 c5 fc 35 d4 14 54 d5 d4 1d 29 ad 1a 60 29 59 81 46 // e6 be 16 6e 41 ad 0d bd 40 54 03 3c 9f 33 bb da 82 24 a2 f3 d7 72 e7 // 63 6e 48 b3 3c bf 70 83 72 e8 f1 b9 93 3e c5 12 77 43 be 22 06 20 9e // f0 2d f9 cb f2 f6 e8 80 d3 38 2f 00} (length 0x4e) // } // flags: mount_flags = 0x804002 (8 bytes) // opts: ptr[in, fs_options[hfsplus_options]] { // fs_options[hfsplus_options] { // elems: array[fs_opt_elem[hfsplus_options]] { // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // nls: fs_opt["nls", stringnoz[codepages_names]] { // name: buffer: {6e 6c 73} (length 0x3) // eq: const = 0x3d (1 bytes) // val: buffer: {64 65 66 61 75 6c 74} (length 0x7) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // nodecompose: buffer: {6e 6f 64 65 63 6f 6d 70 6f 73 65} // (length 0xb) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // nobarrier: buffer: {6e 6f 62 61 72 72 69 65 72} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // uid: fs_opt["uid", fmt[hex, uid]] { // name: buffer: {75 69 64} (length 0x3) // eq: const = 0x3d (1 bytes) // val: uid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // part: fs_opt["part", fmt[hex, int32]] { // name: buffer: {70 61 72 74} (length 0x4) // eq: const = 0x3d (1 bytes) // val: int32 = 0xff (18 bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // gid: fs_opt["gid", fmt[hex, gid]] { // name: buffer: {67 69 64} (length 0x3) // eq: const = 0x3d (1 bytes) // val: gid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // decompose: buffer: {64 65 63 6f 6d 70 6f 73 65} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[hfsplus_options] { // elem: union hfsplus_options { // nobarrier: buffer: {6e 6f 62 61 72 72 69 65 72} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0xff (1 bytes) // size: len = 0x6c5 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x6c5) // } // ] // returns fd_dir memcpy((void*)0x200000000000, "hfsplus\000", 8); memcpy((void*)0x200000000100, "\023\023w\305\3745\324\024T\325\324\035)\255\032`)" "Y\201F\346\276\026nA\255\r\275@T\003<\2373\273\332\202$" "\242\363\327r\347cnH\263<\277p\203r\350\361\271\223>" "\305\022wC\276\"\006 \236\360-\371\313\362\366\350\200\3238/\000", 78); memcpy((void*)0x200000000380, "nls", 3); *(uint8_t*)0x200000000383 = 0x3d; memcpy((void*)0x200000000384, "default", 7); *(uint8_t*)0x20000000038b = 0x2c; memcpy((void*)0x20000000038c, "nodecompose", 11); *(uint8_t*)0x200000000397 = 0x2c; memcpy((void*)0x200000000398, "nobarrier", 9); *(uint8_t*)0x2000000003a1 = 0x2c; memcpy((void*)0x2000000003a2, "uid", 3); *(uint8_t*)0x2000000003a5 = 0x3d; sprintf((char*)0x2000000003a6, "0x%016llx", (long long)0); *(uint8_t*)0x2000000003b8 = 0x2c; memcpy((void*)0x2000000003b9, "part", 4); *(uint8_t*)0x2000000003bd = 0x3d; sprintf((char*)0x2000000003be, "0x%016llx", (long long)0xff); *(uint8_t*)0x2000000003d0 = 0x2c; memcpy((void*)0x2000000003d1, "gid", 3); *(uint8_t*)0x2000000003d4 = 0x3d; sprintf((char*)0x2000000003d5, "0x%016llx", (long long)0); *(uint8_t*)0x2000000003e7 = 0x2c; memcpy((void*)0x2000000003e8, "decompose", 9); *(uint8_t*)0x2000000003f1 = 0x2c; memcpy((void*)0x2000000003f2, "nobarrier", 9); *(uint8_t*)0x2000000003fb = 0x2c; *(uint8_t*)0x2000000003fc = 0; memcpy( (void*)0x200000000400, "\x78\x9c\xec\xdd\x4d\x88\x5d\x67\xfd\x07\xf0\xef\xb9\x99\xdc\xc9\xcd\x1f" "\xd2\x69\x9b\xa6\xf9\x8b\x90\xa1\x81\xa2\x0d\x26\x33\xb9\xd4\x44\x10\x1a" "\x45\x24\x8b\x20\x41\x37\xdd\x0e\xc9\xa4\x19\x72\x93\x96\xc9\x54\xd2\x22" "\xe6\x46\xad\x82\x2b\x57\xd2\x85\x8b\x8a\xc4\x45\x57\x22\x22\xd4\x95\x58" "\xd7\x82\xe0\xc6\x55\xf6\x01\x77\x2e\xb2\x50\x47\xce\xcb\x9d\xb9\x33\x73" "\x33\xb9\x93\x97\xb9\x69\xfc\x7c\xe0\xcc\x79\xce\x3c\xe7\x79\x9e\xdf\xf9" "\xe5\x3c\xe7\xdc\x97\x09\x27\xc0\xff\xac\xb3\x6f\x66\x6f\x3f\x45\xce\x1e" "\x3b\x77\xa3\xdc\xbe\x73\xbb\xdb\xbb\x73\xbb\x7b\x75\x50\x4e\x32\x9d\xa4" "\x95\x4c\xd5\xab\x14\x9d\xa4\xf8\x34\x39\x93\x7a\xc9\xff\x97\xbf\x6c\xba" "\x2b\xee\x37\xce\xeb\x77\x3f\x29\xa6\x3e\xfc\xb8\x5b\x6f\x4d\x35\x4b\xb5" "\x7f\x6b\xbb\x76\x5b\x8c\xdc\xb3\x9f\xec\x5b\xdb\xd8\x93\x64\xb6\x2e\xfe" "\x6b\x8c\x0e\x5b\xa3\xfb\xab\x96\xaa\x9f\x0b\xeb\xfd\x3d\xa4\x62\x2d\xee" "\x32\x61\x47\x07\x89\x83\x49\x5b\xdd\xa2\xbf\x5e\x39\x6a\x6a\x6c\x34\xfe" "\xbc\x05\x9e\x5a\x37\xeb\xfb\xe6\x16\x33\xc9\xfe\xd4\x77\xd7\xf2\x75\x40" "\x9a\xab\xc3\x83\xaf\x0c\x93\xb7\xed\xb5\xa9\xbf\x7b\x71\x00\x00\x00\xc0" "\x93\x32\xf2\xbd\xfc\xb0\xe7\xee\xe5\x5e\x6e\xe4\xc0\xee\x84\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\xcf\x86\xa2\x7e\x66\x60\xd1\x2c\xad\x41\x79" "\x36\xc5\xe0\xf9\xff\xed\xa1\x67\xea\xb7\x27\x1c\xee\x23\xfa\xe0\x52\xb5" "\xfa\xf6\x73\x93\x0e\x04\x00\x00\x00\x00\x00\x00\x00\x1e\xc9\x91\x7b\xb9" "\x97\x1b\x39\x30\xd8\x5e\x2d\xaa\xef\xfc\x5f\xa9\x36\x0e\x56\x3f\xff\x2f" "\xef\xe6\x7a\x16\xb3\x9c\xe3\xb9\x91\x85\xac\x64\x25\xcb\x99\x4f\x32\x33" "\xd4\x51\xfb\xc6\xc2\xca\xca\xf2\xfc\xd6\x96\x3f\x4f\xd9\x72\x75\x75\xf5" "\x66\xd3\xf2\xe4\xc8\x96\x27\x37\xc6\xd5\xdf\x1c\xe8\x96\xbf\x34\xf8\x8c" "\xff\xe9\x01\x00\x00\x00\x00\x00\x00\x00\x3c\x5e\x3f\xc8\xd9\xf5\xef\xff" "\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\xe0\x69\x50\x24\x7b\xea\x55" "\xb5\x1c\x1c\x94\x67\xd2\x9a\x4a\xb2\x2f\x49\xbb\x98\x5d\xdb\xbd\x3d\xd1" "\x60\x1f\x83\x3f\x4e\x3a\x00\x00\x00\x00\x78\xf2\x3a\xcd\xfa\x40\xf1\x9f" "\xba\xb0\x5a\x54\xef\xf9\x0f\x55\xef\xfb\xf7\xe5\xdd\x5c\xcb\x4a\x96\xb2" "\x92\x5e\x16\x73\xb1\xfa\x2c\xa0\x7e\xd7\xdf\xfa\x6b\xbf\xdb\xbb\x73\xbb" "\x7b\xb5\x5c\xb6\x76\xfc\xb5\x7f\xec\x28\x8e\xaa\xc7\xd4\x9f\x3d\x8c\x1e" "\x79\xae\xda\xe3\xa5\xb5\x16\x67\xf3\xcd\x7c\x27\xc7\x32\x9b\xf3\x59\xce" "\x52\xbe\x9b\x85\xac\x64\x31\xb3\xf9\x46\x55\x5a\x48\x91\x99\xe6\xd3\x8b" "\x99\x3b\xb7\x3b\x19\xc4\xba\x35\xde\x33\x1b\xb6\xce\x6f\x8e\xed\xc8\x50" "\xb9\x8c\xef\x70\x15\x49\x27\x97\xb2\x54\xc5\x76\x3c\x17\xda\x83\xd0\x5b" "\xcd\x7e\x87\x87\x46\xfb\x7d\x3b\xd9\x34\xe2\xad\x32\x3b\xc5\x1b\x8d\x31" "\x73\x74\xb1\x59\x97\x47\xf4\xb3\x66\xfd\x74\x98\xa9\x8e\x7c\xef\x5a\x46" "\xe6\x9a\xdc\x97\xd9\x78\x7e\x38\xef\x5b\x73\xbf\xc3\xf3\x64\xf3\x48\xf3" "\x69\xad\x7d\x06\x75\x70\x7d\x94\x72\x73\xf3\x48\x0f\x95\xf3\xfd\xcd\xba" "\xcc\xf5\x8f\x9f\x6c\xce\x77\xf8\x51\xda\x5a\x26\x8a\x22\xbd\xf4\x7f\x5a" "\x6e\x0d\xce\xbe\x43\xdb\xe7\x3c\xf9\xe2\xdf\xfe\x74\xfe\x72\xeb\xda\x95" "\xcb\x97\xae\x1f\x7b\x7a\x4e\xa3\x87\xb4\xf9\x9c\xe8\x0e\x65\xe2\xe5\xb1" "\x32\xd1\x2b\x33\xd1\x7f\x84\x4c\xec\x7b\x94\xf8\x1f\x9f\x76\x93\x8d\xfa" "\x2a\xba\xb3\xab\xe5\x2b\x55\xdb\x03\x59\xca\xb7\xf2\x76\x2e\x66\x31\xa7" "\x32\x97\xf9\x9c\xce\x5c\xbe\x92\x93\xe9\xe6\xe4\x50\x5e\x5f\xda\x3e\xaf" "\xd5\x5c\x6b\xed\x6c\xae\x1d\xfd\x42\x53\x28\xef\x49\x3f\x19\xba\x37\xed" "\x9a\xe9\xfb\x55\x94\x79\x7d\x7e\x28\xaf\xc3\x57\xba\x99\xaa\x6e\xf8\x37" "\xeb\x59\x7a\x61\x8c\x2c\x15\xed\x8c\xce\xd2\xdf\x47\x86\x32\xf5\xb9\xa6" "\x50\x8e\xf1\xc3\xa1\x3b\xce\xe4\x6d\xce\xc4\xfc\x50\x26\x5e\xdc\x3e\x13" "\xbf\xfc\xf7\x6a\x92\xeb\xbd\x6b\x57\x96\x2f\x2f\xbc\x33\xe6\x78\xaf\x36" "\xeb\x72\xda\x7e\xb0\xf1\xda\xfc\xab\xc7\x72\x40\x3b\xd7\x1c\x6e\x79\xbe" "\xbc\x50\xfe\x63\xa5\xbe\x6d\x0c\x9f\x1d\x65\xdd\x8b\x83\xba\x4d\xf9\x6a" "\x37\xdf\xb8\x4c\x35\x9d\x6d\xa8\x6b\xa7\x9a\xcf\x75\xdd\x83\x66\x6a\xd9" "\xd3\xa1\x5b\xa3\x7a\xaa\xeb\x5e\x1e\x39\x4a\xb7\xaa\x3b\x3c\x54\xb7\xe1" "\x55\x4e\xde\x4e\x6f\xed\x55\x48\x63\xd7\x27\x29\x00\x63\xd8\xff\xda\xfe" "\x76\xe7\x6e\xe7\x2f\x9d\x8f\x3a\x3f\xea\x5c\xee\x9c\xdb\xf7\xf5\xe9\xd3" "\xd3\x9f\x6f\x67\xef\x9f\xa7\xfe\xb0\xe7\x37\xad\x5f\xb7\xbe\x5a\xbc\x96" "\x8f\xf2\xfd\x1c\x98\x74\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x2c\xb8\xfe\xde\xfb" "\x57\x16\x7a\xbd\xc5\xe5\x9d\x16\x3a\x0f\xd5\x6a\x47\x85\xb4\x1e\x73\x87" "\xb7\x46\x56\x0d\x52\x51\xff\xa6\x3d\x62\x9f\x23\x79\xc2\x47\xfa\xec\x14" "\xa6\xb7\x3b\xa3\x7e\x9b\xfa\x71\x4d\xf7\x69\xde\x9e\x44\xcc\x9d\xdc\x37" "\x9e\xdd\x2d\x64\x6a\x17\xc6\x9a\xce\x88\xaa\x73\xeb\x93\x3a\x69\xad\xc5" "\x93\xe4\xca\xc8\x07\xdc\x4d\xed\xe2\xf5\x09\x78\x72\x4e\xac\x5c\x7d\xe7" "\xc4\xf5\xf7\xde\xff\xd2\xd2\xd5\x85\xb7\x16\xdf\x5a\xbc\x76\xf2\xf4\xa9" "\x37\x4e\x75\xbf\x3c\x7f\xf3\xc4\xa5\xa5\xde\xe2\x5c\xfd\xb3\xd9\xd9\xc4" "\x87\x67\xca\xfa\xcb\x80\x49\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x8c\x6b\x37\xfe\x7b\xc3\x88\x61\x8b\xfe\x04\x8e\x15\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x6c" "\x3a\xfb\x66\xf6\xf6\x53\x64\x7e\xee\xf8\x5c\xb9\x7d\xe7\x76\xb7\x57\x2e" "\x83\x72\x92\x76\xbd\xe7\x54\x92\x56\x92\xe2\x7b\x49\xf1\x69\x72\x26\xf5" "\x92\x99\xa1\xee\x8a\xfb\x8d\xf3\xfa\xdd\x4f\x7e\xf1\xea\x87\x1f\x77\xd7" "\xfb\x9a\x1a\xec\xdf\xda\xd4\xee\x77\xff\x5c\x5d\xad\x4b\x9d\x71\x8f\xa2" "\xdf\x2c\x99\x4d\xb2\xa7\x59\x3f\xd8\xf4\x58\xfd\x5d\x18\xea\xaf\x3f\x6e" "\x44\x1b\x14\x6b\x47\x58\x26\xec\xe8\x20\x71\x30\x69\xff\x0d\x00\x00\xff" "\xff\xa9\x62\x04\x57", 1733); syz_mount_image(/*fs=*/0x200000000000, /*dir=*/0x200000000100, /*flags=MS_I_VERSION|MS_REC|MS_NOSUID*/ 0x804002, /*opts=*/0x200000000380, /*chdir=*/-1, /*size=*/0x6c5, /*img=*/0x200000000400); // unlinkat arguments: [ // fd: fd_dir (resource) // path: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: unlinkat_flags = 0x0 (8 bytes) // ] memcpy((void*)0x200000000140, "./file1\000", 8); syscall(__NR_unlinkat, /*fd=*/0xffffff9c, /*path=*/0x200000000140ul, /*flags=*/0ul); // setxattr arguments: [ // path: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // name: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {6f 73 78 2e 26 2d 5d 3a} (length 0x8) // } // } // } // val: nil // size: len = 0x0 (8 bytes) // flags: setxattr_flags = 0x0 (8 bytes) // ] memcpy((void*)0x200000000040, "./file0\000", 8); memcpy((void*)0x2000000000c0, "osx.&-]:", 8); syscall(__NR_setxattr, /*path=*/0x200000000040ul, /*name=*/0x2000000000c0ul, /*val=*/0ul, /*size=*/0ul, /*flags=*/0ul); return 0; }