// https://syzkaller.appspot.com/bug?id=9053b7f3bbef2f835af6e4a2cfa72af5df3f390a // 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 #include #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_mprotect #define __NR_mprotect 226 #endif #ifndef __NR_open_by_handle_at #define __NR_open_by_handle_at 265 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_quotactl #define __NR_quotactl 60 #endif static unsigned long long procid; static __thread int clone_ongoing; static __thread int skip_segv; static __thread jmp_buf segv_env; static void segv_handler(int sig, siginfo_t* info, void* ctx) { if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { exit(sig); } uintptr_t addr = (uintptr_t)info->si_addr; const uintptr_t prog_start = 1 << 20; const uintptr_t prog_end = 100 << 20; int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; int valid = addr < prog_start || addr > prog_end; if (skip && valid) { _longjmp(segv_env, 1); } exit(sig); } static void install_segv_handler(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8); syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8); memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = segv_handler; sa.sa_flags = SA_NODEFER | SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGBUS, &sa, NULL); } #define NONFAILING(...) \ ({ \ int ok = 1; \ __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ if (_setjmp(segv_env) == 0) { \ __VA_ARGS__; \ } else \ ok = 0; \ __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ ok; \ }) //% 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=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-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=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; install_segv_handler(); intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 32 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {e9 1f 71 89 59 1e 92 33 61 4b 00} (length 0xb) // } // flags: mount_flags = 0x3 (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0xfc (1 bytes) // size: len = 0x562 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x562) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x20000040, "ext2\000", 5)); NONFAILING(memcpy((void*)0x20000140, "\351\037q\211Y\036\2223aK\000", 11)); NONFAILING(*(uint8_t*)0x20000000 = 0); NONFAILING(memcpy( (void*)0x20000780, "\x78\x9c\xec\xdd\xef\x6f\x1b\x67\x1d\x00\xf0\xef\x39\x76\x9a\xb4\x81\x04" "\xd8\x8b\x81\xb4\x51\xb1\x49\xed\x04\xb5\x9b\x95\x6d\x11\x42\x6b\x91\x10" "\xef\x26\x81\x06\xaf\x4b\x94\xba\x51\x54\x27\xae\x62\x67\x6b\xa2\x09\xa5" "\xe2\x0f\x40\x42\x08\x26\xf1\x06\x5e\xf1\x06\x89\x3f\x00\x09\xf5\x4f\x98" "\x90\x26\xb1\xf7\x88\x21\x50\x05\x1d\x48\xec\x05\xec\xd0\xfd\x70\xdb\x64" "\xf6\xe2\x76\xb1\x5d\x39\x9f\x8f\xf4\xf8\xce\xf7\xdc\xdd\xf7\xfb\xd8\xce" "\x73\xe7\xbb\x73\x2e\x80\x13\xeb\x6c\x44\x5c\x89\x88\x99\x88\x78\x21\x22" "\x16\xcb\xe9\x95\xb2\xc4\x7e\x51\xb2\xf9\x3e\xb8\xf7\xd6\x5a\x56\x92\x48" "\xd3\xd7\xff\x91\x44\x52\x4e\xcb\x66\x4b\xca\x92\x39\x53\x2e\x36\x57\x0c" "\x0e\x9a\x2f\x06\x9d\xdd\xbd\x1b\xab\xad\x56\x73\xbb\x9c\xdc\xe8\x6e\xde" "\x6c\x74\x76\xf7\x2e\x6c\x6c\xae\xae\x37\xd7\x9b\x5b\x97\x2e\x2d\xbf\xbc" "\xf2\xca\xca\x4b\x2b\x17\x8f\xa5\x9d\x59\xbb\x5e\xfd\xf6\x5f\x7f\xfe\x93" "\xdf\x7c\xe7\xd5\x3f\x7c\xed\xcd\x3f\x5f\xfd\xfb\xf9\x1f\x65\xf9\x2e\x94" "\xf5\xbd\x76\x1c\xb7\xe2\x35\xa9\x65\xaf\xc5\x7d\xd5\x88\xd8\x1e\x45\xb0" "\x09\x98\x29\xdb\x53\x8b\xde\x03\x00\x00\x4f\xb2\x6c\x1f\xff\xf3\x11\xf1" "\x95\x7c\xff\x7f\x31\x66\xf2\xbd\xb9\xc1\x66\x1f\x1a\x4f\x46\x9e\x1d\x00" "\x00\x00\x70\x1c\xd2\xcb\x0b\xf1\xdf\x24\x22\x05\x00\x00\x00\xa6\x56\x25" "\xbf\x06\x36\xa9\xd4\xcb\x6b\x01\x16\xa2\x52\xa9\xd7\x8b\x6b\x78\x9f\x8a" "\xd3\x95\x56\xbb\xd3\xfd\xea\xf5\xf6\xce\xd6\xb5\xe2\x5a\xd9\xa5\xa8\x55" "\xae\x6f\xb4\x9a\x17\xcb\x6b\x6a\x97\xa2\x96\x64\xcf\x97\xef\x1f\x51\x28" "\x9e\xbf\x98\xd7\x65\x25\x39\x70\x0d\xf0\xcf\x16\xe7\xf3\xfa\xfa\x5a\xbb" "\x75\x6d\x12\x07\x3c\x00\x00\x00\xe0\x04\x3a\x73\xe8\xfb\xff\xbf\x17\x8b" "\xef\xff\x00\x00\x00\xc0\x94\x59\x2a\x87\xa7\x27\x9c\x07\x00\x00\x00\x30" "\x3a\x4b\x93\x4e\x00\x00\x00\x00\x18\xb9\xc7\xf8\xfe\x3f\x3b\x8a\x3c\x00" "\x00\x00\x80\x91\xf8\xee\x6b\xaf\x65\x25\xed\xdd\xff\xfa\xda\x1b\xbb\x3b" "\x37\xda\x6f\x5c\xb8\xd6\xec\xdc\xa8\x6f\xee\xac\xd5\xd7\xda\xdb\x37\xeb" "\xeb\xed\xf6\x7a\x2b\x3d\x15\xb1\x79\xd4\xfa\x5a\xed\xf6\xcd\xaf\xc7\xd6" "\xce\xad\x46\xb7\xd9\xe9\x36\x3a\xbb\x7b\x57\x37\xdb\x3b\x5b\xdd\xab\x1b" "\x07\x6e\x81\x0d\x00\x00\x00\x8c\xd1\xe7\xbe\x7c\xe7\xbd\x24\x22\xf6\xbf" "\x31\x9f\x97\xe8\x9d\xdb\x9f\x19\xb0\x80\xdf\x0a\xc0\xd4\xa8\x0c\x39\x5f" "\x9a\x3d\xbc\x3f\xda\x5c\x80\xf1\x1a\xb4\x99\x07\xa6\x5f\xf5\x93\xab\x5d" "\xe6\x0b\x53\xac\x56\x0c\x92\x49\xe7\x01\x4c\xce\x51\x1d\xc0\xdc\xa0\x39" "\xde\x19\x45\x36\x00\x00\xc0\x28\x9c\xfb\xe2\x9d\xf7\xd2\xe4\xe3\xe7\xff" "\xab\x0f\x8e\x0d\x00\x53\x6a\xd8\xf3\xff\xc0\xf4\x19\x70\xfe\x3f\x5d\x1c" "\x77\x22\xc0\xd8\x1d\x71\xfe\x1f\x98\x62\x35\x57\x00\xc2\x89\x77\xf4\xf9" "\xff\x01\xde\xc9\xab\xae\x1c\x1d\x21\x4d\x8f\x5c\x17\x00\x00\x30\x52\x0b" "\x79\x49\x2a\xf5\xf2\x5c\xe0\x42\x54\x3e\x4c\x0b\xb1\x14\xb5\xe4\xfa\x46" "\xab\x79\x31\x22\x3e\x1b\x11\x7f\x5a\xac\x9d\xca\x9e\x2f\xe7\x4b\x26\x7e" "\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x43\x4a\xd3\x24\xd2\xc7\x50\x7d\xac\xa5\x00\x00\x00\x80\x49" "\x88\xa8\xfc\x2d\x29\xef\xff\x75\x6e\xf1\xf9\x85\xc3\xc7\x07\x66\x93\x0f" "\xf3\x5b\x01\x7f\x94\xa6\xe9\x9b\xbf\x7c\xfd\x17\xb7\x56\xbb\xdd\xed\xe5" "\x6c\xfa\x3f\xf3\xe9\xb3\x11\xd1\x7d\xbb\x9c\xfe\xe2\x24\x8e\x60\x00\x00" "\x00\x00\x3d\xbd\xbb\xfc\x17\xdf\xd3\x6b\x13\xce\x06\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\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\x69\xf5\xc1\xbd" "\xb7\xd6\x7a\x65\x9c\x71\xef\x7e\x2b\x22\x96\xfa\xc5\xaf\xc6\x5c\x3e\x9c" "\x8b\x5a\x44\x9c\xfe\x57\x12\xd5\x87\x96\x4b\x22\x62\xe6\x18\xe2\xef\xdf" "\x8e\x88\xa7\xfb\xc5\x4f\xb2\xb4\x62\xa9\xcc\xe2\x70\xfc\x4a\x44\xcc\xe7" "\x59\x8c\x3c\xfe\x33\x69\x9a\xf6\x8d\x7f\xe6\x53\x47\x87\x93\xed\x4e\xd6" "\xff\x5c\xe9\xf7\xf7\x57\x89\xb3\xf9\xb0\xff\xdf\x7f\xb5\x28\x97\x3f\x6d" "\xfc\xc1\xfd\x5f\xe5\x7e\xff\x37\x73\x38\x7e\xb5\xe8\xff\x3e\x33\x64\x8c" "\x2f\xbd\xfb\xbb\xc6\x43\x4f\x7f\xf0\x60\xf4\x54\x51\x5f\xed\xdf\xff\xf4" "\xe2\x27\x03\xfa\xdf\xe7\xfa\x05\xab\x7e\x7c\xd2\x0f\xbf\xbf\xb7\x37\x28" "\xb7\xf4\xd7\x11\xe7\xfa\x6e\x7f\x92\x03\xb1\x1a\xdd\xcd\x9b\x8d\xce\xee" "\xde\x85\x8d\xcd\xd5\xf5\xe6\x7a\x73\xeb\xd2\xa5\xe5\x97\x57\x5e\x59\x79" "\x69\xe5\x62\xe3\xfa\x46\xab\x59\x3e\xf6\x8d\xf1\xd3\x67\x7e\xff\xd1\xa0" "\xf8\x77\xcf\x46\x9c\x2e\xe3\xcf\xf6\x72\x2a\x37\x2c\x4b\xc5\xe0\x9b\x49" "\x9f\x6e\x3e\x9b\xf4\x7c\x36\x52\x1b\xb4\xe6\x07\xfe\xf7\xee\xad\x7b\x5f" "\x28\x46\x6b\x87\x56\x11\x77\x6f\x47\x9c\x7f\xae\xff\xfb\xff\x74\x3e\xec" "\xfb\xfa\xff\xea\x3f\x69\x2e\xdf\x0e\x64\xf5\xe7\xca\x6d\x42\xb2\x5f\x8c" "\x47\x94\x1f\xdf\x88\x78\xf6\xb7\x7f\x7c\x76\x60\xfb\x6f\xcf\x95\x63\x8f" "\xfe\xfe\x9f\x3f\xba\xe9\xb9\x17\xbe\xf7\xe3\xbf\x0c\x39\x2b\x00\x30\x06" "\x9d\xdd\xbd\x1b\xab\xad\x56\x73\x7b\xe4\x23\x6f\xa7\x69\x3a\xdc\xcc\xd9" "\x5e\xe9\xf0\x6b\x4e\x22\xf6\x0f\x57\x65\x3b\x70\xc7\xdc\x8a\xf9\x88\x18" "\x50\x75\x30\xd6\x7c\xf9\xaa\xc6\xb0\x6b\x7e\x6a\x60\xaa\xef\xcf\x47\x8c" "\xe9\xdd\x79\xd4\x91\xcb\x8f\x32\x73\x7a\xea\x91\x3e\x6c\xc9\xfe\x13\xd0" "\xc0\x13\x3c\x32\x9b\x7f\x20\x27\xdd\x33\x01\x00\x00\xc7\xed\xc1\xde\xff" "\xa4\x33\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80" "\x93\x6b\x1c\xff\x57\xec\x70\xcc\xfd\xc9\x34\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\xe0\x13" "\xfd\x3f\x00\x00\xff\xff\xbf\x68\xd2\x77", 1378)); NONFAILING(syz_mount_image( /*fs=*/0x20000040, /*dir=*/0x20000140, /*flags=MS_RDONLY|MS_NOSUID*/ 3, /*opts=*/0x20000000, /*chdir=*/0xfc, /*size=*/0x562, /*img=*/0x20000780)); // quotactl$Q_QUOTAON arguments: [ // cmd: quota_cmd_quota_on = 0xffffffff80000201 (8 bytes) // special: ptr[in, blockdev_filename] { // union blockdev_filename { // loop: loop_filename { // prefix: buffer: {2f 64 65 76 2f 6c 6f 6f 70} (length 0x9) // id: proc = 0x0 (1 bytes) // z: const = 0x0 (1 bytes) // } // } // } // id: uid (resource) // addr: nil // ] NONFAILING(memcpy((void*)0x20000180, "/dev/loop", 9)); NONFAILING(*(uint8_t*)0x20000189 = 0x30); NONFAILING(*(uint8_t*)0x2000018a = 0); syscall(__NR_quotactl, /*cmd=Q_QUOTAON_GRP*/ 0xffffffff80000201ul, /*special=*/0x20000180ul, /*id=*/(intptr_t)-1, /*addr=*/0ul); // mprotect arguments: [ // addr: VMA[0x3000] // len: len = 0x3000 (8 bytes) // prot: mmap_prot = 0x9 (8 bytes) // ] syscall(__NR_mprotect, /*addr=*/0x20000000ul, /*len=*/0x3000ul, /*prot=PROT_SEM|PROT_READ*/ 9ul); // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {68 75 67 65 74 6c 62 2e 31 47 42 2e 75 73 61 67 65 5f 69 6e // 5f 62 79 74 65 73 00} (length 0x1b) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd NONFAILING(memcpy((void*)0x20000180, "hugetlb.1GB.usage_in_bytes\000", 27)); res = syscall(__NR_openat, /*fd=*/(intptr_t)-1, /*file=*/0x20000180ul, /*flags=*/0x275a, /*mode=*/0); if (res != -1) r[0] = res; // mmap arguments: [ // addr: VMA[0xb36000] // len: len = 0xb36000 (8 bytes) // prot: mmap_prot = 0xa (8 bytes) // flags: mmap_flags = 0x28011 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0xb36000ul, /*prot=PROT_SEM|PROT_WRITE*/ 0xaul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[0], /*offset=*/0ul); // 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 31 00} (length 0x8) // } // flags: mount_flags = 0x2000050 (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 { // errors_remount: buffer: {65 72 72 6f 72 73 3d 72 65 6d 6f 75 // 6e 74 2d 72 6f} (length 0x11) // } // comma: const = 0x2c (1 bytes) // } // 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 { // noquota: buffer: {6e 6f 71 75 6f 74 61} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // init_itable: buffer: {69 6e 69 74 5f 69 74 61 62 6c 65} // (length 0xb) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // jqfmt_vfsv0: buffer: {6a 71 66 6d 74 3d 76 66 73 76 30} // (length 0xb) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // resgid: fs_opt["resgid", fmt[hex, gid]] { // name: buffer: {72 65 73 67 69 64} (length 0x6) // eq: const = 0x3d (1 bytes) // val: gid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // sysvgroups: buffer: {73 79 73 76 67 72 6f 75 70 73} (length // 0xa) // } // 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 { // quota: buffer: {71 75 6f 74 61} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x10 (1 bytes) // size: len = 0x4e0 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x4e0) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x20000000, "ext4\000", 5)); NONFAILING(memcpy((void*)0x20000140, "./file1\000", 8)); NONFAILING(memcpy((void*)0x20000340, "errors=remount-ro", 17)); NONFAILING(*(uint8_t*)0x20000351 = 0x2c); NONFAILING(memcpy((void*)0x20000352, "nodiscard", 9)); NONFAILING(*(uint8_t*)0x2000035b = 0x2c); NONFAILING(memcpy((void*)0x2000035c, "noquota", 7)); NONFAILING(*(uint8_t*)0x20000363 = 0x2c); NONFAILING(memcpy((void*)0x20000364, "init_itable", 11)); NONFAILING(*(uint8_t*)0x2000036f = 0x2c); NONFAILING(memcpy((void*)0x20000370, "jqfmt=vfsv0", 11)); NONFAILING(*(uint8_t*)0x2000037b = 0x2c); NONFAILING(memcpy((void*)0x2000037c, "resgid", 6)); NONFAILING(*(uint8_t*)0x20000382 = 0x3d); NONFAILING(sprintf((char*)0x20000383, "0x%016llx", (long long)0)); NONFAILING(*(uint8_t*)0x20000395 = 0x2c); NONFAILING(memcpy((void*)0x20000396, "sysvgroups", 10)); NONFAILING(*(uint8_t*)0x200003a0 = 0x2c); NONFAILING(memcpy((void*)0x200003a1, "delalloc", 8)); NONFAILING(*(uint8_t*)0x200003a9 = 0x2c); NONFAILING(memcpy((void*)0x200003aa, "quota", 5)); NONFAILING(*(uint8_t*)0x200003af = 0x2c); NONFAILING(*(uint8_t*)0x200003b0 = 0); NONFAILING(memcpy( (void*)0x20000400, "\x78\x9c\xec\xdd\xdf\x6b\x1c\x5b\x1d\x00\xf0\xef\x4c\xb2\xb7\xbf\x72\x4d" "\xae\xfa\x70\xbd\xe0\xbd\x17\x6f\x25\x2d\xda\xdd\xa4\xb1\x6d\xf0\xa1\x56" "\x10\xfb\x54\xb0\xd6\xf7\x1a\x93\x4d\x08\xd9\x64\x43\x76\xd3\x36\xa1\x48" "\x8a\xef\x0a\x22\x2a\xf8\xe4\x93\x2f\x82\x7f\x80\x20\xfd\x13\x44\x28\xe8" "\xbb\x54\x51\x44\x5b\x7d\xf0\x41\x5d\xd9\xd9\xd9\xda\xc6\xdd\x6c\x4a\xb7" "\x3b\x25\xf9\x7c\x60\x3a\x67\xe6\x6c\xe6\xfb\x3d\x0d\x39\x33\x67\xe6\xb0" "\x13\xc0\xb1\xf5\x61\x44\x5c\x8b\x88\xb1\x88\x38\x1f\x11\x93\xf9\xfe\x34" "\x5f\xae\xb7\xeb\x6f\x76\x3e\xf7\xf4\xc9\xfd\xc5\xf6\x92\x44\xab\x75\xeb" "\xaf\x49\x24\xf9\xbe\xee\xb1\x92\x7c\x7d\x26\x22\xf6\x22\xe2\x64\x44\x7c" "\xfd\x7a\xc4\xb7\x92\xff\x8f\xdb\xd8\xd9\x5d\x5b\xa8\xd5\xaa\x5b\xf9\x76" "\xa5\xb9\xbe\x59\x69\xec\xec\x5e\x58\x5d\x5f\x58\xa9\xae\x54\x37\xe6\xe6" "\x66\x2f\xcf\x5f\x99\xbf\x34\x3f\x33\x94\x76\x4e\x45\xc4\xd5\xaf\xfc\xf1" "\x87\xdf\xfb\xd9\x57\xaf\xfe\xea\xf3\x77\x7f\x7f\xfb\xcf\xe7\xbe\xdd\x4e" "\x6b\x22\xaf\x7f\xbe\x1d\x03\xf5\x68\xcf\xc1\x1f\x2d\x65\xff\x17\x5d\xe3" "\x11\xb1\x75\xf8\x43\xbc\xd1\xc6\xf2\x75\xa9\x4f\xfd\x77\xc7\x46\x98\x0c" "\x00\x00\x03\xb5\xaf\xf1\x3f\x1e\x11\x9f\xc9\xae\xff\x27\x63\x2c\xbb\x3a" "\x05\x00\x00\x00\x8e\x92\xd6\x97\x26\xe2\x5f\x49\x44\x0b\x00\x00\x00\x38" "\xb2\xd2\x6c\x0e\x6c\x92\x96\xf3\xb9\x00\x13\x91\xa6\xe5\x72\x67\x0e\xef" "\x27\xe3\x74\x5a\xab\x37\x9a\x9f\x5b\xae\x6f\x6f\x2c\x75\xe6\xca\x4e\x45" "\x29\x5d\x5e\xad\x55\x67\xf2\xb9\xc2\x53\x51\x4a\xda\xdb\xb3\xf9\x1c\xdb" "\xee\xf6\xc5\x7d\xdb\x73\x11\xf1\x4e\x44\xfc\x60\xf2\x54\xb6\x5d\x5e\xac" "\xd7\x96\x8a\xbe\xf9\x01\x00\x00\x00\xc7\xc4\x99\x7d\xe3\xff\x7f\x4c\x66" "\xe3\xff\x13\x45\xe7\x05\x00\x00\x00\x0c\xd9\x54\xd1\x09\x00\x00\x00\x00" "\xaf\x9d\xf1\x3f\x00\x00\x00\x1c\x7d\xc6\xff\x00\x00\x00\x70\xa4\x7d\xed" "\xc6\x8d\xf6\xd2\xea\xbe\xff\x7a\xe9\xce\xce\xf6\x5a\xfd\xce\x85\xa5\x6a" "\x63\xad\xbc\xbe\xbd\x58\x5e\xac\x6f\x6d\x96\x57\xea\xf5\x95\xec\x3b\xfb" "\xd6\x07\x1d\xaf\x56\xaf\x6f\x7e\x21\x36\xb6\xef\x55\x9a\xd5\x46\xb3\xd2" "\xd8\xd9\xbd\xbd\x5e\xdf\xde\x68\xde\x5e\x7d\xe1\x15\xd8\x00\x00\x00\xc0" "\x08\xbd\xf3\xc1\xc3\xdf\x25\x11\xb1\xf7\xc5\x53\xd9\xd2\xf6\x56\xd1\x49" "\x01\x23\x91\x0c\xa8\xcf\x5e\x12\xf2\x38\xdf\xf8\xc3\x08\x12\x02\x46\x66" "\xac\xe8\x04\x80\xc2\x8c\x17\x9d\x00\x50\x98\x52\xd1\x09\x00\x85\x1b\x74" "\x1f\xa0\xef\xe4\x9d\x5f\x0f\x3f\x17\x00\x00\xe0\xf5\x98\xfe\x54\xff\xe7" "\xff\xee\x0d\xc0\xd1\x96\x16\x9d\x00\x00\x30\x72\x9e\xff\xc3\xf1\x55\x7a" "\x71\x06\xe0\xa5\xe2\x32\x01\x8a\xf2\xb1\x01\xf5\xaf\xfe\xfc\xbf\xd5\x7a" "\xa9\x84\x00\x00\x80\xa1\x9b\xc8\x96\x24\x2d\xe7\xcf\x02\x27\x22\x4d\xcb" "\xe5\x88\xb7\xb3\xd7\x02\x94\x92\xe5\xd5\x5a\x75\x26\x1f\x1f\xfc\x76\xb2" "\x74\xa2\xbd\x3d\x9b\xfd\x64\x32\x70\xce\x30\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\xd1\x6a\x25\xd1\x02" "\x00\x00\x00\x8e\xb4\x88\xf4\x4f\x49\xf6\x6d\xfe\x11\xd3\x93\x67\x27\xf6" "\xdf\x1f\x78\x2b\xf9\xe7\x64\xb6\x8e\x88\xbb\x3f\xb9\xf5\xa3\x7b\x0b\xcd" "\xe6\xd6\x6c\x7b\xff\xdf\x9e\xed\x6f\xfe\x38\xdf\x7f\xb1\x88\x3b\x18\x00" "\x00\x00\xc0\x7e\xdd\x71\x7a\x77\x1c\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\xc3\xf4\xf4\xc9\xfd\xc5\xee" "\x32\xca\xb8\x7f\xf9\x72\x44\x4c\xf5\x8c\xff\xc1\xc9\x6c\x75\x32\x4a\x11" "\x71\xfa\xef\x49\x8c\x3f\xf7\x73\x49\x44\x8c\x0d\x21\xfe\xde\x83\x88\x78" "\xb7\x57\xfc\xa4\x9d\x56\x4c\x45\x27\x8b\x5e\xf1\x4f\x15\x18\x3f\x8d\x88" "\x33\x43\x88\x0f\xc7\xd9\xc3\x76\xff\x73\xad\xd7\xdf\x5f\x1a\x1f\x66\xeb" "\xde\x7f\x7f\xe3\xf9\xf2\xaa\xfa\xf7\x7f\x69\x74\xfb\xbf\xb1\x3e\xfd\xcf" "\xdb\x87\x8c\xf1\xde\xa3\x5f\x54\xfa\xc6\x7f\x10\xf1\xde\x78\xef\xfe\xa7" "\x1b\x3f\xe9\x13\xff\xa3\x43\xc6\xff\xe6\x37\x76\x77\xfb\xd5\xb5\x7e\x1a" "\x31\xdd\xf3\xfc\x93\xbc\x10\xab\xd2\x5c\xdf\xac\x34\x76\x76\x2f\xac\xae" "\x2f\xac\x54\x57\xaa\x1b\x73\x73\xb3\x97\xe7\xaf\xcc\x5f\x9a\x9f\xa9\x2c" "\xaf\xd6\xaa\xf9\xbf\x3d\x63\x7c\xff\xd3\xbf\xfc\xcf\x41\xed\x3f\xdd\x27" "\xfe\xd4\x80\xf6\x9f\x3d\x64\xfb\xff\xfd\xe8\xde\x93\x4f\x74\x8a\xa5\x5e" "\xf1\xcf\x7d\xd4\xfb\xfc\xfb\x6e\x9f\xf8\x69\x7e\xee\xfb\x6c\x5e\x6e\xd7" "\x4f\x77\xcb\x7b\x9d\xf2\xf3\xde\xff\xf9\x6f\xde\x3f\xa8\xfd\x4b\x7d\xda" "\xff\xec\xf7\xdf\xe3\x44\xdb\x8e\x79\xee\x90\xed\x3f\x7f\xf3\x3b\x8f\x0f" "\xf9\x51\x00\x60\x04\x1a\x3b\xbb\x6b\x0b\xb5\x5a\x75\xeb\x95\x0a\xc3\x3a" "\xce\x4b\x16\xd2\x28\x20\xa8\xc2\x6b\x2a\x9c\x78\x33\xd2\x50\xe8\x14\x0e" "\xea\x35\x92\xd1\x75\x50\x00\x00\xc0\xd0\xfc\xef\xa2\xbf\xe8\x4c\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xf8\x1a\xc5\xd7" "\x89\xed\x8f\xb9\x57\x4c\x53\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" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xf4\xdf\x00\x00\x00" "\xff\xff\xed\x4f\xd8\xa5", 1248)); NONFAILING(syz_mount_image( /*fs=*/0x20000000, /*dir=*/0x20000140, /*flags=MS_LAZYTIME|MS_SYNCHRONOUS|MS_MANDLOCK*/ 0x2000050, /*opts=*/0x20000340, /*chdir=*/0x10, /*size=*/0x4e0, /*img=*/0x20000400)); // syz_mount_image$vfat arguments: [ // fs: ptr[in, buffer] { // buffer: {76 66 61 74 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 00} (length 0xfd) // } // flags: mount_flags = 0x200010 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {64 65 62 75 67 2c 75 74 66 38 3d 31 2c 75 74 66 // 38 3d 30 2c 75 74 66 38 3d 31 2c 73 68 6f 72 74 6e 61 6d 65 3d 77 // 69 6e 39 35 2c 63 68 65 63 6b 3d 73 74 72 69 63 74 2c 73 68 6f 72 // 74 6e 61 6d 65 3d 77 69 6e 6e 74 2c 73 68 6f 72 74 6e 61 6d 65 3d // 6c 6f 77 65 72 2c 00 2b c0 8d 8c ca 74 e8 ec af b4 84 37 09 4f e1 // a4 a2 38 3b d9 d8 5b ff 65 1d 11 01 fd 72 2e 01 b9 b5 d2 2f 08 b5 // fc 0a c7 cb f3 3f b5 53 a9 0a e4 d0 1d 71 dd ee b0 89 f5 17 ae aa // a2 71 89 92 87 d5 b8 94 9b 22 b2 3c 28 07 b7 d8 17 14 b8 9e 96 82 // f6 c3 fa a6 10 77 33 a7 7a 4c f9 85 56 0e d6 4e c2 4e 25 5d ee 36 // 54 aa 2b a5 5b e4 bf 3a e2 57 ad ba 34 be d8 e3 2e 41 22 bb 46 aa // 57 a7 5d ab 02 88 09 8e 42 f8 86 f0 9b df 63 53 7d b2 8a 45 4b 02 // a4 20 4a 7e 7d ac 3c 30 a6 d4 b5 c8 14 91 6b 02} (length 0xfc) // } // union ANYUNION { // ANYRES8: ANYRES8 (resource) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0x27c (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x27c) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x20000040, "vfat\000", 5)); NONFAILING( memcpy((void*)0x20000080, "./" "file1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 253)); NONFAILING(memcpy( (void*)0x200004c0, "\x64\x65\x62\x75\x67\x2c\x75\x74\x66\x38\x3d\x31\x2c\x75\x74\x66\x38\x3d" "\x30\x2c\x75\x74\x66\x38\x3d\x31\x2c\x73\x68\x6f\x72\x74\x6e\x61\x6d\x65" "\x3d\x77\x69\x6e\x39\x35\x2c\x63\x68\x65\x63\x6b\x3d\x73\x74\x72\x69\x63" "\x74\x2c\x73\x68\x6f\x72\x74\x6e\x61\x6d\x65\x3d\x77\x69\x6e\x6e\x74\x2c" "\x73\x68\x6f\x72\x74\x6e\x61\x6d\x65\x3d\x6c\x6f\x77\x65\x72\x2c\x00\x2b" "\xc0\x8d\x8c\xca\x74\xe8\xec\xaf\xb4\x84\x37\x09\x4f\xe1\xa4\xa2\x38\x3b" "\xd9\xd8\x5b\xff\x65\x1d\x11\x01\xfd\x72\x2e\x01\xb9\xb5\xd2\x2f\x08\xb5" "\xfc\x0a\xc7\xcb\xf3\x3f\xb5\x53\xa9\x0a\xe4\xd0\x1d\x71\xdd\xee\xb0\x89" "\xf5\x17\xae\xaa\xa2\x71\x89\x92\x87\xd5\xb8\x94\x9b\x22\xb2\x3c\x28\x07" "\xb7\xd8\x17\x14\xb8\x9e\x96\x82\xf6\xc3\xfa\xa6\x10\x77\x33\xa7\x7a\x4c" "\xf9\x85\x56\x0e\xd6\x4e\xc2\x4e\x25\x5d\xee\x36\x54\xaa\x2b\xa5\x5b\xe4" "\xbf\x3a\xe2\x57\xad\xba\x34\xbe\xd8\xe3\x2e\x41\x22\xbb\x46\xaa\x57\xa7" "\x5d\xab\x02\x88\x09\x8e\x42\xf8\x86\xf0\x9b\xdf\x63\x53\x7d\xb2\x8a\x45" "\x4b\x02\xa4\x20\x4a\x7e\x7d\xac\x3c\x30\xa6\xd4\xb5\xc8\x14\x91\x6b" "\x02", 252)); NONFAILING(*(uint8_t*)0x200005bc = 0); NONFAILING(sprintf((char*)0x200005bd, "0x%016llx", (long long)-1)); NONFAILING(memcpy( (void*)0x20000600, "\x78\x9c\xec\xda\xcf\x6b\x23\x65\x18\x07\xf0\x67\xba\xab\x4d\x76\xe9\xa6" "\xe2\x2f\x76\x41\x7c\xd1\x83\x7a\x19\xb6\x3d\x7b\xd8\x45\x2a\x88\x05\x45" "\xad\xb0\x0a\xb2\xb3\x36\x75\x63\xc7\xa4\x74\x42\x21\x22\xb6\x27\xbd\xfa" "\x27\x78\x16\x8f\xde\x04\xd9\xa3\x97\x5e\xfc\x0b\x3c\x78\xdb\x4b\x8f\x7b" "\x10\x23\xd3\xa4\x35\x5b\x8a\xd6\x45\xd3\x52\x3e\x9f\x43\xf2\x30\x33\xdf" "\x99\x77\xde\x49\x5e\x9e\x40\x2e\xbc\xfa\xcd\x67\xeb\x6b\x55\xbe\x56\xf4" "\x63\x26\xcb\x62\xe6\x46\xec\xc4\x83\x2c\xe6\x63\x26\x0e\xec\xc4\x2b\x2f" "\xdd\xfa\xf9\xb9\x77\x6f\x7d\xf0\xe6\xcd\xe5\xe5\xc6\x78\xeb\x62\x4a\xe9" "\xca\xf3\x3f\x7d\xf8\xc5\xf7\x2f\xdc\xeb\x5f\x7e\xff\x87\x2b\x3f\xce\xc6" "\xee\xfc\x47\xf7\xf7\x16\x7f\xdb\x7d\x66\xf7\xea\xfd\x3f\xde\xbb\xdb\xa9" "\x52\xa7\x4a\xdd\x5e\xbf\x3e\x57\xaf\xd7\x2f\xee\x94\xed\xb4\xda\xa9\xd6" "\xf3\x94\xde\x2e\xdb\x45\xd5\x4e\x9d\x6e\xd5\xde\xec\xa7\x22\xdd\x39\xd8" "\xbf\x56\xf6\x36\x36\x06\xa9\xe8\xae\xce\x5d\xda\xd8\x6c\x57\x55\x2a\xba" "\x83\xb4\xde\x1e\xa4\x7e\x2f\xf5\x37\x07\xa9\xf8\xa4\xe8\x74\x53\x9e\xe7" "\x69\xee\x52\xb0\xef\xee\xa3\xc5\x56\xbe\x7b\x30\x1c\xc6\xde\xf0\xb1\xdb" "\x31\x1c\x0e\x9b\xdf\xc6\xe5\x7b\x31\xf7\x6b\xb4\x22\x7b\x22\x65\x4f\xde" "\xc8\x9e\xbe\x9d\x3d\xbb\x93\x5d\xdd\x1b\x0e\x5b\x47\xa3\xcd\xff\x60\xd4" "\x9c\xba\x47\x7e\xfe\x9c\x0b\xe3\x45\x7d\xe9\x9d\x94\x1a\x11\xe5\xd7\x5b" "\x2b\x5b\x2b\xa3\xf7\x7a\x6f\x23\x6e\xae\x45\x27\xca\x68\xc7\xf5\x68\xc6" "\xef\x51\x7f\x4c\xc6\x46\xf5\xeb\x6f\x2c\x2f\x5d\x4f\xfb\xe6\xe3\xab\x72" "\x7b\x9c\xdf\xde\x5a\xb9\x10\x11\xb3\xf5\x49\x46\xf9\x85\x68\xc5\xfc\xf1" "\xf9\x85\x51\x3e\x1d\xe4\xeb\x54\xfd\x5a\xaf\xee\x87\xd7\x5f\x8c\x56\x3c" "\x75\x7c\x7e\xf1\x48\x7e\x74\xfd\x46\xbc\xfc\xe2\x44\x3e\x8f\x56\xfc\xf2" "\x71\xf4\xa2\x8c\xd5\xa8\xb3\xb1\x3d\x9e\x82\xa5\x2f\x17\x52\x7a\xed\xad" "\xe5\x23\xf9\x6b\xfb\xc7\x01\x00\x9c\x37\x79\x3a\x54\xf7\x6f\x75\xd3\x36" "\xd1\xbf\x45\xe4\xf9\x43\xfb\x27\xfa\xa3\x51\x7e\xa2\x3f\x6c\x4d\xf4\x87" "\x8f\x1f\xd3\x1f\x1e\xe9\xaf\x2e\xc6\xb5\x8b\xa7\x7b\xef\x44\x54\x83\xcf" "\xd7\x8b\xb2\x6c\x6f\xd6\x3f\xf0\xf6\x8b\xc3\x2d\x27\x28\x66\xc7\x67\xf9" "\x77\xa9\x33\x5e\x34\x27\xa7\xe5\x6f\x8b\x88\x6c\x72\x2e\xff\xbf\x81\xcd" "\x3c\xf4\xcc\xa6\x3c\x2d\x17\x4f\x38\x1b\x53\x2f\x9a\x67\x73\x60\xd9\xf9" "\xf8\x3a\x44\x7c\x3a\xcd\x85\x88\x53\xf1\xd7\x43\xff\xc7\x43\x1b\x53\x19" "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x32\x8d\xbf\x13\x9e\xf6\x3d" "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\xdb\x9f\x01\x00\x00" "\xff\xff\x87\x21\xb4\x77", 636)); NONFAILING(syz_mount_image(/*fs=*/0x20000040, /*dir=*/0x20000080, /*flags=MS_SYNCHRONOUS|MS_RELATIME*/ 0x200010, /*opts=*/0x200004c0, /*chdir=*/1, /*size=*/0x27c, /*img=*/0x20000600)); // open_by_handle_at arguments: [ // mountdirfd: fd (resource) // handle: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {20 00 00 00 02 00 00 00} (length 0x8) // } // } // } // flags: open_flags = 0x40000 (8 bytes) // ] NONFAILING(memcpy((void*)0x200000c0, "\x20\x00\x00\x00\x02\x00\x00\x00", 8)); syscall(__NR_open_by_handle_at, /*mountdirfd=*/0xffffff9c, /*handle=*/0x200000c0ul, /*flags=O_NOATIME*/ 0x40000ul); return 0; }