// https://syzkaller.appspot.com/bug?id=2f82ed721ec435e433e7d99b91b9a3c1ea6913d8 // 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; } uint64_t r[1] = {0xffffffffffffffff}; 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; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$minix arguments: [ // fs: ptr[in, buffer] { // buffer: {6d 69 6e 69 78 00} (length 0x6) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: mount_flags = 0x2200050 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {e3 2d a0 df 74 08 b0 e0 1d ed b9 9f f5 2e 09 c2 // b5 89 d1 a6 ed 38 1f 57 96 65 6a 04 b7 3f 57 73 9c 5a f7 60 e8 b1 // 3b 8d 10 83 58 73 85 da 20 bc 24 cb 56 82 3a 40 fa a3 f8 a3 d3 e9 // 17 42 1c 25 02 6f 4b 78 18 9d 7d d5 91 d8 d0 e7 26 c3 64 1b bc 90 // 5f be 90 0d 86 47 49 de 4f 99 bd 23 6f de b1 42 df 34 05 64 fe 75 // 6f 2a 79 45} (length 0x6c) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // union ANYUNION { // ANYRESDEC: ANYRES64 (resource) // } // union ANYUNION { // ANYRESOCT: ANYRES64 (resource) // } // union ANYUNION { // ANYRES64: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {6e fe ee f2 af 85 46 61 d0 46 34 ef c7 81 14 c4 // 9c 99 a3 2d 37 3f 5f be 3c 18 91 1d f7 35 ce c9 78 c7 09 f6 6a c3 // 42 b6 1d 42 d3 31 d2 0b d9 75 80 6d 96 f4 7f 91 fe cf 06 26 63 95 // fa e5 ff 5c 94 9b 56 59 21 80 a5 19 d6 32 33 e2 31 76 ce af 93 73 // db 4b f1 30 6d c4 2f 54 d0 c3 dc ac fa 04 cf c7 d9 6a 1e df 27 53 // bb 61 31 a2 94 e4 c8 37 a3 a6 f5 62 19 2f 28 88 da d8 45 79 2e 08 // 63 01 b5 3e 15 66 11 82 f7 48 50 79 da 84 42 c8 c0 8b c5 f7 35 16 // bb b4 aa 00 c9 79 99 75 4a 23 f3 7e 08 14 40 7e c8 65 d5 13 a5 28 // 17 aa 76 0b 6e 85 bb 7f 39 07 aa 3e e0 dd 33 bb 90 f4 10 2f b0 62 // 6a 49 e9 7f 1f 6c} (length 0xc6) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // } // } // chdir: int8 = 0xfe (1 bytes) // size: len = 0x1b3 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x1b3) // } // ] // returns fd_dir memcpy((void*)0x200000000180, "minix\000", 6); memcpy((void*)0x2000000001c0, "./file1\000", 8); memcpy((void*)0x200000000540, "\xe3\x2d\xa0\xdf\x74\x08\xb0\xe0\x1d\xed\xb9\x9f\xf5\x2e\x09\xc2\xb5" "\x89\xd1\xa6\xed\x38\x1f\x57\x96\x65\x6a\x04\xb7\x3f\x57\x73\x9c\x5a" "\xf7\x60\xe8\xb1\x3b\x8d\x10\x83\x58\x73\x85\xda\x20\xbc\x24\xcb\x56" "\x82\x3a\x40\xfa\xa3\xf8\xa3\xd3\xe9\x17\x42\x1c\x25\x02\x6f\x4b\x78" "\x18\x9d\x7d\xd5\x91\xd8\xd0\xe7\x26\xc3\x64\x1b\xbc\x90\x5f\xbe\x90" "\x0d\x86\x47\x49\xde\x4f\x99\xbd\x23\x6f\xde\xb1\x42\xdf\x34\x05\x64" "\xfe\x75\x6f\x2a\x79\x45", 108); sprintf((char*)0x2000000005ac, "0x%016llx", (long long)-1); sprintf((char*)0x2000000005be, "%020llu", (long long)-1); sprintf((char*)0x2000000005d2, "%023llo", (long long)-1); *(uint64_t*)0x2000000005e9 = -1; memcpy((void*)0x2000000005f1, "\x6e\xfe\xee\xf2\xaf\x85\x46\x61\xd0\x46\x34\xef\xc7\x81\x14\xc4\x9c" "\x99\xa3\x2d\x37\x3f\x5f\xbe\x3c\x18\x91\x1d\xf7\x35\xce\xc9\x78\xc7" "\x09\xf6\x6a\xc3\x42\xb6\x1d\x42\xd3\x31\xd2\x0b\xd9\x75\x80\x6d\x96" "\xf4\x7f\x91\xfe\xcf\x06\x26\x63\x95\xfa\xe5\xff\x5c\x94\x9b\x56\x59" "\x21\x80\xa5\x19\xd6\x32\x33\xe2\x31\x76\xce\xaf\x93\x73\xdb\x4b\xf1" "\x30\x6d\xc4\x2f\x54\xd0\xc3\xdc\xac\xfa\x04\xcf\xc7\xd9\x6a\x1e\xdf" "\x27\x53\xbb\x61\x31\xa2\x94\xe4\xc8\x37\xa3\xa6\xf5\x62\x19\x2f\x28" "\x88\xda\xd8\x45\x79\x2e\x08\x63\x01\xb5\x3e\x15\x66\x11\x82\xf7\x48" "\x50\x79\xda\x84\x42\xc8\xc0\x8b\xc5\xf7\x35\x16\xbb\xb4\xaa\x00\xc9" "\x79\x99\x75\x4a\x23\xf3\x7e\x08\x14\x40\x7e\xc8\x65\xd5\x13\xa5\x28" "\x17\xaa\x76\x0b\x6e\x85\xbb\x7f\x39\x07\xaa\x3e\xe0\xdd\x33\xbb\x90" "\xf4\x10\x2f\xb0\x62\x6a\x49\xe9\x7f\x1f\x6c", 198); *(uint32_t*)0x2000000006b7 = -1; memcpy( (void*)0x200000000380, "\x78\x9c\xec\xdb\xcd\xae\xd2\x40\x18\xc6\xf1\xa7\x94\x02\xe2\xf7\xd7\xc6" "\x95\x89\x0b\xdd\x08\x8a\x6e\xdc\xc9\x05\x78\x03\xee\x08\x54\x42\x2c\x6a" "\xc4\x0d\xc4\xc4\x78\x29\xde\x09\x77\xe2\x0d\x40\xa2\x3b\x57\xd6\xb4\x14" "\x43\xc9\x00\xd3\x36\x5a\x38\xfc\x7f\xc9\x39\xe7\x4d\xa6\xcf\xcc\x9c\xa4" "\x03\x33\x8b\x11\x80\xb3\x75\x23\xfe\xed\xc8\x91\x27\xb9\x92\xc2\xf0\xcb" "\x7d\x49\xaf\x5f\x49\xaa\x96\x3d\x3b\x00\xff\x52\xa8\xdf\x21\x80\x73\xe5" "\xfe\x28\x7b\x06\x00\xca\xb1\xec\xba\xf1\x3e\x60\xee\x48\xdf\x7f\x7e\xee" "\x2f\x92\x1f\xcf\x72\xff\xb0\xec\x56\x56\x45\x43\xd2\x46\xbe\x66\x9b\xff" "\xea\xc4\x7f\xef\x55\xa5\xc5\x46\xbe\x9e\x74\x79\x70\xff\xf2\x6d\x95\x7f" "\xa8\x74\xfe\x52\xc6\xf1\x9b\x5b\xf9\xe6\x81\x9c\xf3\x37\xbf\xfa\xff\x1f" "\x3d\x48\xe7\x2f\x4b\xba\x22\xe9\xaa\xa4\x6b\x92\xae\x27\x67\xad\x9b\x92" "\x6e\x19\xc6\x1f\x6c\x8d\x7f\xd7\x72\xfe\x40\x11\xd1\xdb\xd7\x2a\x9a\x2f" "\xd0\x41\xb4\x7a\xde\x8c\x02\xff\x89\xa9\xd1\x3d\x9c\xf7\x92\xfc\x53\x73" "\xf3\xc6\x47\xc8\xdc\xf8\x40\x2d\xc9\x77\x2c\xe7\xbb\x2b\xff\x2c\x67\xbe" "\x9e\xe4\x5b\xfd\xf7\xc1\xc0\xd0\x5e\xc9\xd9\x2f\x60\xa3\x52\xf2\xfa\x77" "\xa5\x5f\xe1\xf6\xfa\x7f\x69\x9f\xaf\xee\x5f\xff\x00\xf6\x98\x4c\x67\x6f" "\x7b\x41\xe0\x7f\xcc\x50\x78\x71\x51\x4f\x7a\xc8\x10\x8f\x1e\xcf\x38\x16" "\x45\x19\x45\xc3\xd0\xe4\xe5\x7c\x5b\x8e\xba\x88\xbe\xbe\x8e\x60\x1a\xb6" "\xc5\x7a\xd5\xfe\xcf\xb1\x00\x5c\x54\xed\x4f\xe3\x0f\xed\xc9\x74\xf6\x78" "\x34\xee\x0d\xfd\xa1\xff\xae\xf3\xfc\xc5\xfa\xd8\x1d\x9f\xcb\xdb\x3b\x4f" "\xe7\x00\x4e\x5c\x7a\x73\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x4e\xd1\x6d\x49\x77\xf2\x04\x6d\x2f\xf8\x01\x00\x00\x00\x38\x1a\x86\xdb" "\x3f\x6e\x96\x2b\x7d\xe9\xc2\x93\x64\xbe\xf6\x07\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\xb8\x3f\x01\x00\x00\xff\xff\x3e" "\xbe\x40\x8c", 435); syz_mount_image( /*fs=*/0x200000000180, /*dir=*/0x2000000001c0, /*flags=MS_LAZYTIME|MS_SYNCHRONOUS|MS_RELATIME|MS_MANDLOCK*/ 0x2200050, /*opts=*/0x200000000540, /*chdir=*/0xfe, /*size=*/0x1b3, /*img=*/0x200000000380); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 00} (length 0x2) // } // flags: open_flags = 0x0 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x200000004280, ".\000", 2); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000004280ul, /*flags=*/0, /*mode=*/0); if (res != -1) r[0] = res; // fstatfs arguments: [ // fd: fd (resource) // buf: nil // ] syscall(__NR_fstatfs, /*fd=*/r[0], /*buf=*/0ul); return 0; }