// https://syzkaller.appspot.com/bug?id=556a1a94633215aeff61a24d76668afa1669607c // 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 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 use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } 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; } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW; retry: while (umount2(dir, umount_flags) == 0) { } dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exit(1); } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); while (umount2(filename, umount_flags) == 0) { } struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EPERM) { int fd = open(filename, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exit(1); if (umount2(filename, umount_flags)) exit(1); } } closedir(dp); for (int i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EPERM) { int fd = open(dir, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, umount_flags)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } 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"); if (symlink("/dev/binderfs", "./binderfs")) { } } 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 == 3 ? 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++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; 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 00} (length 0x8) // } // flags: mount_flags = 0x0 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {00} (length 0x1) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // } // } // chdir: int8 = 0xd (1 bytes) // size: len = 0xa02 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xa02) // } // ] // returns fd_dir memcpy((void*)0x200000000380, "nilfs2\000", 7); memcpy((void*)0x200000000a40, "./file0\000", 8); memset((void*)0x200000000100, 0, 1); *(uint32_t*)0x200000000101 = -1; sprintf((char*)0x200000000105, "0x%016llx", (long long)-1); memcpy( (void*)0x200000000a80, "\x78\x9c\xec\xdd\x4f\x6c\x5c\x47\x1d\x00\xe0\x79\x6b\xaf\x1d\xd7\xa9" "\xb3\x86\x02\xa6\xa1\x89\x81\x02\xa9\xa0\x4e\xb0\xad\x2a\xb9\xa4\x31" "\x94\x6b\xa4\xde\xca\xb1\x0a\x69\x88\x70\x53\x94\x70\x69\x55\xa9\x29" "\x52\xc5\x0d\x45\xaa\x7a\xec\x81\xaa\x87\x5c\x10\x15\xe2\xd2\x03\x52" "\x44\x55\x44\x2f\x41\x94\x3b\x0a\x85\x4a\x55\x51\xa0\x15\x08\xa9\xa0" "\xd6\x28\xf6\xcc\x7a\x77\xec\xc7\xfe\xb1\xbd\xf6\xfa\x7d\x9f\xf4\xf3" "\xf8\xbd\x99\x7d\x33\xcf\xbb\xde\x37\x7e\x9e\x9d\x09\x40\x65\xd5\x56" "\xbf\x2e\x2e\xce\x14\x21\xbc\xf4\xfa\x8b\x8f\xfc\xe4\x0f\xaf\x7c\xb7" "\x08\x21\x1c\x6d\x96\x68\xb4\x94\x5b\xdb\xaa\x87\x10\x8a\xb6\xc7\xaf" "\xbb\x15\x33\x3e\xfe\xf0\xd9\x73\x9b\xa5\x45\x98\x5f\xfd\x9a\xb6\xc3" "\xd9\xdb\xcd\xc7\x4e\x86\x10\xae\x86\xd9\x70\x23\x34\xc2\xc2\xfb\x8f" "\xcd\xbd\xb9\xb4\xf4\xf2\xf5\x9b\x8f\x5e\x9e\x7e\xe1\xf4\xdb\x3b\x74" "\xfa\x00\x00\x50\x29\x67\xdf\xf8\xc7\xef\x1f\x78\xef\xad\x6f\x4c\xff" "\xe7\x17\x47\xce\x84\xf1\xe6\xfe\xd4\x3f\x6f\xc4\xed\xc9\xd8\xef\x3f" "\x11\xfb\xf7\x79\xff\xbf\x68\x49\x8b\x96\xed\x64\x2c\x2b\x37\x12\x23" "\xff\xfb\x61\x24\x2b\x37\x9a\xd5\x33\x5a\x52\x5f\x3d\x3b\x4e\xbd\xa4" "\xdc\x58\x87\xfa\x46\x5a\xf6\x6d\x76\x9e\x00\xb0\x1f\xac\xdf\xd7\x2b" "\x6a\x73\x6d\xdb\xb5\xda\xdc\xdc\xda\x75\xff\x8e\x5b\xe3\x63\xc5\xdc" "\xa5\x8b\xcb\x4f\x5c\xd9\xa5\x86\x02\x00\xdb\xe6\x5f\x0f\x87\x10\xce" "\x08\x21\x84\x10\xa2\x4a\xb1\x72\x68\xb7\x7b\x20\x00\x40\xd5\xe5\xe3" "\x85\x37\xb8\x9a\x8f\x2c\xd8\x9a\xe6\xd1\x0e\x74\x57\xff\xed\xa5\xda" "\xe6\x8f\x87\x6d\x30\xe8\xd7\xbf\xfa\x87\xab\xfe\x57\x9f\xf7\x8e\xc3" "\xf6\xd9\xaf\xaf\xa6\x74\x5e\xe9\xf7\x28\x8d\x63\xc8\xc7\x11\x8e\x64" "\x8f\xeb\xf5\xf7\xbf\x96\x1d\x67\xb4\xc7\x76\x96\x8d\x2b\x1c\x96\xf1" "\x86\x65\xed\xcc\x7f\xae\x7b\x55\x59\xfb\x7b\x7d\x1e\x77\x4b\x59\xfb" "\xf3\xf1\xb0\x7b\x55\x59\xfb\xf3\x71\xba\x7b\x55\x59\xfb\xc7\x07\xdc" "\x8e\x7e\x95\xb5\xff\xc0\x80\xdb\xd1\xaf\xb2\xf6\x4f\x34\xbf\xdb\xaf" "\x57\xb8\xed\x71\xdf\xea\xd7\xf5\x77\x8b\x23\x59\x7e\xeb\xf5\x33\x7f" "\x4f\x1f\x96\xf7\x78\x00\xa0\xdd\x47\xc6\xff\x09\x21\x84\x10\x95\x8b" "\xe7\x76\xbb\x03\x02\x00\xec\x39\xf9\xfc\x38\x2b\x51\xca\xcf\xe7\xe3" "\xc9\xf3\xf3\x79\x78\xf2\xfc\x7c\x5e\xa0\x3c\x7f\xbc\x43\xfe\x81\x0e" "\xf9\x00\xc0\x46\x0b\xbf\xba\xf0\xf3\x6b\xc5\xfa\xff\xf9\xb7\x3a\x1e" "\x2e\x8d\xbb\xb8\x2b\xa6\x93\x3d\xb6\x27\x1f\xad\xd1\x6b\xfd\x5b\x1d" "\xf7\xb4\xd5\xfa\x87\x65\xdc\x12\x00\xd5\xf6\xd4\x4f\x17\xbf\xf3\xd6" "\x99\xa5\x91\xb5\xf9\x7f\xd7\xaf\x65\x9f\x64\xf3\xff\xa6\xb9\x7a\xaf" "\xc5\xed\x34\xee\xf2\x60\xb6\xdd\x9c\xfb\x77\xb6\xbd\x9e\x5a\x49\xb9" "\x83\x3b\x71\x52\x00\xc0\xff\x95\xae\xbf\x65\xf3\xff\xde\x1d\xb7\x67" "\x42\xbd\x78\xe2\xe2\xf2\xf9\x13\x71\x7b\x2a\xa6\xbf\x1b\xaf\x8f\xdf" "\xd9\xff\xcd\x01\xb7\x1b\x00\xe8\x5f\xb7\xf3\xff\xcf\x84\xf6\xf9\xff" "\x0f\x36\xf7\xd7\x6b\xad\xfd\x82\x43\xeb\xfb\x8b\xd6\x7e\x41\x23\xdb" "\x3f\x5f\xb2\x7f\x21\x6e\x4f\xc7\xf4\xfb\xe3\x13\xab\xfb\xe7\xce\x3d" "\xb5\xfc\xbd\xed\x3e\x79\x00\xa8\xa8\x37\xbe\x75\xf0\xb5\x0f\x7e\x7b" "\x29\xac\xdd\xff\x5f\xff\xff\x77\xba\xff\x9f\x6e\xe3\x37\xe2\x58\xbb" "\x0f\x62\x81\xd4\x4f\x48\xf7\x07\x36\xdc\xff\x3f\xd6\x5e\xcf\x54\x59" "\xb9\x13\xed\xe5\x0e\x95\x95\x3b\xd9\x5e\xae\x91\x95\xab\xc7\xc8\xe7" "\xdd\xc8\xc7\x07\x4e\x64\x8f\x4b\xe3\x14\xd2\xb8\x87\xd4\xdf\x49\xe3" "\x1a\xa7\xcb\xda\x93\x4d\x90\x31\x96\x95\x1b\x8d\x71\x77\xd6\x9e\xa9" "\xac\x3d\x1b\xce\xf7\x44\x7b\x7b\xf2\x79\x68\x52\xfd\x8d\x6c\x7f\x3e" "\xee\x21\x95\x9b\x0e\x00\xb0\xd1\x95\xa7\x9f\xf9\xc1\xe3\xcb\xcb\xe7" "\x2f\xfb\xc6\x37\xbe\xa9\xe0\x37\xcf\x85\x10\x36\xcb\xda\xed\x77\x26" "\x60\xa7\x1d\xff\xd1\x93\x3f\x3c\x7e\xe5\xe9\x67\x1e\xbc\xf8\xe4\xe3" "\x17\xce\x5f\x38\x7f\x69\x61\x71\xfe\xd4\xa9\x87\x16\xe7\x17\x1f\x3a" "\xbe\x7a\x5f\xff\x78\xeb\xdd\x7d\x00\x60\x3f\x58\xef\xf4\xef\x76\x4b" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x32\x83\xf8\xa4\xf1" "\x6e\x9f\x23\x00\xd0\xee\xef\x0f\x87\x10\xce\x88\x2c\x46\xf6\x40\x1b" "\x84\x10\x29\x3e\xda\x03\x6d\x10\x62\x9f\xc5\xca\x4a\xbe\xe2\x2f\x00" "\xc0\x60\xf5\xba\xde\xfe\x56\x35\x8f\x16\xe7\xf3\x4f\xeb\x1e\xa4\xf4" "\xe0\x83\x7f\x9c\xbe\x13\xa9\xd8\xed\xa5\xf6\xfe\x92\xf5\x8b\xd9\x4e" "\x83\x7e\xfd\xab\x7f\xb8\xea\x7f\xf5\xf9\xed\xad\xbf\xb9\xbe\x48\xd7" "\xef\x7f\xb5\xf6\x03\xcc\xf6\x57\xef\xad\x5f\x9e\x3c\xd9\x5a\xff\xbd" "\xa3\x5d\xd6\x9f\x9f\xff\xb1\xfe\xea\xff\x73\x56\xff\xd7\x42\x77\xf5" "\xaf\xfc\x2c\xab\xbf\xcf\xa9\x71\xdf\xc9\xea\xbf\xab\xcb\xfa\x37\x9c" "\xff\xc9\xfe\xea\xff\x4b\xac\xff\x9e\xb8\x7d\xec\xcb\xdd\xd6\xdf\xfe" "\xfc\xa7\xf5\x76\xd2\x72\x38\x13\xd9\xf9\x4c\x96\xd4\xff\xd7\x7a\xfb" "\xf9\xa7\xb5\xfd\x7a\x3e\xff\x03\x3d\x9c\x74\x8b\x77\xe3\xf9\x03\x40" "\x15\xd5\x76\xbb\x01\x3b\x24\xf5\x12\x52\x3f\x3a\xf5\x43\x5a\xd7\xe7" "\x0b\x2d\xeb\xec\x85\xac\x7c\xb7\xfd\xff\x5a\x76\x9c\x7c\xbd\xbe\x7e" "\xa5\xe3\xa6\x7e\xd0\x17\xe3\x76\xea\xee\xa4\x75\x03\xf3\xf5\x0e\x7b" "\x6d\x7f\x5a\x9f\x70\x2a\x3b\x6e\xd1\x65\xbf\xb6\xec\xf5\x33\x2c\xff" "\x55\x2a\x6b\xff\x76\x3d\x8f\x3b\xad\xac\xfd\xf9\x7a\x90\x7b\x55\x59" "\xfb\xc7\x06\xdc\x8e\x7e\x95\xb5\x3f\xff\xbd\xdc\xab\xca\xda\xdf\xe7" "\x9f\x55\x03\x57\xd6\xfe\x89\x01\xb7\x63\x58\x1d\x8e\x69\xd9\xf5\x30" "\x5d\x7f\xa6\x62\x5e\xda\x6e\x64\xdb\x93\x9b\x3c\x17\xfb\xb5\x6f\x01" "\x00\xc3\xee\xdb\xa7\x6f\xde\x7f\xed\xeb\xa3\x37\xf2\xf5\xf9\xd3\x75" "\x3d\xfd\x19\x38\x19\xff\xa6\xbe\x9e\x95\xcb\xfb\x0b\x13\x59\xdf\xb1" "\xc8\xca\x7f\x29\xa6\x3f\x8e\xe9\x2b\x31\xfd\x4d\x4c\xdf\xc9\x8e\xb7" "\xb3\xff\x6d\x03\x80\x6a\x7a\xcf\xe7\xff\x84\x10\x42\x88\xca\x45\xd5" "\x3f\xff\xe7\xfe\x02\x55\x56\xf5\xd7\x7f\xd5\xcf\xbf\xda\xef\xfe\x9e" "\xff\x4e\xd2\xeb\x23\xbf\x8f\x9f\x8c\x76\xc8\xaf\xb7\xe4\x8f\x6c\x92" "\x3f\xd6\xe1\xf1\xe3\x59\x7e\xfe\x7c\x1d\xe8\x90\x7f\x4f\x76\xdc\x95" "\x28\xe5\x7f\xa6\x43\xfe\x67\x3b\xe4\x7f\xae\x43\xfe\x4c\x87\xfc\x43" "\x1d\xf2\xef\xed\x90\x7f\xb8\x43\xfe\x17\x3a\xe4\x1f\xe9\x90\x7f\xb4" "\x43\x3e\x00\xc3\xe9\xf3\x31\xf5\xfe\x0e\x00\xd5\x91\x8f\xfb\x73\xfd" "\x07\x80\xfd\x2f\x4d\xac\xe3\xfa\x0f\x00\xd5\xf1\xa9\x98\x96\x5d\xff" "\xef\xeb\x90\x0f\x00\x0c\x9f\x4f\xc7\xd4\xf5\x1d\x00\x2a\xa4\xd8\x7c" "\xa6\xc7\xad\xce\xdb\x03\x0c\x8f\x34\xbf\x74\xfa\x3d\x8f\xcb\x81\x84" "\xfb\x63\xfa\x95\x98\x7e\x35\xa6\x69\xbd\x94\x3e\x97\x5f\x01\xf6\x80" "\xff\xfe\xfb\xd7\x7f\xbb\x56\xac\xcf\xf7\x77\x38\xcb\xef\x76\x3e\xf9" "\xa2\xd6\xfe\xc9\xbb\x7c\xfd\x9f\x07\xba\x6c\x4f\xfe\xf9\xbd\x5e\xe7" "\xb3\x6f\x74\x59\xcf\x4e\xd5\x3f\xbd\xc5\xfa\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x18\xac\xda\xea\xd7\xc5\xc5\x99\x22\x84\x97\x5e\x7f" "\xf1\x91\x7f\x9e\xfa\xd3\xbb\x45\x08\xe1\x68\xb3\x44\xa3\xa5\xdc\xda" "\x56\xbd\x65\x7b\xb6\xed\x38\x21\xbc\x56\xac\xa5\x1f\x7f\xf8\xec\xb9" "\xd6\xf4\x93\x98\x16\x61\x3e\x14\xa1\x68\xee\x0f\x67\x6f\x37\x6b\x9a" "\x0c\x21\x5c\x0d\xb3\xe1\x46\x68\x84\x85\xf7\x1f\x9b\x7b\x73\x69\xe9" "\xe5\xeb\x37\x1f\xbd\x3c\xfd\xc2\xe9\xb7\x77\xf0\x47\x00\x00\x00\x00" "\xfb\xde\xff\x02\x00\x00\xff\xff\x3b\xfa\x39\x04", 2562); syz_mount_image(/*fs=*/0x200000000380, /*dir=*/0x200000000a40, /*flags=*/0, /*opts=*/0x200000000100, /*chdir=*/0xd, /*size=*/0xa02, /*img=*/0x200000000a80); break; case 1: // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 00} (length 0x2) // } // flags: open_flags = 0x80 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x200000000000, ".\000", 2); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000000ul, /*flags=O_EXCL*/ 0x80, /*mode=*/0); if (res != -1) r[0] = res; break; case 2: // ioctl$NILFS_IOCTL_CLEAN_SEGMENTS arguments: [ // fd: fd (resource) // cmd: const = 0x40786e88 (4 bytes) // arg: ptr[in, nilfs_ioctl_clean_segments_args] { // nilfs_ioctl_clean_segments_args { // argv0: nilfs_argv_typed[nilfs_vdesc, in, NILFS_VDESC_SIZE] { // v_base: ptr[in, array[nilfs_vdesc]] { // array[nilfs_vdesc] { // nilfs_vdesc { // vd_ino: int64 = 0x3 (8 bytes) // vd_cno: int64 = 0x0 (8 bytes) // vd_vblocknr: int64 = 0x9 (8 bytes) // vd_period: nilfs_period { // p_start: int64 = 0xfffffffffffffff7 (8 bytes) // p_end: int64 = 0x2 (8 bytes) // } // vd_blocknr: int64 = 0x58 (8 bytes) // vd_offset: int64 = 0xffffffffffffc (8 bytes) // vd_flags: int32 = 0x0 (4 bytes) // vd_pad: const = 0x0 (4 bytes) // } // } // } // v_nmembs: len = 0x1 (4 bytes) // v_size: const = 0x40 (2 bytes) // v_flags: int16 = 0xbe43 (2 bytes) // v_index: int64 = 0xde (8 bytes) // } // argv1: nilfs_argv_typed[nilfs_period, in, NILFS_PERIOD_SIZE] { // v_base: nil // v_nmembs: len = 0x0 (4 bytes) // v_size: const = 0x10 (2 bytes) // v_flags: int16 = 0x2 (2 bytes) // v_index: int64 = 0x8 (8 bytes) // } // argv2: nilfs_argv_typed[int64, in, 8] { // v_base: nil // v_nmembs: len = 0x0 (4 bytes) // v_size: const = 0x8 (2 bytes) // v_flags: int16 = 0x4 (2 bytes) // v_index: int64 = 0x3 (8 bytes) // } // argv3: nilfs_argv_typed[nilfs_bdesc, in, NILFS_BDESC_SIZE] { // v_base: nil // v_nmembs: len = 0x0 (4 bytes) // v_size: const = 0x28 (2 bytes) // v_flags: int16 = 0x9 (2 bytes) // v_index: int64 = 0x0 (8 bytes) // } // argv4: nilfs_argv_typed[int64, in, 8] { // v_base: ptr[in, array[int64]] { // array[int64] { // int64 = 0x9 (8 bytes) // } // } // v_nmembs: len = 0x1 (4 bytes) // v_size: const = 0x8 (2 bytes) // v_flags: int16 = 0x98f (2 bytes) // v_index: int64 = 0x8 (8 bytes) // } // } // } // ] *(uint64_t*)0x200000000040 = 0x200000000280; *(uint64_t*)0x200000000280 = 3; *(uint64_t*)0x200000000288 = 0; *(uint64_t*)0x200000000290 = 9; *(uint64_t*)0x200000000298 = 0xfffffffffffffff7; *(uint64_t*)0x2000000002a0 = 2; *(uint64_t*)0x2000000002a8 = 0x58; *(uint64_t*)0x2000000002b0 = 0xffffffffffffc; *(uint32_t*)0x2000000002b8 = 0; *(uint32_t*)0x2000000002bc = 0; *(uint32_t*)0x200000000048 = 1; *(uint16_t*)0x20000000004c = 0x40; *(uint16_t*)0x20000000004e = 0xbe43; *(uint64_t*)0x200000000050 = 0xde; *(uint64_t*)0x200000000058 = 0; *(uint32_t*)0x200000000060 = 0; *(uint16_t*)0x200000000064 = 0x10; *(uint16_t*)0x200000000066 = 2; *(uint64_t*)0x200000000068 = 8; *(uint64_t*)0x200000000070 = 0; *(uint32_t*)0x200000000078 = 0; *(uint16_t*)0x20000000007c = 8; *(uint16_t*)0x20000000007e = 4; *(uint64_t*)0x200000000080 = 3; *(uint64_t*)0x200000000088 = 0; *(uint32_t*)0x200000000090 = 0; *(uint16_t*)0x200000000094 = 0x28; *(uint16_t*)0x200000000096 = 9; *(uint64_t*)0x200000000098 = 0; *(uint64_t*)0x2000000000a0 = 0x2000000003c0; *(uint64_t*)0x2000000003c0 = 9; *(uint32_t*)0x2000000000a8 = 1; *(uint16_t*)0x2000000000ac = 8; *(uint16_t*)0x2000000000ae = 0x98f; *(uint64_t*)0x2000000000b0 = 8; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40786e88, /*arg=*/0x200000000040ul); break; case 3: // 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 = 0x182407b (8 bytes) // opts: nil // chdir: int8 = 0x1 (1 bytes) // size: len = 0x0 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x0) // } // ] // returns fd_dir memcpy((void*)0x200000000080, "vfat\000", 5); memcpy((void*)0x200000000340, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 253); syz_mount_image( /*fs=*/0x200000000080, /*dir=*/0x200000000340, /*flags=MS_I_VERSION|MS_UNBINDABLE|MS_REC|MS_SYNCHRONOUS|MS_STRICTATIME|MS_REMOUNT|0x4b*/ 0x182407b, /*opts=*/0, /*chdir=*/1, /*size=*/0, /*img=*/0x200000000140); break; } } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*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=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; for (procid = 0; procid < 4; procid++) { if (fork() == 0) { use_temporary_dir(); loop(); } } sleep(1000000); return 0; }