// 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$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 34 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x16 (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nodiscard: buffer: {6e 6f 64 69 73 63 61 72 64} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // noblock_validity: buffer: {6e 6f 62 6c 6f 63 6b 5f 76 61 6c 69 // 64 69 74 79} (length 0x10) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // auto_da_alloc_val: fs_opt["auto_da_alloc", fmt[hex, int32]] { // name: buffer: {61 75 74 6f 5f 64 61 5f 61 6c 6c 6f 63} // (length 0xd) eq: const = 0x3d (1 bytes) val: int32 = 0x0 (18 // bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // delalloc: buffer: {64 65 6c 61 6c 6c 6f 63} (length 0x8) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // noblock_validity: buffer: {6e 6f 62 6c 6f 63 6b 5f 76 61 6c 69 // 64 69 74 79} (length 0x10) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // noauto_da_alloc: buffer: {6e 6f 61 75 74 6f 5f 64 61 5f 61 6c // 6c 6f 63} (length 0xf) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // minixdf: buffer: {6d 69 6e 69 78 64 66} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nolazytime: buffer: {6e 6f 6c 61 7a 79 74 69 6d 65} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // prjquota: buffer: {70 72 6a 71 75 6f 74 61} (length 0x8) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // noauto_da_alloc: buffer: {6e 6f 61 75 74 6f 5f 64 61 5f 61 6c // 6c 6f 63} (length 0xf) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x0 (1 bytes) // size: len = 0x525 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x525) // } // ] // returns fd_dir memcpy((void*)0x200000000000, "ext4\000", 5); memcpy((void*)0x200000000100, "./file0\000", 8); memcpy((void*)0x200000000040, "nodiscard", 9); *(uint8_t*)0x200000000049 = 0x2c; memcpy((void*)0x20000000004a, "noblock_validity", 16); *(uint8_t*)0x20000000005a = 0x2c; memcpy((void*)0x20000000005b, "auto_da_alloc", 13); *(uint8_t*)0x200000000068 = 0x3d; sprintf((char*)0x200000000069, "0x%016llx", (long long)0); *(uint8_t*)0x20000000007b = 0x2c; memcpy((void*)0x20000000007c, "delalloc", 8); *(uint8_t*)0x200000000084 = 0x2c; memcpy((void*)0x200000000085, "noblock_validity", 16); *(uint8_t*)0x200000000095 = 0x2c; memcpy((void*)0x200000000096, "noauto_da_alloc", 15); *(uint8_t*)0x2000000000a5 = 0x2c; memcpy((void*)0x2000000000a6, "minixdf", 7); *(uint8_t*)0x2000000000ad = 0x2c; memcpy((void*)0x2000000000ae, "nolazytime", 10); *(uint8_t*)0x2000000000b8 = 0x2c; memcpy((void*)0x2000000000b9, "prjquota", 8); *(uint8_t*)0x2000000000c1 = 0x2c; memcpy((void*)0x2000000000c2, "noauto_da_alloc", 15); *(uint8_t*)0x2000000000d1 = 0x2c; *(uint8_t*)0x2000000000d2 = 0; memcpy( (void*)0x200000001880, "\x78\x9c\xec\xdd\xdf\x6b\x9b\x6b\x1d\x00\xf0\xef\x9b\x36\x6b\xbb\xf5\x9c" "\xf6\xa8\x17\xc7\x03\x1e\x8b\xe7\x48\x77\xd0\x25\xed\xea\xb6\xe2\xc5\x9c" "\x20\x7a\x35\x50\xb7\xfb\x59\xda\xb4\x94\xa6\x4d\x69\xd2\x6e\x2d\x43\x3a" "\xfc\x03\x04\x11\x15\xbc\xf2\xca\x1b\xc1\x3f\x40\x90\xfd\x09\x22\x0c\xf4" "\x5e\x54\x14\x71\x9b\xbb\xf0\x46\x23\x49\xde\x6c\x6d\x96\xf4\xd7\x92\xc6" "\xb5\x9f\x0f\xbc\xcb\xf3\xbc\x3f\xfa\xfd\x3e\xef\xda\x37\xef\x93\xe7\x21" "\x6f\x00\xe7\xd6\x44\x44\xdc\x8a\x88\x81\x88\xf8\x24\x22\xc6\xd2\xf5\x99" "\x74\x89\xdd\xc6\x52\xdb\xef\xf9\xb3\x87\xf3\xb5\x25\x89\x6a\xf5\xce\x3f" "\x93\x48\xd2\x75\xcd\x9f\x95\xa4\xaf\x97\xd2\xc3\x86\x23\xe2\xbb\xdf\x8a" "\x88\xa7\xd5\x6a\x6b\xdc\xf2\xf6\xce\xca\x5c\xb1\x58\xd8\x88\xb8\x5b\xab" "\xe7\x2b\xab\xeb\xf9\xf2\xf6\xce\x95\xe5\xd5\xb9\xa5\xc2\x52\x61\x6d\x66" "\x66\xfa\xfa\xec\x8d\xd9\x6b\xb3\x53\x27\x6e\xdb\x56\x24\xcd\x94\x62\x3c" "\x22\x6e\x7e\xe3\xaf\x3f\xf9\xe1\x2f\xbf\x79\xf3\xb7\x5f\xbe\xff\xa7\x7b" "\x7f\xbf\xfc\xfd\xda\xc6\xd1\x74\xfb\xde\x76\x74\x53\x23\x81\x6c\xfd\x5c" "\x34\x0d\x46\xc4\x46\x2f\x82\xf5\xc1\x40\xda\x9e\x6c\xbf\x13\x01\x00\xe0" "\x48\x6a\xf7\xa7\x9f\x8a\x88\x2f\xd4\xef\xff\xc7\x62\xa0\x7e\x37\x77\x90" "\x91\x53\xca\x0c\x00\x00\x00\xe8\x96\xea\xd7\x46\x23\x1b\xd5\xa1\x2a\x00" "\x00\x00\x70\x66\x65\xea\x73\x60\x93\x4c\x2e\x9d\xef\x3b\x1a\x99\x4c\x2e" "\xd7\x98\xc3\xfb\x99\xb8\x98\x29\x96\xca\x95\x2f\x2d\x96\x36\xd7\x16\x1a" "\x73\x65\xc7\x23\x9b\x59\x5c\x2e\x16\xa6\xd2\xb9\xc2\xe3\x91\x4d\x6a\xf5" "\xe9\x74\x8e\x6d\xb3\x7e\xb5\xa5\x3e\x13\x11\xef\x45\xc4\x8f\xc7\x46\xea" "\xf5\xdc\x7c\xa9\xb8\xd0\xef\x0f\x3f\x00\x00\x00\xe0\x9c\xb8\xd4\xd2\xff" "\x7f\x31\xd6\xe8\xff\x03\x00\x00\x00\x67\xcc\x78\xbf\x13\x00\x00\x00\x00" "\x7a\x4e\xff\x1f\x00\x00\x00\xce\x3e\xfd\x7f\x00\x00\x00\x38\xd3\xbe\x7d" "\xfb\x76\x6d\xa9\x36\x9f\x7f\xbd\xb0\xb5\xbd\xb9\x52\xda\xba\xb2\x50\x28" "\xaf\xe4\x56\x37\xe7\x73\xf3\xa5\x8d\xf5\xdc\x52\xa9\xb4\x54\xff\xce\xbe" "\xd5\xc3\x7e\x5e\xb1\x54\x5a\xff\x4a\xac\x6d\x3e\xc8\x57\x0a\xe5\x4a\xbe" "\xbc\xbd\x73\x6f\xb5\xb4\xb9\x56\xb9\xb7\xbc\xef\x11\xd8\x00\x00\x00\xc0" "\x29\x7a\xef\xf3\x8f\xff\x98\x44\xc4\xee\x57\x47\xea\x4b\x24\x11\x17\xd2" "\x6d\xd9\x3e\xe7\x06\xf4\x56\xe6\x38\x3b\xff\xa5\x77\x79\x00\xa7\x6f\xa0" "\xdf\x09\x00\x7d\x33\xd8\xef\x04\x80\xbe\xd1\xc7\x07\x92\x43\xb6\x77\x9c" "\xbc\xf3\xbb\xee\xe7\x02\x00\x00\xf4\xc6\xe4\x67\x5b\xc6\xff\xc3\xf8\x3f" "\x9c\x17\xc7\x1a\xff\x07\xce\x94\xe3\x8c\xff\xbb\x1f\x80\xb3\xa5\xcd\xf8" "\xbf\x29\x01\x70\x4e\x64\xcd\x00\x84\x73\xaf\xf7\xe3\xff\xd5\xea\xb1\x12" "\x02\x00\x00\xba\x6e\xb4\xbe\x24\x99\x5c\x3a\x16\x38\x1a\x99\x4c\x2e\x17" "\xf1\x4e\xfd\xb1\x00\xd9\x64\x71\xb9\x58\x98\x8a\x88\x77\x23\xe2\x0f\x63" "\xd9\xa1\x5a\x7d\xba\x7e\x64\x72\x68\x9f\x01\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\xa8\x56\x93\xa8\x9e" "\xc0\x8b\x93\x1c\x04\x00\x00\x00\xf4\x45\x44\xe6\x6f\x49\xfa\xfc\xaf\xc9" "\xb1\x8f\x47\x5b\x3f\x1f\xb8\x90\xfc\x7b\xac\xfe\x1a\x11\xf7\x7f\x7e\xe7" "\xa7\x0f\xe6\x2a\x95\x8d\xe9\xda\xfa\xa7\x2f\xd7\x57\x7e\x96\xae\xbf\xba" "\xf7\xc8\xdd\xd7\x3f\x6c\xf0\xb0\x71\x00\x00\x00\x38\x15\xcd\x7e\x7a\xb3" "\x1f\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xdd\xf4\xfc\xd9\xc3\xf9\xe6\x12\xd9\xd3\x8b\xfb\x8f\xaf\x47" "\xc4\x78\x4b\xfc\xba\xc1\x18\xae\xbf\x0e\xd7\xd3\xb9\xf8\xaf\x24\x06\xf7" "\x1c\x97\x44\xc4\x40\x17\xe2\xef\x3e\x8a\x88\xf7\xdb\xc5\x4f\x6a\x69\xc5" "\x78\x9a\x45\x6b\xfc\x4c\x44\x8c\x74\x2f\xfe\x48\x9c\x20\xfe\xa5\x2e\xc4" "\x87\xf3\xec\x71\xed\xfa\x73\xab\xdd\xdf\x7f\x26\x26\xea\xaf\xed\xff\xfe" "\x06\xd3\xe5\x4d\xed\xbd\xfe\xd5\x2e\x07\x7b\xe3\x37\xaf\x7f\x03\x1d\xae" "\x7f\xef\x1c\x31\xc6\x07\x4f\x7e\x9d\xef\x18\xff\x51\xc4\x07\x83\xed\xaf" "\x7f\xcd\xf8\x49\x87\xf8\x1f\x75\x8c\x38\xb4\xaf\xf6\xbd\xbb\x3b\x3b\x9d" "\xf6\xac\xfe\x22\x62\xb2\xf5\xfd\xe7\x65\x84\x57\xa5\x7c\x65\x75\x3d\x5f" "\xde\xde\xb9\xb2\xbc\x3a\xb7\x54\x58\x2a\xac\xcd\xcc\x4c\x5f\x9f\xbd\x31" "\x7b\x6d\x76\x2a\xbf\xb8\x5c\x2c\xa4\xff\xb6\x8d\xf1\xa3\xcf\xfd\xe6\xbf" "\x07\xb5\xff\x62\x87\xf8\xe3\x87\xb4\xff\xe3\x8e\xed\xdf\xef\x3f\x4f\x1e" "\x3c\xfb\x74\xa3\xf8\xda\x3b\x6b\x2d\xfe\xe5\x8f\xf6\xc7\x9f\x48\xb7\xbd" "\xdf\x21\x7e\x26\x7d\xef\xfb\x62\x5a\xae\x6d\x9f\x6c\x96\x77\x1b\xe5\xbd" "\x3e\xfc\xd5\xef\x3f\x7c\x99\x74\x9b\xf8\x0b\x1d\xda\x7f\xd8\xff\xff\xe5" "\x66\x65\xf8\xe0\xf6\x7f\xf2\x9d\x1f\xfc\xf9\x90\x53\x04\x00\x9c\xa2\xf2" "\xf6\xce\xca\x5c\xb1\x58\xd8\x38\x61\x61\x2b\x8e\xba\xf3\x44\xfb\x4d\xcd" "\x3b\xa2\xa3\x07\xdd\x8d\x37\xcc\xf9\xed\x2d\x0c\x1f\xeb\x44\xbd\x35\x85" "\x81\xd8\xbf\xa6\x79\x9f\xda\xe5\x58\xd9\x23\xfe\xce\x0f\xff\x9f\x9c\x96" "\x23\x14\xde\xdd\xb3\xe6\x42\xda\xbc\x2e\x85\xe8\xc3\xc5\x08\x00\x00\xe8" "\xa9\x57\x37\xfd\x47\xd8\x79\xdf\x80\xfb\x50\xef\x92\x02\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x73\xe6\x34\xbe\xa8\xac\x35" "\xe6\x6e\x7f\x9a\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\xa0\xff\x05\x00\x00\xff\xff\xa5" "\x7e\xc4\x01", 1317); syz_mount_image(/*fs=*/0x200000000000, /*dir=*/0x200000000100, /*flags=MS_SYNCHRONOUS|MS_NOSUID|MS_NODEV*/ 0x16, /*opts=*/0x200000000040, /*chdir=*/0, /*size=*/0x525, /*img=*/0x200000001880); // openat$fuse arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 66 75 73 65 00} (length 0xa) // } // flags: const = 0x2 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_fuse memcpy((void*)0x200000002000, "/dev/fuse\000", 10); syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000002000ul, /*flags=*/2, /*mode=*/0); // mount$fuseblk arguments: [ // src: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 6c 6f 6f 70 30 00} (length 0xb) // } // dst: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // type: ptr[in, buffer] { // buffer: {66 75 73 65 62 6c 6b 00} (length 0x8) // } // flags: mount_flags = 0x3000000 (8 bytes) // opts: nil // ] memcpy((void*)0x200000000000, "/dev/loop0\000", 11); memcpy((void*)0x200000000040, "./file0\000", 8); memcpy((void*)0x200000000080, "fuseblk\000", 8); syscall(__NR_mount, /*src=*/0x200000000000ul, /*dst=*/0x200000000040ul, /*type=*/0x200000000080ul, /*flags=MS_LAZYTIME|MS_STRICTATIME*/ 0x3000000ul, /*opts=*/0ul); return 0; }