// https://syzkaller.appspot.com/bug?id=5219fcf1cb8149d1e0f4750983aff4c2df3fde7a // 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 #include #include #include #include #include #include #include #ifndef __NR_memfd_create #define __NR_memfd_create 319 #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; \ }) static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; for (;;) { uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts); if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) return 1; now = current_time_ms(); if (now - start > timeout) return 0; } } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } //% 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; } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void reset_loop() { char buf[64]; snprintf(buf, sizeof(buf), "/dev/loop%llu", procid); int loopfd = open(buf, O_RDWR); if (loopfd != -1) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 4; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50 + (call == 0 ? 4000 : 0) + (call == 1 ? 4000 : 0)); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } } } void execute_call(int call) { switch (call) { case 0: // syz_mount_image$nilfs2 arguments: [ // fs: ptr[in, buffer] { // buffer: {6e 69 6c 66 73 32 00} (length 0x7) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 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 61 61 61 61 00} (length 0x101) // } // flags: mount_flags = 0x0 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // } // } // chdir: int8 = 0x41 (1 bytes) // size: len = 0xaf6 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xaf6) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x2000000000c0, "nilfs2\000", 7)); NONFAILING(memcpy( (void*)0x200000002a40, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 257)); NONFAILING(memcpy( (void*)0x200000002b80, "\x78\x9c\xec\xdd\x5d\x88\x5c\x57\x1d\x00\xf0\x73\x77\x77\x36\xbb\x69" "\x6b\x36\x35\xd1\x35\x8d\x6d\x62\xb5\xad\xda\x6e\x9a\xcd\x1a\xab\x41" "\x93\x92\x20\x18\x9a\x20\xbe\x14\x8a\x2f\x21\xdd\xd6\x60\x8c\xd0\x0a" "\x6a\x29\x98\xe4\xc9\x37\x5b\x4a\x0a\x3e\xf9\x81\x4f\x7d\x29\x55\x04" "\x0b\x22\xa1\x4f\xbe\x14\x6c\xa0\x08\x79\xaa\x82\x3e\x34\x44\x2c\xf8" "\x50\xa3\xc9\xc8\xce\xdc\x33\x73\xef\xc9\x4c\xee\xce\x66\x77\x66\x67" "\xe7\xf7\x83\xbb\x67\xee\x3d\xe7\xce\xff\xdc\xd9\x3b\x77\xee\xd7\xb9" "\x27\x00\x23\x6b\xac\xf1\x77\x61\x61\x36\x0b\xe1\xc2\x9b\xaf\x1c\x79" "\xff\x81\x7f\x4c\x2f\x4d\x39\xd8\x2a\x31\xd3\xf8\x3b\x51\x18\xab\x85" "\x10\xb2\x7c\x7c\x22\x79\xbf\xf7\xc6\x9b\xe9\xf5\x0f\x5e\x3c\xd9\x29" "\xcd\xc2\x7c\xe3\x6f\x1c\x0f\xc7\xaf\xb6\xe6\xbd\x23\x84\x70\x36\xec" "\x0a\x17\xc3\x4c\xd8\x71\xe1\xd2\xcb\x6f\xcf\x3f\x71\xec\xdc\xd1\xf3" "\xbb\xdf\x79\xed\xc0\x95\xb5\x59\x7a\x00\x00\x18\x2d\xdf\xb8\x78\x60" "\x61\xfb\x5f\xff\x7c\xcf\xd6\x6b\xaf\xdf\x7b\x28\x6c\x6a\x4d\x8f\xfb" "\xe7\x33\x71\xc2\x54\x73\xbf\xff\x50\xbe\xe3\x1f\xf7\xff\xc7\x42\x79" "\x7c\x29\xdd\x7a\x39\x09\xd2\x7e\xdb\xd2\x71\xc3\xd2\x30\x36\x5d\x2e" "\x3a\xde\xa1\x5c\x31\x4e\x2d\x29\x37\xd1\x21\xfe\xd2\x30\x99\x54\xa1" "\xd6\xa5\xdc\xa6\x70\xeb\xf8\xe3\x85\x69\x9d\x96\x1b\x86\x59\x5c\x8f" "\x67\x42\x36\x36\x17\x42\xd8\xdc\x1a\x1f\x1b\x9b\x9b\x6b\x1e\x93\x87" "\xc6\x71\xfd\x64\x36\x77\xe6\xd4\xe9\x67\x9e\x1f\x50\x45\x81\x55\xf7" "\xef\xfb\x42\x08\xbb\x0a\xc3\xe1\xf3\xe5\xf1\xf5\x36\x1c\x5c\x07\x75" "\x58\xe1\x50\x5f\x07\x75\x18\xca\xe1\x50\xff\x62\x5d\xab\x37\x0d\x7c" "\x99\xfb\x34\xd4\xb7\x0c\x7a\x0b\x04\xd0\x94\x5e\x2f\xbc\xc9\xd9\x6c" "\x55\xe3\xb5\xde\x6d\x62\x79\xf1\xaf\x3e\x3e\xd6\x79\x7e\x58\x05\xfd" "\x5e\xff\x7b\x8a\x3f\x79\x53\xfc\xe9\xbe\xc6\x0f\x03\x5e\xfe\x75\x10" "\xff\xd7\xe7\x6c\x71\x58\x3d\x1b\x75\x6d\x8a\xcb\x15\xbf\x47\x77\xe6" "\xe3\xe9\x75\x84\xf4\xfe\xa5\x57\xff\x50\x9e\xaf\x2d\xbd\xd2\x51\x9e" "\x9a\x5e\x8f\xa8\x2d\xb3\x9e\xdd\xae\x23\x0c\xcb\xf5\x85\x6e\xf5\x1c" "\xef\x73\x3d\x56\xaa\x5b\xfd\xd3\xf5\x62\xa3\xfa\x4a\x9e\xc6\xcf\xe1" "\xab\xa5\xdc\xfb\x4a\xdf\x9f\xf4\x7f\x3a\x2c\xff\x63\xa0\xb3\x0f\xd3" "\xf3\xff\x06\xc3\x1a\x0e\x8f\xbd\x3f\xf8\x3a\x0c\xfd\x10\x4a\xe3\xb5" "\xdb\x79\xaf\xfa\x80\xb7\x3f\xc0\xfa\x95\xde\x37\x57\x8f\xd7\x47\x73" "\x93\x15\xf9\x9b\x2a\xf2\xa7\x2a\xf2\xa7\x2b\xf2\x37\x57\xe4\xdf\x51" "\x91\x0f\xa3\xec\xb7\xdf\xff\x69\x78\x29\x6b\x9f\xef\x4a\x8f\xe9\x7b" "\x3d\x1f\x1e\xcf\xb3\xdd\x95\xa7\x1f\xe9\xb1\x3e\xe9\xf9\xc8\x5e\xe3" "\xa7\xf7\xfd\xf6\xea\x76\xe3\xa7\xf7\x13\xc3\x7a\xf6\xfb\x13\x4f\x2e" "\x3e\xf6\xf4\x53\x97\x9a\xf7\xff\x67\xad\xf5\xff\x46\xbe\xbe\xc7\xc3" "\x8d\x99\xfc\xbb\x75\x31\x2f\x10\xcf\x17\xa6\xe7\xd5\xe3\x7d\xf5\xed" "\x86\x03\xe5\xfc\xb4\xdc\xdd\x49\x7d\xee\xea\x50\xbe\xf1\x7a\x5b\xb9" "\x5c\xb6\xad\xfd\x3e\xa1\xb0\x9d\xb9\xa9\x1e\xb3\xe5\xf9\xb6\x74\x2b" "\xb7\xb3\x5c\x6e\x26\x29\x37\x9d\x0f\x53\x49\x7d\xd3\xfd\x93\xcd\xc9" "\x7c\x71\xff\x23\x6e\x57\xe3\xe7\x35\x91\x2c\x6f\x2d\x59\x8e\xc9\xa4" "\x1e\x71\xbb\xb2\x35\x4f\xd3\x7a\xc0\x4a\xc4\xf5\xb1\x71\xff\x7f\xe1" "\xa2\x55\xbc\xff\x3f\xae\x9f\xb3\xa1\x96\x3d\x73\xea\xf4\xe2\xa3\xf9" "\x78\x5c\x4f\xff\x34\x5e\xdb\xb4\x34\x7d\x6f\x3f\x2b\x0d\xac\x8a\xb4" "\xfd\x4f\x7b\xbc\xdc\xfe\x67\x36\x94\xdb\xff\xdc\xd9\x9a\x5e\x1b\x2b" "\x6e\x17\xb6\xb4\xa7\x67\xcd\xed\xc2\x1b\xf9\xfb\x95\xa7\xcf\xb7\xe2" "\x14\xa6\x17\x7e\xd4\xe2\xef\xdc\xb7\xc7\xa7\x1b\xe5\xe7\x4e\x7e\xef" "\xf4\xd3\xab\xbc\xec\x30\xea\x9e\xff\xd1\x0b\xdf\x39\x71\xfa\xf4\xe2" "\x73\x5e\xac\xf8\xc5\xd7\xd6\x47\x35\x7a\x79\x11\x0f\x5b\xd6\x4b\x7d" "\xbc\xe8\xf5\xc5\xae\xb5\x0e\x31\xe0\x0d\x13\xb0\xe6\xf6\xfc\xb8\xb9" "\x13\xf0\xc8\xa9\xef\x9e\x78\x76\xf1\xd9\xc5\x33\xfb\xf6\xef\xdf\x37" "\x3f\xbf\xff\x4b\xfb\x16\x42\x63\xbf\x7e\x4f\x71\xef\xbe\xe8\xec\x00" "\x6a\x0b\xac\xa6\xe6\x6f\xfd\xa6\xc5\xe7\x3c\xd7\x03\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x86\xc6\x0f\x8e\x1e\xb9\xf4\xee\x5b\x5f\xbc\xdc" "\x6c\xff\xdf\x6e\xff\x17\xdb\xff\xc7\x3b\x7f\x63\xfb\xff\x9f\x24\xed" "\xff\xd3\x76\xf2\xb1\x1d\x7c\x6c\x07\xb8\xb5\x43\x7e\xa3\x4c\xf2\x80" "\xd5\xc9\xa4\x5c\x2d\x1f\x3e\x9a\xd4\x77\x5b\x12\x67\x7b\x32\xdf\xc7" "\xf2\xb4\xd5\x8f\x5f\xde\xfe\x3f\x86\x4b\x9f\xeb\x1a\xeb\xf3\xf1\x64" "\x7a\xad\xcb\x68\xf2\x38\x81\x9b\x9e\x97\x32\x99\x3c\x83\x24\xed\x2f" "\xf0\x53\x79\x7a\x3e\x4f\x7f\x15\x60\x80\xb2\xce\x8f\xf0\x4f\xd7\xdb" "\x0e\xcf\xb7\xce\x3e\x2c\xac\xeb\xf1\xf9\x14\x85\x26\xbc\x75\xcf\x07" "\x1e\x1e\xf1\xff\xd6\x58\x1b\x0a\x8f\x34\x8a\xed\xbf\x3b\x3e\xd7\xa9" "\x43\x7b\x6d\x86\x4b\x3f\x5a\x2c\x0e\x7a\x19\x81\xce\xfe\x39\x52\xcf" "\xff\xfe\x57\x7b\xc1\x7b\x98\xef\xe1\x81\xd7\x7b\xd4\x86\x89\xfe\xc6" "\xfb\x59\xef\xeb\xc4\x46\x19\xea\x5d\xf7\xd2\x97\xdb\x83\x0d\xc0\xea" "\x18\x74\xff\x9f\x7f\x0f\xcd\xb8\xf1\xfc\xe7\x99\x3f\x7e\x7d\x6a\x69" "\x88\xc5\xae\x3e\x5e\xde\x5e\xa6\xcf\x2f\x85\x5e\xfc\xe5\xdd\xf2\xf8" "\x7a\xef\x7f\x72\xad\xe3\xa7\xfd\xf6\xf5\x3b\xfe\xa0\x97\xbf\xdf\xfd" "\x7f\xb6\xfa\xbf\xcb\xb7\x7f\x71\xbb\xd7\x7d\xfb\x97\xf4\x98\x37\xb3" "\xb2\xb8\xff\xf9\xf9\x95\xcb\x85\xb0\x61\xc7\x72\xe3\xa7\xcb\x1f\x9f" "\x03\xbd\xad\xb7\xf8\xd7\xf2\xf8\x71\x69\x1e\x0c\xcb\x8b\x5f\xff\x65" "\x12\x3f\xbd\x20\xb4\x4c\xff\x4d\xe2\x6f\x5e\x66\xfc\x9b\x96\x7f\xe7" "\xca\xe2\xff\x2f\x8f\x1f\x3f\xb6\x87\xee\x5f\x6e\xfc\x66\x8d\xb3\xb1" "\x72\x3d\xa6\x93\xe5\x88\xd7\xff\xd2\xf3\xc6\xd1\xf5\x64\xf9\xe3\xb3" "\x3d\x6f\x11\xff\x9b\x2f\x74\x5a\xfe\x15\x76\xd4\x78\x23\x8f\x0f\xa3" "\x6c\x58\xfa\x99\xed\x55\xb2\x1f\xd1\xda\x69\xaf\xea\xff\xb7\xd7\xdf" "\xff\xdb\xed\xff\xb7\x55\xd9\xac\x5c\x99\xf4\x3e\x8c\x2f\xe4\xe3\x71" "\x43\x1c\xef\x73\x48\xfb\x3b\xe9\xb5\xfe\xf1\xfe\x8a\xf8\x3b\xb0\x3d" "\x79\xff\xac\xe2\xf7\x4d\xff\xbf\xc3\xed\xcb\x79\x5a\xf5\x7d\x88\xfd" "\xff\xc6\xf5\x71\x26\xff\xc9\x2f\x8c\x37\x3e\xcb\x38\x5e\xeb\xf0\xd9" "\x6e\xd4\x6d\x0d\x0c\xab\xf7\x46\xea\xfa\x5f\xbf\x86\x2b\xcd\xc3\xa0" "\x95\xcd\x3f\x35\xf8\xfa\x1b\x7a\x18\xea\xe3\xcb\x2e\x7b\xbc\xf5\xba" "\xd5\x4f\xdc\x80\xeb\x5f\xaf\xd7\xd7\xf6\x84\x56\x85\x81\x06\x67\xe0" "\x9f\xff\xa0\x8f\x13\x06\x1d\x7f\xd0\x9f\x7f\x95\xb4\xff\xdf\x74\x1f" "\x3e\xed\xff\x37\xcd\x4f\xfb\xff\x4d\xf3\xd3\xfe\x7f\xd3\xfc\xe9\xfc" "\x3f\xd4\x2d\x3f\xed\xff\x37\xfd\x3c\xd3\xfe\x7f\xb3\xb4\xe2\xc9\xfb" "\xa6\xfd\x03\xcf\x56\xe4\x7f\xa2\x22\x7f\x47\xe7\xfc\x56\xf4\x7b\x2a" "\xe6\xdf\x59\x91\xff\xc9\x8a\xfc\xdd\xad\xfc\x83\xa5\x12\x31\xff\xde" "\x5b\xce\xdf\x2e\xd7\xed\xfd\xef\xae\xc8\xbf\xbf\x22\xff\xd3\x15\xf9" "\x9f\xa9\xc8\x7f\xa0\x22\xff\xa1\x42\x7e\xb1\x0f\xe8\x98\xff\xd9\x64" "\xfe\x2c\xc9\xdf\xe8\x62\x7b\x94\x6e\x9f\x1f\xb0\x71\xa5\xed\xf3\x7c" "\xff\x61\x74\xc4\xeb\x3f\xdd\xbe\xff\xdb\xda\xf9\x93\xc5\x22\xfd\xad" "\x25\xb0\x16\x5e\x7d\x7d\xef\xe1\xa7\x7e\xf3\xad\x99\x66\xfb\xff\xc9" "\xd6\xf9\x90\x78\x1d\xef\x50\x3e\x5e\xcb\x8f\x8d\x7e\x98\x8f\xa7\xd7" "\xbd\x43\x61\x7c\x29\xef\xad\x7c\xfc\x6f\x49\xfe\x7a\x3f\xdf\x01\xa3" "\x24\x7d\x7e\x46\xfa\xfb\xff\x60\x45\x3e\x30\xbc\xe2\x7d\x5e\xbe\xdf" "\x30\x82\xb2\xa9\xce\x93\xf3\xb4\xea\xb9\x55\xdd\xf6\xf3\x19\x2e\x9f" "\xcb\xd3\xcf\xe7\xe9\xc3\x79\xfa\x48\x9e\xce\xe5\xe9\x9e\x3c\xdd\x9b" "\xa7\xf3\x7d\xaa\x1f\x6b\xe3\xf0\x1b\xbf\x3b\xf0\x52\xd6\x3e\xde\xdf" "\x92\xe4\x2f\xf7\x7e\xf2\xb4\x3d\x50\xe9\x39\x51\x21\x84\x7d\xcb\xac" "\x4f\x7a\x7e\xa0\xd7\xfb\xd9\xd3\xe7\xf8\xf5\xea\x76\xe3\xaf\xb0\x39" "\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc0\x8c\x35\xfe\x2e\x2c\xcc\x66" "\x21\x5c\x78\xf3\x95\x23\x4f\x1e\x3b\xb5\x67\x69\xca\xc1\x56\x89\x99" "\xc6\xdf\x89\xc2\x58\xad\x35\x5f\x08\x8f\xe6\xe9\x78\x9e\xfe\x22\x7f" "\x71\xfd\x83\x17\x4f\x16\xd3\x1b\x79\x9a\x85\xf9\x90\x85\xac\x35\x3d" "\x1c\xbf\xda\x8a\x74\x47\x08\xe1\x6c\xd8\x15\x2e\x86\x99\xb0\xe3\xc2" "\xa5\x97\xdf\x9e\x7f\xe2\xd8\xb9\xa3\xe7\x77\xbf\xf3\xda\x81\x2b\x6b" "\xf7\x09\x00\x00\x00\xc0\xc6\xf7\xff\x00\x00\x00\xff\xff\x6e\x16\x09" "\x7e", 2806)); NONFAILING(syz_mount_image(/*fs=*/0x2000000000c0, /*dir=*/0x200000002a40, /*flags=*/0, /*opts=*/0x200000000000, /*chdir=*/0x41, /*size=*/0xaf6, /*img=*/0x200000002b80)); break; case 1: // 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 30 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 = 0x9f6c67 (8 bytes) // opts: nil // chdir: int8 = 0x5 (1 bytes) // size: len = 0x0 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x0) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000140, "vfat\000", 5)); NONFAILING(memcpy( (void*)0x200000000180, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 253)); NONFAILING(syz_mount_image( /*fs=*/0x200000000140, /*dir=*/0x200000000180, /*flags=MS_I_VERSION|MS_SHARED|MS_SLAVE|MS_PRIVATE|MS_UNBINDABLE|MS_POSIXACL|0x6c67*/ 0x9f6c67, /*opts=*/0, /*chdir=*/5, /*size=*/0, /*img=*/0x2000000001c0)); break; case 2: // mount arguments: [ // src: nil // dst: ptr[in, buffer] { // buffer: {2e 00} (length 0x2) // } // type: nil // flags: mount_flags = 0x2200020 (8 bytes) // data: nil // ] NONFAILING(memcpy((void*)0x200000000240, ".\000", 2)); syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x200000000240ul, /*type=*/0ul, /*flags=MS_LAZYTIME|MS_REMOUNT|MS_RELATIME*/ 0x2200020ul, /*data=*/0ul); break; case 3: // syz_mount_image$fuse arguments: [ // fs: nil // dir: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // flags: mount_flags = 0x2800002 (8 bytes) // opts: nil // chdir: int8 = 0x1 (1 bytes) // size: const = 0x0 (8 bytes) // img: nil // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000180, "./bus\000", 6)); NONFAILING( syz_mount_image(/*fs=*/0, /*dir=*/0x200000000180, /*flags=MS_LAZYTIME|MS_I_VERSION|MS_NOSUID*/ 0x2800002, /*opts=*/0, /*chdir=*/1, /*size=*/0, /*img=*/0)); break; } } 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; install_segv_handler(); for (procid = 0; procid < 4; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }