// https://syzkaller.appspot.com/bug?id=d446033bdbea6f4bb32a9af4d35209886c537173 // 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; } static long syz_open_dev(volatile long a0, volatile long a1, volatile long a2) { if (a0 == 0xc || a0 == 0xb) { char buf[128]; sprintf(buf, "/dev/%s/%d:%d", a0 == 0xc ? "char" : "block", (uint8_t)a1, (uint8_t)a2); return open(buf, O_RDWR, 0); } else { unsigned long nb = a1; char buf[1024]; char* hash; strncpy(buf, (char*)a0, sizeof(buf) - 1); buf[sizeof(buf) - 1] = 0; while ((hash = strchr(buf, '#'))) { *hash = '0' + (char)(nb % 10); nb /= 10; } return open(buf, a2 & ~O_CREAT, 0); } } //% 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); if (call == 2) break; event_timedwait(&th->done, 50 + (call == 2 ? 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_open_dev$loop arguments: [ // dev: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 6c 6f 6f 70 23 00} (length 0xb) // } // id: intptr = 0x204000000000075f (8 bytes) // flags: open_flags = 0x10b042 (8 bytes) // ] // returns fd_loop memcpy((void*)0x200000000440, "/dev/loop#\000", 11); res = -1; res = syz_open_dev( /*dev=*/0x200000000440, /*id=*/0x204000000000075f, /*flags=O_SYNC|O_LARGEFILE|O_CREAT|FASYNC|O_RDWR*/ 0x10b042); if (res != -1) r[0] = res; break; case 1: // ioctl$LOOP_SET_STATUS arguments: [ // fd: fd_loop (resource) // cmd: const = 0x1277 (4 bytes) // arg: ptr[in, loop_info] { // loop_info { // lo_number: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // lo_device: alignptr[const[0, int16]] { // v: const = 0x0 (2 bytes) // pad = 0x0 (6 bytes) // } // lo_inode: const = 0x0 (8 bytes) // lo_rdevice: alignptr[const[0, int16]] { // v: const = 0x0 (2 bytes) // pad = 0x0 (6 bytes) // } // lo_offset: int32 = 0x7 (4 bytes) // lo_enc_type: lo_encrypt_type = 0x12 (4 bytes) // lo_enc_key_size: int32 = 0xf (4 bytes) // lo_flags: lo_flags = 0xc (4 bytes) // lo_name: buffer: {4b 8b 59 a4 69 29 df ed 0b 2f 34 38 0d 48 8f 95 // a0 23 d0 09 85 24 71 dd ad a8 62 cf e0 f4 fc df fb 1b 6a 21 15 35 // 4d 4d f1 5d 01 7a 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00} (length 0x40) lo_enc_key: buffer: {23 63 f1 8d 9a cc // 6c aa dd 6d 12 6c fb c0 c9 2f c8 17 d4 4d cd ec f9 00 00 00 00 00 // 00 00 00 00} (length 0x20) lo_init: array[intptr] { // intptr = 0x6 (8 bytes) // intptr = 0x1e0a (8 bytes) // } // reserved: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // ] *(uint32_t*)0x200000000580 = 0; *(uint16_t*)0x200000000588 = 0; *(uint64_t*)0x200000000590 = 0; *(uint16_t*)0x200000000598 = 0; *(uint32_t*)0x2000000005a0 = 7; *(uint32_t*)0x2000000005a4 = 0x12; *(uint32_t*)0x2000000005a8 = 0xf; *(uint32_t*)0x2000000005ac = 0xc; memcpy((void*)0x2000000005b0, "\x4b\x8b\x59\xa4\x69\x29\xdf\xed\x0b\x2f\x34\x38\x0d\x48\x8f\x95" "\xa0\x23\xd0\x09\x85\x24\x71\xdd\xad\xa8\x62\xcf\xe0\xf4\xfc\xdf" "\xfb\x1b\x6a\x21\x15\x35\x4d\x4d\xf1\x5d\x01\x7a\x3f\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 64); memcpy((void*)0x2000000005f0, "\x23\x63\xf1\x8d\x9a\xcc\x6c\xaa\xdd\x6d\x12\x6c\xfb\xc0\xc9\x2f" "\xc8\x17\xd4\x4d\xcd\xec\xf9\x00\x00\x00\x00\x00\x00\x00\x00\x00", 32); *(uint64_t*)0x200000000610 = 6; *(uint64_t*)0x200000000618 = 0x1e0a; *(uint32_t*)0x200000000620 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x1277, /*arg=*/0x200000000580ul); break; case 2: // syz_mount_image$hfsplus arguments: [ // fs: ptr[in, buffer] { // buffer: {68 66 73 70 6c 75 73 00} (length 0x8) // } // 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 // 00} (length 0xfa) // } // flags: mount_flags = 0x2000000 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0x6ca (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x6ca) // } // ] // returns fd_dir memcpy((void*)0x200000000100, "hfsplus\000", 8); memcpy((void*)0x200000002900, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 250); memcpy( (void*)0x200000000500, "\x78\x9c\xec\xdd\xcd\x6f\x1c\x67\x1d\x07\xf0\xef\xac\xd7\xae\x37\x54" "\xc1\x69\x13\x1a\xa1\x22\xac\x44\x2a\x48\x11\x89\x13\x2b\x85\x70\xc1" "\x20\x84\x72\xa8\x50\x55\x0e\x3d\x5b\x89\xd3\x58\xdd\x24\x55\xe2\x22" "\xb7\x42\xe0\x02\x82\x13\x12\x87\xfe\x01\x05\xc9\x37\x0e\x08\x89\x7b" "\x50\xb8\x70\x29\xb7\x5e\x7d\xac\x84\xc4\x25\xe2\x10\xf5\xb2\x68\x66" "\x67\xed\x5d\x7b\xfd\x96\xd8\x6b\x07\x3e\x9f\x68\x3c\xcf\x33\xcf\xcb" "\xfc\xe6\x99\x67\x66\xbc\xeb\xac\x36\xc0\xff\xad\xeb\x17\xd2\x7c\x98" "\x22\xd7\x2f\xbc\xb1\x5c\xe6\xd7\x56\x67\xdb\x6b\xab\xb3\x2f\xd4\xc5" "\xed\x24\x65\xba\x91\x34\xbb\xab\x14\x77\x93\xe2\x51\x32\x57\x96\x17" "\x7d\x4b\xfa\xd6\x5b\x7c\xbc\x78\xed\xad\xcf\x1e\xaf\x7d\xde\xcd\x35" "\xeb\xa5\xaa\x3f\xb6\x53\xbb\x21\x86\xd4\x5d\xa9\x97\x4c\xd7\xfd\x4d" "\x0f\x6d\x39\xbe\xd7\x5d\xac\xd4\xe1\xe5\xc5\x24\x37\xea\xf5\xa0\x89" "\xbd\xf6\x35\x50\xb1\x1c\xb4\xf3\xf5\x1a\x8e\x5c\x67\x8b\x95\xfd\x34" "\xdf\xcf\x75\x0b\x1c\x33\xbd\xa7\x53\xd1\x7d\x6e\x6e\x31\x95\x9c\x48" "\x32\x59\xff\x1e\x90\xfa\xee\xd0\x18\x5d\x84\x87\x63\x5f\x77\x39\x00" "\x00\x00\x78\x4e\x7d\x7a\xef\xa8\x23\x00\x00\x00\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\xe7\x4f\xfd\xfd\xff\x45\xbd\x34\xea\x75\xa6\x53\xf4\xbe" "\xff\x7f\xa2\xb7\xad\x4e\x1f\x43\x73\x7b\xae\xf9\xf0\x50\xe3\x00\x00" "\x00\x00\x00\x00\x00\x80\xd1\xf8\xfa\x93\x3c\xc9\x72\x4e\xf6\xf2\x9d" "\xa2\xfa\x9b\xff\xb9\x2a\x73\x3a\x5f\x74\x92\x2f\xe5\xfd\x3c\xc8\x42" "\xee\xe7\x62\x96\x33\x9f\xa5\x2c\xe5\x7e\x2e\x27\x99\xea\xeb\x68\x62" "\x79\x7e\x69\xe9\xfe\xe5\xf5\x96\xa5\xe1\x2d\xaf\x0c\x6d\x79\x65\x54" "\x47\x0c\x00\x00\x00\x00\x00\x00\x00\xff\x93\x7e\x99\xd6\xc6\xdf\xff" "\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\xe0\x38\x28\x92" "\xb1\xee\xaa\x5a\x4e\xd7\xeb\x4c\xa5\xd1\xcc\x46\x59\x56\x92\x7f\x26" "\x99\x38\xea\x78\xf7\xa1\x18\xb6\xf1\xe1\xe8\xe3\x00\x00\x00\x80\x67" "\x32\xf9\x14\x6d\xbe\xfc\x24\x4f\xb2\x9c\x93\xbd\x7c\xa7\xa8\x5e\xf3" "\x7f\xa5\x7a\xbd\x3c\x99\xf7\x73\x37\x4b\x59\xcc\x52\xda\x59\xc8\xcd" "\xfa\x35\x74\xf9\xaa\xbf\xb1\xb6\x3a\xdb\x5e\x5b\x9d\xbd\x53\x2e\x65" "\x7e\xb0\xdf\xef\xff\x7b\x5f\x61\x4c\xd4\x3d\x8c\x55\xb9\x61\x7b\x3e" "\x5b\xd5\x68\xe5\x56\x16\xab\x2d\x17\x73\xa3\x0a\xe6\x66\x1a\xdd\x7d" "\x9f\x4f\xce\xf6\xe2\xe9\x8b\xab\xcf\x47\x65\x4c\xc5\xf7\x6a\x7b\x8c" "\xac\x59\x0f\x6b\xb9\xb3\xdf\x6f\xf7\x2e\xc2\x81\x18\x7c\x2b\xa2\xb1" "\x43\xcd\xd6\x46\x70\xc9\xfa\x88\xcc\xd4\xb1\x95\x2d\x4f\x75\x47\xa0" "\xa8\xde\xa8\x49\x36\x8f\xc4\xae\x67\xa7\x39\x90\x9b\xaa\x7a\x1d\x5f" "\xdf\xd3\xe5\x34\xd6\xdf\xf9\x39\x7d\x08\x63\x7e\xa2\x5e\x97\xc7\xf3" "\x9b\x43\x1d\xf3\xfd\x5a\x1f\x89\x46\xaa\x91\xb8\xd2\x9b\x7d\xe5\x35" "\xb3\xf3\x48\x24\xdf\xf8\xeb\x9f\xde\xbe\xdd\xbe\xfb\xee\xed\x5b\x0f" "\x2e\x1c\x9f\x43\xda\xc5\xd8\x36\xdb\x37\xcf\x89\xd9\xbe\x91\x78\xe5" "\xb9\x1e\x89\xe6\x3e\xeb\xcf\x54\x23\x71\x66\x3d\x7f\x3d\x3f\xca\x4f" "\x72\x21\xd3\x79\x33\xf7\xb3\x98\x9f\x66\x3e\x4b\x59\x48\xa7\x2e\x9f" "\xaf\xe7\x73\xf9\x73\x6a\xe7\x91\x9a\x1b\xc8\xbd\xb9\x5b\x24\x13\xf5" "\x79\xe9\x9e\xb3\xbd\xc4\x34\x9d\x1f\x56\xa9\xf9\x9c\xab\xda\x9e\xcc" "\x62\x8a\xdc\xcb\xcd\x2c\xe4\xf5\xea\xdf\x95\x5c\xce\xb7\x73\x35\x57" "\x73\xad\xef\x0c\x9f\xd9\x36\xee\xea\xd8\xaa\xab\xbe\xb1\xf9\xaa\xef" "\x9d\xe9\xbf\x0d\x0d\xfe\xfc\x37\xeb\x44\x79\x77\xfb\xed\xc6\x5d\x6e" "\x6e\xa7\x23\xde\x6e\x76\x1e\x94\xee\xbd\xbf\x1c\xd7\x53\x7d\xe3\xda" "\x9d\xf5\x8f\xd7\x6b\x9d\xea\xbb\x0e\x66\xfa\x46\xe9\xa5\xde\xe8\x8c" "\x0f\xed\xfc\x69\xee\x8d\xcd\xaf\xd6\x89\x72\x1f\xbf\xda\xe5\x39\x31" "\x5a\x53\xf5\x48\x94\x17\x50\xef\x29\xd1\x8b\xee\xe5\xee\x48\x34\xab" "\x67\xd1\xd6\x79\xfe\x87\x4e\xd9\x2e\xed\xbb\x9d\xce\xed\xf9\xf7\xb6" "\xe9\x7f\x65\x53\xfe\xb5\x7a\x5d\x4e\xab\xd5\xaf\xed\x56\xbb\x67\xf8" "\xa9\x38\x58\xe5\x7c\x79\x29\x93\xf5\x9d\x64\x70\x76\x94\x65\x2f\xaf" "\xdf\x65\xfa\xca\x3a\x1b\x73\xb9\x5b\x36\xf8\xc4\x2d\xdb\x9d\xa9\xca" "\x8a\xa2\x77\xa5\xfe\x38\xf7\xaa\x09\xb0\xf5\x4a\x9d\xa8\x7f\x87\xdb" "\xda\xd3\x95\xaa\xec\x95\xa1\x65\xb3\x55\xd9\xd9\xbe\xb2\x81\xdf\xb7" "\x72\x2f\xed\xdc\x1c\xc1\xf8\x01\xf0\x34\xfe\xf1\xf6\x7a\x72\x2a\x27" "\x26\x5a\xff\x6a\x7d\xda\xfa\xa4\xf5\xeb\xd6\xed\xd6\x1b\x93\x3f\x78" "\xe1\x3b\x2f\xbc\x3a\x91\xf1\xbf\x8f\x7f\xb7\x39\x33\xf6\x5a\xe3\xd5" "\xe2\x2f\xf9\x24\x3f\xdf\x78\xfd\x0f\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\xbd" "\x07\x1f\x7c\xf8\xee\x7c\xbb\xbd\x70\x7f\x78\xa2\xb1\x7d\xd1\x40\xa2" "\x95\xcd\x5b\x76\xeb\x79\x53\xa2\xa8\xbf\xd0\x67\x7f\xad\x8e\x6f\x62" "\x32\xc9\xc0\x96\xea\x7b\x8e\x46\x1e\x46\x6b\x73\x18\x5b\x12\x9d\x5f" "\x24\x23\x1f\x9f\xde\x97\x08\x0e\xaf\xf3\xbb\x32\xd1\xdc\x32\xa3\x86" "\x25\xe6\x06\xb6\xfc\x79\x6b\x87\x1f\xed\x33\xc2\x62\x6f\xd7\xc5\x21" "\x26\x1a\x19\xed\x4e\xc7\x32\x7c\x02\x1c\xe1\x4d\x09\x18\x89\x4b\x4b" "\x77\xde\xbb\xf4\xe0\x83\x0f\xbf\xb5\x78\x67\xfe\x9d\x85\x77\x16\xee" "\x8e\x5f\xbd\x7a\x6d\xe6\xda\xd5\xd7\x67\x2f\xdd\x5a\x6c\x2f\xcc\x74" "\x7f\x1e\x75\x94\xc0\x61\xd8\x78\xe8\x1f\x75\x24\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xc0\x5e\x0d\xfb\x60\xc0\xb9\x17\x77\xfb\xd0\xc8\x9e" "\x3e\xe3\xe1\x7f\x16\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xe2\xfa\x85\x34" "\x1f\xa6\xc8\xe5\x99\x8b\x33\x65\x7e\x6d\x75\xb6\x5d\x2e\xbd\xf4\x46" "\xcd\x66\x92\x46\x23\x29\x7e\x96\x14\x8f\x92\xb9\x74\x97\x4c\xf5\x75" "\x57\xe4\x8f\x8f\xd2\x19\xb2\x9f\x8f\x17\xaf\xbd\xf5\xd9\xe3\xb5\xcf" "\x37\xfa\x6a\x76\xeb\x27\x8d\x7a\xbd\xbd\x9d\x4b\x93\xac\xd4\x4b\xa6" "\x93\x8c\xd5\xeb\x67\x30\xd0\xdf\x8d\x67\xee\xaf\xf8\x4f\xef\x18\xca" "\x01\xfb\xa2\xd3\xe9\xcc\x3d\x5b\x7c\x70\x30\xfe\x1b\x00\x00\xff\xff" "\x9a\xc5\xf5\x11", 1738); syz_mount_image(/*fs=*/0x200000000100, /*dir=*/0x200000002900, /*flags=MS_LAZYTIME*/ 0x2000000, /*opts=*/0x2000000022c0, /*chdir=*/1, /*size=*/0x6ca, /*img=*/0x200000000500); break; case 3: // syz_mount_image$hfsplus arguments: [ // fs: ptr[in, buffer] { // buffer: {68 66 73 70 6c 75 73 00} (length 0x8) // } // 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 // 00} (length 0xfa) // } // flags: mount_flags = 0x2000000 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0x6ca (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x6ca) // } // ] // returns fd_dir memcpy((void*)0x200000000100, "hfsplus\000", 8); memcpy((void*)0x200000002900, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 250); memcpy( (void*)0x200000000500, "\x78\x9c\xec\xdd\xcd\x6f\x1c\x67\x1d\x07\xf0\xef\xac\xd7\xae\x37\x54" "\xc1\x69\x13\x1a\xa1\x22\xac\x44\x2a\x48\x11\x89\x13\x2b\x85\x70\xc1" "\x20\x84\x72\xa8\x50\x55\x0e\x3d\x5b\x89\xd3\x58\xdd\x24\x55\xe2\x22" "\xb7\x42\xe0\x02\x82\x13\x12\x87\xfe\x01\x05\xc9\x37\x0e\x08\x89\x7b" "\x50\xb8\x70\x29\xb7\x5e\x7d\xac\x84\xc4\x25\xe2\x10\xf5\xb2\x68\x66" "\x67\xed\x5d\x7b\xfd\x96\xd8\x6b\x07\x3e\x9f\x68\x3c\xcf\x33\xcf\xcb" "\xfc\xe6\x99\x67\x66\xbc\xeb\xac\x36\xc0\xff\xad\xeb\x17\xd2\x7c\x98" "\x22\xd7\x2f\xbc\xb1\x5c\xe6\xd7\x56\x67\xdb\x6b\xab\xb3\x2f\xd4\xc5" "\xed\x24\x65\xba\x91\x34\xbb\xab\x14\x77\x93\xe2\x51\x32\x57\x96\x17" "\x7d\x4b\xfa\xd6\x5b\x7c\xbc\x78\xed\xad\xcf\x1e\xaf\x7d\xde\xcd\x35" "\xeb\xa5\xaa\x3f\xb6\x53\xbb\x21\x86\xd4\x5d\xa9\x97\x4c\xd7\xfd\x4d" "\x0f\x6d\x39\xbe\xd7\x5d\xac\xd4\xe1\xe5\xc5\x24\x37\xea\xf5\xa0\x89" "\xbd\xf6\x35\x50\xb1\x1c\xb4\xf3\xf5\x1a\x8e\x5c\x67\x8b\x95\xfd\x34" "\xdf\xcf\x75\x0b\x1c\x33\xbd\xa7\x53\xd1\x7d\x6e\x6e\x31\x95\x9c\x48" "\x32\x59\xff\x1e\x90\xfa\xee\xd0\x18\x5d\x84\x87\x63\x5f\x77\x39\x00" "\x00\x00\x78\x4e\x7d\x7a\xef\xa8\x23\x00\x00\x00\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\xe7\x4f\xfd\xfd\xff\x45\xbd\x34\xea\x75\xa6\x53\xf4\xbe" "\xff\x7f\xa2\xb7\xad\x4e\x1f\x43\x73\x7b\xae\xf9\xf0\x50\xe3\x00\x00" "\x00\x00\x00\x00\x00\x80\xd1\xf8\xfa\x93\x3c\xc9\x72\x4e\xf6\xf2\x9d" "\xa2\xfa\x9b\xff\xb9\x2a\x73\x3a\x5f\x74\x92\x2f\xe5\xfd\x3c\xc8\x42" "\xee\xe7\x62\x96\x33\x9f\xa5\x2c\xe5\x7e\x2e\x27\x99\xea\xeb\x68\x62" "\x79\x7e\x69\xe9\xfe\xe5\xf5\x96\xa5\xe1\x2d\xaf\x0c\x6d\x79\x65\x54" "\x47\x0c\x00\x00\x00\x00\x00\x00\x00\xff\x93\x7e\x99\xd6\xc6\xdf\xff" "\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\xe0\x38\x28\x92" "\xb1\xee\xaa\x5a\x4e\xd7\xeb\x4c\xa5\xd1\xcc\x46\x59\x56\x92\x7f\x26" "\x99\x38\xea\x78\xf7\xa1\x18\xb6\xf1\xe1\xe8\xe3\x00\x00\x00\x80\x67" "\x32\xf9\x14\x6d\xbe\xfc\x24\x4f\xb2\x9c\x93\xbd\x7c\xa7\xa8\x5e\xf3" "\x7f\xa5\x7a\xbd\x3c\x99\xf7\x73\x37\x4b\x59\xcc\x52\xda\x59\xc8\xcd" "\xfa\x35\x74\xf9\xaa\xbf\xb1\xb6\x3a\xdb\x5e\x5b\x9d\xbd\x53\x2e\x65" "\x7e\xb0\xdf\xef\xff\x7b\x5f\x61\x4c\xd4\x3d\x8c\x55\xb9\x61\x7b\x3e" "\x5b\xd5\x68\xe5\x56\x16\xab\x2d\x17\x73\xa3\x0a\xe6\x66\x1a\xdd\x7d" "\x9f\x4f\xce\xf6\xe2\xe9\x8b\xab\xcf\x47\x65\x4c\xc5\xf7\x6a\x7b\x8c" "\xac\x59\x0f\x6b\xb9\xb3\xdf\x6f\xf7\x2e\xc2\x81\x18\x7c\x2b\xa2\xb1" "\x43\xcd\xd6\x46\x70\xc9\xfa\x88\xcc\xd4\xb1\x95\x2d\x4f\x75\x47\xa0" "\xa8\xde\xa8\x49\x36\x8f\xc4\xae\x67\xa7\x39\x90\x9b\xaa\x7a\x1d\x5f" "\xdf\xd3\xe5\x34\xd6\xdf\xf9\x39\x7d\x08\x63\x7e\xa2\x5e\x97\xc7\xf3" "\x9b\x43\x1d\xf3\xfd\x5a\x1f\x89\x46\xaa\x91\xb8\xd2\x9b\x7d\xe5\x35" "\xb3\xf3\x48\x24\xdf\xf8\xeb\x9f\xde\xbe\xdd\xbe\xfb\xee\xed\x5b\x0f" "\x2e\x1c\x9f\x43\xda\xc5\xd8\x36\xdb\x37\xcf\x89\xd9\xbe\x91\x78\xe5" "\xb9\x1e\x89\xe6\x3e\xeb\xcf\x54\x23\x71\x66\x3d\x7f\x3d\x3f\xca\x4f" "\x72\x21\xd3\x79\x33\xf7\xb3\x98\x9f\x66\x3e\x4b\x59\x48\xa7\x2e\x9f" "\xaf\xe7\x73\xf9\x73\x6a\xe7\x91\x9a\x1b\xc8\xbd\xb9\x5b\x24\x13\xf5" "\x79\xe9\x9e\xb3\xbd\xc4\x34\x9d\x1f\x56\xa9\xf9\x9c\xab\xda\x9e\xcc" "\x62\x8a\xdc\xcb\xcd\x2c\xe4\xf5\xea\xdf\x95\x5c\xce\xb7\x73\x35\x57" "\x73\xad\xef\x0c\x9f\xd9\x36\xee\xea\xd8\xaa\xab\xbe\xb1\xf9\xaa\xef" "\x9d\xe9\xbf\x0d\x0d\xfe\xfc\x37\xeb\x44\x79\x77\xfb\xed\xc6\x5d\x6e" "\x6e\xa7\x23\xde\x6e\x76\x1e\x94\xee\xbd\xbf\x1c\xd7\x53\x7d\xe3\xda" "\x9d\xf5\x8f\xd7\x6b\x9d\xea\xbb\x0e\x66\xfa\x46\xe9\xa5\xde\xe8\x8c" "\x0f\xed\xfc\x69\xee\x8d\xcd\xaf\xd6\x89\x72\x1f\xbf\xda\xe5\x39\x31" "\x5a\x53\xf5\x48\x94\x17\x50\xef\x29\xd1\x8b\xee\xe5\xee\x48\x34\xab" "\x67\xd1\xd6\x79\xfe\x87\x4e\xd9\x2e\xed\xbb\x9d\xce\xed\xf9\xf7\xb6" "\xe9\x7f\x65\x53\xfe\xb5\x7a\x5d\x4e\xab\xd5\xaf\xed\x56\xbb\x67\xf8" "\xa9\x38\x58\xe5\x7c\x79\x29\x93\xf5\x9d\x64\x70\x76\x94\x65\x2f\xaf" "\xdf\x65\xfa\xca\x3a\x1b\x73\xb9\x5b\x36\xf8\xc4\x2d\xdb\x9d\xa9\xca" "\x8a\xa2\x77\xa5\xfe\x38\xf7\xaa\x09\xb0\xf5\x4a\x9d\xa8\x7f\x87\xdb" "\xda\xd3\x95\xaa\xec\x95\xa1\x65\xb3\x55\xd9\xd9\xbe\xb2\x81\xdf\xb7" "\x72\x2f\xed\xdc\x1c\xc1\xf8\x01\xf0\x34\xfe\xf1\xf6\x7a\x72\x2a\x27" "\x26\x5a\xff\x6a\x7d\xda\xfa\xa4\xf5\xeb\xd6\xed\xd6\x1b\x93\x3f\x78" "\xe1\x3b\x2f\xbc\x3a\x91\xf1\xbf\x8f\x7f\xb7\x39\x33\xf6\x5a\xe3\xd5" "\xe2\x2f\xf9\x24\x3f\xdf\x78\xfd\x0f\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\xbd" "\x07\x1f\x7c\xf8\xee\x7c\xbb\xbd\x70\x7f\x78\xa2\xb1\x7d\xd1\x40\xa2" "\x95\xcd\x5b\x76\xeb\x79\x53\xa2\xa8\xbf\xd0\x67\x7f\xad\x8e\x6f\x62" "\x32\xc9\xc0\x96\xea\x7b\x8e\x46\x1e\x46\x6b\x73\x18\x5b\x12\x9d\x5f" "\x24\x23\x1f\x9f\xde\x97\x08\x0e\xaf\xf3\xbb\x32\xd1\xdc\x32\xa3\x86" "\x25\xe6\x06\xb6\xfc\x79\x6b\x87\x1f\xed\x33\xc2\x62\x6f\xd7\xc5\x21" "\x26\x1a\x19\xed\x4e\xc7\x32\x7c\x02\x1c\xe1\x4d\x09\x18\x89\x4b\x4b" "\x77\xde\xbb\xf4\xe0\x83\x0f\xbf\xb5\x78\x67\xfe\x9d\x85\x77\x16\xee" "\x8e\x5f\xbd\x7a\x6d\xe6\xda\xd5\xd7\x67\x2f\xdd\x5a\x6c\x2f\xcc\x74" "\x7f\x1e\x75\x94\xc0\x61\xd8\x78\xe8\x1f\x75\x24\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xc0\x5e\x0d\xfb\x60\xc0\xb9\x17\x77\xfb\xd0\xc8\x9e" "\x3e\xe3\xe1\x7f\x16\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xe2\xfa\x85\x34" "\x1f\xa6\xc8\xe5\x99\x8b\x33\x65\x7e\x6d\x75\xb6\x5d\x2e\xbd\xf4\x46" "\xcd\x66\x92\x46\x23\x29\x7e\x96\x14\x8f\x92\xb9\x74\x97\x4c\xf5\x75" "\x57\xe4\x8f\x8f\xd2\x19\xb2\x9f\x8f\x17\xaf\xbd\xf5\xd9\xe3\xb5\xcf" "\x37\xfa\x6a\x76\xeb\x27\x8d\x7a\xbd\xbd\x9d\x4b\x93\xac\xd4\x4b\xa6" "\x93\x8c\xd5\xeb\x67\x30\xd0\xdf\x8d\x67\xee\xaf\xf8\x4f\xef\x18\xca" "\x01\xfb\xa2\xd3\xe9\xcc\x3d\x5b\x7c\x70\x30\xfe\x1b\x00\x00\xff\xff" "\x9a\xc5\xf5\x11", 1738); syz_mount_image(/*fs=*/0x200000000100, /*dir=*/0x200000002900, /*flags=MS_LAZYTIME*/ 0x2000000, /*opts=*/0x2000000022c0, /*chdir=*/1, /*size=*/0x6ca, /*img=*/0x200000000500); 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; for (procid = 0; procid < 4; procid++) { if (fork() == 0) { use_temporary_dir(); loop(); } } sleep(1000000); return 0; }