// https://syzkaller.appspot.com/bug?id=050d9b36a89f3bc42efe47dd9558faee19e8469d // 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 < 8; 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 == 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++) { 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[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: // socketpair$unix arguments: [ // domain: const = 0x1 (8 bytes) // type: unix_socket_type = 0x3 (8 bytes) // proto: const = 0x0 (4 bytes) // fds: ptr[out, unix_pair] { // unix_pair { // fd0: sock_unix (resource) // fd1: sock_unix (resource) // } // } // ] res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_DGRAM|SOCK_STREAM*/ 3ul, /*proto=*/0, /*fds=*/0x200000000080ul); if (res != -1) { r[0] = *(uint32_t*)0x200000000080; r[1] = *(uint32_t*)0x200000000084; } break; case 1: // syz_mount_image$udf arguments: [ // fs: ptr[in, buffer] { // buffer: {75 64 66 00} (length 0x4) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x14444 (8 bytes) // opts: ptr[in, fs_options[udf_options]] { // fs_options[udf_options] { // elems: array[fs_opt_elem[udf_options]] { // fs_opt_elem[udf_options] { // elem: union udf_options { // iocharset: fs_opt["iocharset", stringnoz[codepages_names]] { // name: buffer: {69 6f 63 68 61 72 73 65 74} (length 0x9) // eq: const = 0x3d (1 bytes) // val: buffer: {61 73 63 69 69} (length 0x5) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // noadinicb: buffer: {6e 6f 61 64 69 6e 69 63 62} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // adinicb: buffer: {61 64 69 6e 69 63 62} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // uid_forget: buffer: {75 69 64 3d 66 6f 72 67 65 74} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // uid_forget: buffer: {75 69 64 3d 66 6f 72 67 65 74} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // umask: fs_opt["umask", fmt[oct, int32]] { // name: buffer: {75 6d 61 73 6b} (length 0x5) // eq: const = 0x3d (1 bytes) // val: int32 = 0x2 (23 bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // longad: buffer: {6c 6f 6e 67 61 64} (length 0x6) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // gid: fs_opt["gid", fmt[dec, gid]] { // name: buffer: {67 69 64} (length 0x3) // eq: const = 0x3d (1 bytes) // val: gid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // nostrict: buffer: {6e 6f 73 74 72 69 63 74} (length 0x8) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0xfe (1 bytes) // size: len = 0xc22 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xc22) // } // ] // returns fd_dir memcpy((void*)0x200000000100, "udf\000", 4); memcpy((void*)0x200000000f00, "./file0\000", 8); memcpy((void*)0x200000000f40, "iocharset", 9); *(uint8_t*)0x200000000f49 = 0x3d; memcpy((void*)0x200000000f4a, "ascii", 5); *(uint8_t*)0x200000000f4f = 0x2c; memcpy((void*)0x200000000f50, "noadinicb", 9); *(uint8_t*)0x200000000f59 = 0x2c; memcpy((void*)0x200000000f5a, "adinicb", 7); *(uint8_t*)0x200000000f61 = 0x2c; memcpy((void*)0x200000000f62, "uid=forget", 10); *(uint8_t*)0x200000000f6c = 0x2c; memcpy((void*)0x200000000f6d, "uid=forget", 10); *(uint8_t*)0x200000000f77 = 0x2c; memcpy((void*)0x200000000f78, "umask", 5); *(uint8_t*)0x200000000f7d = 0x3d; sprintf((char*)0x200000000f7e, "%023llo", (long long)2); *(uint8_t*)0x200000000f95 = 0x2c; memcpy((void*)0x200000000f96, "longad", 6); *(uint8_t*)0x200000000f9c = 0x2c; memcpy((void*)0x200000000f9d, "gid", 3); *(uint8_t*)0x200000000fa0 = 0x3d; sprintf((char*)0x200000000fa1, "%020llu", (long long)0); *(uint8_t*)0x200000000fb5 = 0x2c; memcpy((void*)0x200000000fb6, "nostrict", 8); *(uint8_t*)0x200000000fbe = 0x2c; *(uint8_t*)0x200000000fbf = 0; memcpy( (void*)0x2000000002c0, "\x78\x9c\xec\xdd\x41\x6c\x1c\xd7\x7d\x07\xe0\xff\x1b\x2d\x45\x4a\x6e" "\x2b\x26\x4e\x54\xbb\x8d\xdb\x4d\x5b\xa4\x32\x63\xb9\xb2\xa4\x98\x8a" "\x55\xb8\xab\x9a\x66\x1b\x40\x96\x89\x50\xcc\x2d\x00\x57\xe4\x4a\x5d" "\x98\x22\x09\x92\x6a\x64\x23\x6d\x98\x5e\x7a\xe8\x21\x40\x51\xf4\x90" "\x13\x81\xd6\x28\x90\xa2\x81\xd1\x14\x41\x8f\x6c\xeb\x02\xc9\xc5\x87" "\x22\xa7\x9e\x88\x16\x36\x82\xa2\x07\xb6\x08\x90\x53\xc0\x60\x66\xdf" "\x8a\x4b\x8a\xb2\x68\x53\xa4\x28\xfb\xfb\x6c\xea\x37\x3b\xf3\xde\xcc" "\x7b\x33\xeb\x19\x59\xd0\x9b\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x40\xc4\xef\xbf\x7c\xe9\xcc\x73\xe9\x61\xb7\x02" "\x00\x38\x48\x57\xc6\xbf\x7c\xe6\xac\xe7\x3f\x00\x7c\xac\x5c\xf5\xff" "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\xd8\xa5\x28\xe2" "\xf1\x48\x31\x7f\x65\x3d\x4d\x56\x9f\x3b\x06\x2e\xb7\x67\x6f\xdd\x9e" "\x18\x19\xdd\xb9\xda\xb1\x54\xd5\x3c\x52\x95\x2f\x7f\x06\x9e\x3b\x7b" "\xee\xfc\x17\x9e\x1f\xbe\xd0\xcd\xf7\xaf\xff\xa0\x3d\x19\xaf\x8e\x5f" "\xbd\x54\x7f\x69\xee\xe6\xfc\x42\x6b\x71\xb1\x35\x5d\x9f\x98\x6d\x4f" "\xcd\x4d\xb7\x76\xbd\x87\xbd\xd6\xdf\x6e\xa8\x3a\x01\xf5\x9b\xaf\xdd" "\x9a\xbe\x7e\x7d\xb1\x7e\xf6\xd9\x73\x5b\x36\xdf\x1e\x7c\xaf\xff\xb1" "\x93\x83\x17\x87\x9f\x3e\xfd\x54\xb7\xec\xc4\xc8\xe8\xe8\x78\x4f\x99" "\x5a\xdf\x87\x3e\xfa\x5d\xee\x35\xc2\xe3\x68\x14\x71\x3a\x52\x3c\xf3" "\xdd\x1f\xa7\x66\x44\x14\xb1\xf7\x73\x71\x9f\xef\xce\x7e\x3b\x56\x75" "\x62\xa8\xea\xc4\xc4\xc8\x68\xd5\x91\x99\x76\x73\x76\xa9\xdc\x38\xd6" "\x3d\x11\x45\x44\xbd\xa7\x52\xa3\x7b\x8e\x0e\xe0\x5a\xec\x49\x23\x62" "\xb9\x6c\x7e\xd9\xe0\xa1\xb2\x7b\xe3\xf3\xcd\x85\xe6\xb5\x99\x56\x7d" "\xac\xb9\xb0\xd4\x5e\x6a\xcf\xcd\x8e\xa5\x4e\x6b\xcb\xfe\xd4\xa3\x88" "\x0b\x29\x62\x25\x22\xd6\xfa\xef\xde\x5d\x5f\x14\x51\x8b\x14\xdf\x3e" "\xb1\x9e\xae\x45\xc4\x91\xee\x79\xf8\x7c\x35\x30\xf8\xde\xed\x28\xf6" "\xb1\x8f\xbb\x50\xb6\xb3\xde\x17\xb1\x52\x3c\x02\xd7\xec\x10\xeb\x8f" "\x22\x5e\x89\x14\x3f\x79\xbb\x88\xa9\xf2\x9c\xe5\x9f\xf8\x5c\xc4\x2b" "\x65\x7e\x3f\xe2\xcd\x32\x5f\x8c\x48\xe5\x17\xe3\x7c\xc4\xbb\x3b\x7c" "\x8f\x78\x34\xd5\xa2\x88\xbf\x28\xaf\xff\xc5\xf5\x34\x1d\x11\x1b\x27" "\x3a\xeb\x47\xeb\x97\xbf\x52\xff\xd2\xec\xf5\xb9\x9e\xb2\xdd\xfb\xca" "\x23\xff\x7c\x38\x48\x87\xfc\xde\x34\x10\x45\x34\xab\x3b\xfe\x7a\xfa" "\xf0\xbf\xd9\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0" "\x41\x3b\x16\x45\x3c\x19\x29\x5e\xfe\x8f\x3f\xae\xc6\x15\x47\x35\x2e" "\xfd\xc4\xc5\xe1\x3f\x18\xfc\xc5\xde\x31\xe3\x4f\xdc\x67\x3f\x65\xd9" "\x67\x23\x62\xb9\xd8\xdd\x98\xdc\xa3\x79\x08\xf1\x58\x1a\x4b\xe9\x21" "\x8f\x25\xfe\x38\x1b\x88\x22\xfe\x24\x8f\xff\xfb\xe6\xc3\x6e\x0c\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc7\x5a\x11" "\x3f\x8a\x14\x2f\xbc\x73\x2a\xad\x44\xef\x9c\xe2\xed\xd9\x1b\xf5\xab" "\xcd\x6b\x33\x9d\x59\x61\xbb\x73\xff\x76\xe7\x4c\xdf\xd8\xd8\xd8\xa8" "\xa7\x4e\x36\x72\x4e\xe6\x5c\xce\xb9\x92\x73\x35\xe7\x5a\xce\x28\x72" "\xfd\x9c\x8d\x9c\x93\x39\x97\x73\xae\xe4\x5c\xcd\xb9\x96\x33\x8e\xe4" "\xfa\x39\x1b\x39\x27\x73\x2e\xe7\x5c\xc9\xb9\x9a\x73\x2d\x67\xd4\x72" "\xfd\x9c\x8d\x9c\x93\x39\x97\x73\xae\xe4\x5c\xcd\xb9\x96\x33\x0e\xc9" "\xdc\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x25" "\x45\x14\xf1\xb3\x48\xf1\xad\xaf\xad\xa7\x48\x11\xd1\x88\x98\x8c\x4e" "\xae\xf6\x77\xcb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x0f\x53\x7f\x2a\xe2\x7b\x91\xa2\xfe\x87\x8d\x3b\xeb\x6a\x11\x91" "\xaa\x7f\x3b\x4e\x95\xbf\x9c\x8f\xc6\xd1\x32\x3f\x19\x8d\xe1\x32\x5f" "\x8c\xc6\xa5\x9c\xcd\x2a\x6b\x8d\x6f\xde\xf7\x68\x69\x5f\xfa\xc0\x87" "\xd7\x97\x8a\xf8\x61\xa4\xe8\x1f\x78\xeb\xce\xd5\xc9\xd7\xbf\xaf\xf3" "\x69\xf3\x9a\xbd\xf9\xf5\xcd\x4f\xbf\x52\xeb\xe4\x91\xee\xc6\xc1\xf7" "\xfa\x1f\x3b\x79\xe2\xe2\xf0\xe8\xaf\x3d\x71\xaf\xe5\x1d\xaf\xfe\xd0" "\xe5\xf6\xec\xad\xdb\xf5\x89\x91\xd1\xd1\xf1\x9e\xd5\xb5\x7c\xf4\x4f" "\xf6\xac\x1b\xcc\xc7\x2d\x1e\x4c\xd7\x89\x88\xc5\xd7\xdf\x78\xad\x39" "\x33\xd3\x5a\xb0\xf0\xf1\x58\xa8\x75\x16\x6a\x71\x48\xda\x73\x50\x0b" "\xf9\x7e\x15\x87\xa5\x3d\xdb\x17\x1a\x87\xa3\x19\x9b\x0b\x0f\xf9\xc6" "\xc4\x81\x28\x9f\xff\xef\x46\x8a\xdf\x79\xe7\x3f\xbb\x0f\xfc\xee\xf3" "\xff\x17\x3a\x9f\xee\x3c\xe1\xe3\xa7\x7f\xba\xf9\xfc\x7f\x61\xfb\x8e" "\xf6\xe9\xf9\xff\x78\xcf\xba\x17\xf2\xef\x46\xfa\x6a\x11\x03\x4b\x37" "\xe7\xfb\x4e\x46\x0c\x2c\xbe\xfe\xc6\xe9\xf6\xcd\xe6\x8d\xd6\x8d\xd6" "\xec\xf9\x33\x67\xbe\x38\x3c\xfc\xc5\x73\x67\xfa\x8e\x46\x0c\x5c\x6f" "\xcf\xb4\x7a\x96\xf6\x7c\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x0e\x56\x2a\xe2\xf7\x22\x45\xf3\x87\xeb\xa9\x1e\x11\xb7" "\xab\xf1\x5a\x83\x17\x87\x9f\x3e\xfd\xd4\x91\x38\x52\x8d\xb7\xda\x32" "\x6e\xeb\xd5\xf1\xab\x97\xea\x2f\xcd\xdd\x9c\x5f\x68\x2d\x2e\xb6\xa6" "\xeb\x13\xb3\xed\xa9\xb9\xe9\xd6\x6e\x0f\x37\x50\x0d\xf7\x9a\x18\x19" "\xdd\x97\xce\xdc\xd7\xb1\x7d\x6e\xff\xb1\x81\x97\xe6\xe6\x5f\x5f\x68" "\xdf\xf8\xa3\xa5\x1d\xb7\x1f\x1f\xb8\x74\x6d\x71\x69\xa1\x39\xb5\xf3" "\xe6\x38\x16\x45\x44\xa3\x77\xcd\x50\xd5\xe0\x89\x91\xd1\xaa\xd1\x33" "\xed\xe6\x6c\x55\x75\xec\x01\xbd\x4a\xa1\x2f\x15\xf1\x5f\x91\x62\xea" "\x7c\x3d\x7d\x36\xaf\xcb\xe3\xff\xb6\x8f\xf0\xdf\x32\xfe\x7f\x79\xfb" "\x8e\xf6\x69\xfc\xdf\x27\x7a\xd6\x95\xc7\x4c\xa9\x88\x9f\x46\x8a\xdf" "\xfe\xcb\x27\xe2\xb3\x55\x3b\x8f\xc7\x5d\xe7\x2c\x97\xfb\xdb\x48\x31" "\x74\xe1\x33\xb9\x5c\x1c\x2d\xcb\x75\xdb\xd0\x79\xaf\x40\x67\x64\x60" "\x59\xf6\xff\x22\xc5\x3f\xfe\x6c\x6b\xd9\xee\x78\xc8\xc7\x37\xcb\x3e" "\xb7\xeb\x13\xfb\x88\x28\xaf\xff\x89\x48\xf1\xbd\x3f\xff\x4e\xfc\x46" "\x5e\xb7\xf5\xfd\x0f\x3b\x5f\xff\xe3\xdb\x77\xb4\x4f\xd7\xff\x53\x3d" "\xeb\x8e\x6f\x79\x5f\xc1\x9e\xbb\x4e\xbe\xfe\xa7\x23\xc5\x8b\x8f\xbf" "\x15\xbf\x99\xd7\xbd\xdf\xfb\x3f\x8a\xd8\xd8\xd8\xf8\x46\xc4\xa9\x5c" "\xf8\xce\xfb\x39\xf6\xe9\xfa\x7f\xba\x67\xdd\x60\x74\x8e\xfb\x5b\x0f" "\xae\xfb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\xac\xbe\x54\xc4\xdf" "\x45\x8a\xa7\x46\x6b\xe9\xf9\xbc\x6e\x37\x7f\xff\x6f\x7a\xfb\x8e\xf6" "\xe9\xef\x7f\xfd\x72\xcf\xba\xe9\x03\x9a\xaf\x68\xcf\x27\x15\x00\x00" "\x00\x00\x0e\x89\xbe\x54\xc4\x8f\x22\xc5\x8d\xa5\xb7\xee\x8c\xa1\xde" "\x3a\xfe\xbb\x67\xfc\xe7\xef\x6e\xce\xbd\x3e\x92\xb6\x6d\xad\xfe\x9c" "\xef\x97\xaa\xf7\x06\x3c\xc8\x3f\xff\xeb\x35\x98\x8f\x3b\xb9\xf7\x6e" "\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xa1" "\x92\x52\x11\xcf\xe7\xf9\xd4\x27\xef\x33\x9f\xfa\x6a\xa4\x78\xf9\x7f" "\x9e\xc9\xe5\xd2\xc9\xb2\x5c\x77\x1e\xf8\xc1\xea\xd7\x81\x2b\x73\xb3" "\xa7\x2f\xcd\xcc\xcc\x4d\x35\x97\x9a\xd7\x66\x5a\xf5\xf1\xf9\xe6\x54" "\xab\xac\xfb\xa9\x48\xb1\xfe\x37\x9f\xc9\x75\x8b\x6a\x7e\xf5\xee\x7c" "\xf3\x9d\x39\xde\x07\x36\xba\x73\xb1\x2f\x44\x8a\xd1\xbf\xef\x96\xed" "\xcc\xc5\xde\x9d\x9b\xbc\x33\x1f\x78\x67\x2e\xf6\xb2\xec\x27\x22\xc5" "\x7f\xff\xc3\xd6\xb2\xdd\x79\xac\x3f\xbd\x59\xf6\x6c\x59\xf6\xaf\x23" "\xc5\x57\xff\x79\xe7\xb2\x27\x37\xcb\x9e\x2b\xcb\x7e\x27\x52\xfc\xe0" "\xab\xf5\x6e\xd9\xe3\x65\xd9\xee\xfb\x51\x3b\xef\x24\x1d\xa8\xc5\x4c" "\xeb\xd9\xa9\xb9\x99\xbb\x5e\x85\x0a\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x1f\x54\x5f\x2a\xe2\xcf\x22\xc5\xff\xde" "\x5c\x89\xe5\x3c\xec\x3f\xcf\xff\xdf\x9d\x81\xbf\xd6\x2d\xfb\xe6\xd7" "\x7b\xe6\xfb\xdf\xe6\x76\x35\xcf\xff\x60\x35\xff\xff\xbd\x96\x3f\xcc" "\xfc\xff\x83\x0f\xac\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xf0\xe8\x48\x51\xc4\x1b\x91\x62\xfe\xca\x7a\x5a\xed\x2f" "\x3f\x77\x0c\x5c\x6e\xcf\xde\xba\x3d\x31\x32\xba\x73\xb5\x63\xa9\xaa" "\x79\xa4\x2a\x5f\xfe\x0c\x3c\x77\xf6\xdc\xf9\x2f\x3c\x3f\x7c\xa1\x9b" "\xef\x5f\xff\x41\x7b\x32\x5e\x1d\xbf\x7a\xa9\xfe\xd2\xdc\xcd\xf9\x85" "\xd6\xe2\x62\x6b\xba\x3e\x31\xdb\x9e\x9a\x9b\x6e\xed\x7a\x0f\x7b\xad" "\xbf\x79\xea\x3a\x86\xaa\x13\x50\xbf\xf9\xda\xad\xe9\xeb\xd7\x17\xeb" "\x67\x9f\x3d\xb7\x65\xf3\xed\xc1\xf7\xfa\x1f\x3b\x39\x78\x71\xf8\xe9" "\xd3\x4f\x75\xcb\x4e\x8c\x8c\x8e\x8e\xf7\x94\xa9\xf5\x7d\x80\xa3\x7f" "\xa0\xc6\x6d\x3a\x1a\x45\xfc\x55\xa4\x78\xe6\xbb\x3f\x4e\xff\xd2\x1f" "\x51\xc4\xde\xcf\xc5\x7d\xbe\x3b\xfb\xed\x58\xd5\x89\xa1\xaa\x13\x13" "\x23\xa3\x55\x47\x66\xda\xcd\xd9\xa5\x72\xe3\x58\xf7\x44\x14\x11\xf5" "\x9e\x4a\x8d\xee\x39\x3a\x80\x6b\xb1\x27\x8d\x88\xe5\xb2\xf9\x65\x83" "\x87\xca\xee\x8d\xcf\x37\x17\x9a\xd7\x66\x5a\xf5\xb1\xe6\xc2\x52\x7b" "\xa9\x3d\x37\x3b\x96\x3a\xad\x2d\xfb\x53\x8f\x22\x2e\xa4\x88\x95\x88" "\x58\xeb\xbf\x7b\x77\x7d\x51\xc4\x6b\x91\xe2\xdb\x27\xd6\xd3\xbf\xf6" "\x47\x1c\xe9\x9e\x87\xcf\x5f\x19\xff\xf2\x99\xb3\xf7\x6e\x47\xb1\x8f" "\x7d\xdc\x85\xb2\x9d\xf5\xbe\x88\x95\xe2\x11\xb8\x66\x87\x58\x7f\x14" "\xf1\x4f\x91\xe2\x27\x6f\x9f\x8a\x7f\xeb\x8f\xa8\x45\xe7\x27\x3e\x17" "\xf1\x4a\x99\xdf\x8f\x78\xb3\xcc\x17\x23\x52\x8a\xd8\xf8\x46\xc4\xbb" "\x3b\x7c\x8f\x78\x34\xd5\xa2\x88\xff\x2f\xaf\xff\xc5\xf5\xf4\x76\x7f" "\x79\x3f\xe8\xde\x57\x2e\x7f\xa5\xfe\xa5\xd9\xeb\x73\x3d\x65\xbb\xf7" "\x95\x5d\x3d\x1f\x7e\xfd\xde\xc7\x7c\xe8\xcf\x87\x83\x74\xc8\xef\x4d" "\x03\x51\xc4\x0f\xaa\x3b\xfe\x7a\xfa\x77\xff\x5d\x03\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x22\x45\xfc\x6a\xa4\x78\xe1\x9d" "\x53\xa9\x1a\x1f\x7c\x67\x4c\x71\x7b\xf6\x46\xfd\x6a\xf3\xda\x4c\x67" "\x58\x5f\x77\xec\x5f\x77\xcc\xf4\xc6\xc6\xc6\x46\x3d\x75\xb2\x91\x73" "\x32\xe7\x72\xce\x95\x9c\xab\x39\xd7\x72\x46\x91\xeb\xe7\x6c\xe4\x9c" "\xcc\xb9\x9c\x73\x25\xe7\x6a\xce\xb5\x9c\x71\x24\xd7\xcf\xd9\xc8\x39" "\x99\x73\x39\xe7\x4a\xce\xd5\x9c\x6b\x39\xa3\x96\xeb\xe7\x6c\xe4\x9c" "\xcc\xb9\x9c\x73\x25\xe7\x6a\xce\xb5\x9c\x71\x48\xc6\xee\x01\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x2d\x45\xf5\x4f" "\x8a\x6f\x7d\x6d\x3d\x6d\xf4\x77\xe6\x97\x9e\x8c\x4e\xae\x9a\x0f\xf4" "\x23\xef\xe7\x01\x00\x00\xff\xff\x37\x80\xfe\xbb", 3106); syz_mount_image( /*fs=*/0x200000000100, /*dir=*/0x200000000f00, /*flags=MS_POSIXACL|MS_REC|MS_NODEV|MS_NOATIME|0x40*/ 0x14444, /*opts=*/0x200000000f40, /*chdir=*/0xfe, /*size=*/0xc22, /*img=*/0x2000000002c0); break; case 2: // setrlimit arguments: [ // res: rlimit_type = 0x1 (8 bytes) // rlim: ptr[in, rlimit] { // rlimit { // soft: intptr = 0xffffffffffffffff (8 bytes) // hard: intptr = 0xffffffffffffffff (8 bytes) // } // } // ] *(uint64_t*)0x200000000140 = -1; *(uint64_t*)0x200000000148 = -1; syscall(__NR_setrlimit, /*res=RLIMIT_FSIZE*/ 1ul, /*rlim=*/0x200000000140ul); break; case 3: // truncate arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // len: intptr = 0x20fffffffc (8 bytes) // ] memcpy((void*)0x200000000000, "./file1\000", 8); syscall(__NR_truncate, /*file=*/0x200000000000ul, /*len=*/0x20fffffffcul); break; case 4: // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x105042 (4 bytes) // mode: open_mode = 0x189 (2 bytes) // ] // returns fd memcpy((void*)0x200000000180, "./file1\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000180ul, /*flags=O_SYNC|O_DIRECT|O_CREAT|O_RDWR*/ 0x105042, /*mode=S_IXOTH|S_IXGRP|S_IWUSR|S_IRUSR*/ 0x189); if (res != -1) r[2] = res; break; case 5: // mmap arguments: [ // addr: VMA[0x600000] // len: len = 0x600000 (8 bytes) // prot: mmap_prot = 0x27ffff7 (8 bytes) // flags: mmap_flags = 0x4012011 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x600000ul, /*prot=PROT_GROWSUP|PROT_WRITE|PROT_READ|PROT_EXEC|0x7ffff0*/ 0x27ffff7ul, /*flags=MAP_UNINITIALIZED|MAP_NONBLOCK|MAP_LOCKED|MAP_FIXED|0x1*/ 0x4012011ul, /*fd=*/r[2], /*offset=*/0ul); break; case 6: // sendmmsg$unix arguments: [ // fd: sock_unix (resource) // mmsg: ptr[in, array[send_mmsghdr_un]] { // array[send_mmsghdr_un] { // } // } // vlen: len = 0x318 (8 bytes) // f: send_flags = 0x0 (8 bytes) // ] syscall(__NR_sendmmsg, /*fd=*/r[1], /*mmsg=*/0x2000000bd000ul, /*vlen=*/0x318ul, /*f=*/0ul); break; case 7: // recvmmsg arguments: [ // fd: sock (resource) // mmsg: ptr[in, array[recv_mmsghdr]] { // array[recv_mmsghdr] { // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: ptr[out, sockaddr_storage] { // union sockaddr_storage { // isdn: sockaddr_mISDN { // family: const = 0x22 (2 bytes) // dev: int8 = 0x0 (1 bytes) // channel: int8 = 0x0 (1 bytes) // sapi: int8 = 0x0 (1 bytes) // tei: int8 = 0x0 (1 bytes) // } // } // } // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, array[iovec[out, array[int8]]]] { // array[iovec[out, array[int8]]] { // } // } // msg_iovlen: len = 0x0 (8 bytes) // msg_control: nil // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0x8d (4 bytes) // pad = 0x0 (4 bytes) // } // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: ptr[out, sockaddr_storage] { // union sockaddr_storage { // hci: sockaddr_hci { // hci_family: const = 0x1f (2 bytes) // hci_dev: int16 = 0x0 (2 bytes) // hci_channel: bt_hci_chan = 0x0 (2 bytes) // } // } // } // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, array[iovec[out, array[int8]]]] { // array[iovec[out, array[int8]]] { // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // } // } // msg_iovlen: len = 0x0 (8 bytes) // msg_control: nil // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0x86f7 (4 bytes) // pad = 0x0 (4 bytes) // } // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: ptr[out, sockaddr_storage] { // union sockaddr_storage { // can: sockaddr_can { // can_family: const = 0x1d (2 bytes) // pad = 0x0 (2 bytes) // can_ifindex: ifindex_vcan (resource) // rx_id: const = 0x0 (4 bytes) // tx_id: const = 0x0 (4 bytes) // } // } // } // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, array[iovec[out, array[int8]]]] { // array[iovec[out, array[int8]]] { // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // } // } // msg_iovlen: len = 0x0 (8 bytes) // msg_control: ptr[out, buffer] { // buffer: (DirOut) // } // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0xffff (4 bytes) // pad = 0x0 (4 bytes) // } // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: ptr[out, sockaddr_storage] { // union sockaddr_storage { // generic: sockaddr_storage_generic { // sa_family: socket_domain = 0x0 (2 bytes) // sa_data: buffer: (DirOut) // } // } // } // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, array[iovec[out, array[int8]]]] { // array[iovec[out, array[int8]]] { // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // } // } // msg_iovlen: len = 0x0 (8 bytes) // msg_control: ptr[out, buffer] { // buffer: (DirOut) // } // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0xa5 (4 bytes) // pad = 0x0 (4 bytes) // } // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: ptr[out, sockaddr_storage] { // union sockaddr_storage { // l2tp6: sockaddr_l2tpip6 { // l2tp_family: const = 0xa (2 bytes) // l2tp_unused: const = 0x0 (2 bytes) // l2tp_flowinfo: int32be = 0x0 (4 bytes) // l2tp_addr: union ipv6_addr { // empty: ipv6_addr_empty { // a0: buffer: (DirOut) // } // } // l2tp_scope_id: int32 = 0x0 (4 bytes) // l2tp_conn_id: int32 = 0x0 (4 bytes) // } // } // } // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, array[iovec[out, array[int8]]]] { // array[iovec[out, array[int8]]] { // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x0 (8 bytes) // } // } // } // msg_iovlen: len = 0x0 (8 bytes) // msg_control: ptr[out, buffer] { // buffer: (DirOut) // } // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0x10 (4 bytes) // pad = 0x0 (4 bytes) // } // } // } // vlen: len = 0x10133 (8 bytes) // f: recv_flags = 0x2 (8 bytes) // timeout: nil // ] *(uint64_t*)0x200000003200 = 0x2000000000c0; *(uint32_t*)0x200000003208 = 0; *(uint64_t*)0x200000003210 = 0x200000000000; *(uint64_t*)0x200000003218 = 0; *(uint64_t*)0x200000003220 = 0; *(uint64_t*)0x200000003228 = 0; *(uint32_t*)0x200000003230 = 0; *(uint32_t*)0x200000003238 = 0x8d; *(uint64_t*)0x200000003240 = 0x200000000280; *(uint32_t*)0x200000003248 = 0; *(uint64_t*)0x200000003250 = 0x200000000680; *(uint64_t*)0x200000000680 = 0x200000000500; *(uint64_t*)0x200000000688 = 0; *(uint64_t*)0x200000000690 = 0x200000000600; *(uint64_t*)0x200000000698 = 0; *(uint64_t*)0x2000000006a0 = 0x200000000140; *(uint64_t*)0x2000000006a8 = 0; *(uint64_t*)0x200000003258 = 0; *(uint64_t*)0x200000003260 = 0; *(uint64_t*)0x200000003268 = 0; *(uint32_t*)0x200000003270 = 0; *(uint32_t*)0x200000003278 = 0x86f7; *(uint64_t*)0x200000003280 = 0x2000000006c0; *(uint32_t*)0x200000003288 = 0; *(uint64_t*)0x200000003290 = 0x200000002b80; *(uint64_t*)0x200000002b80 = 0x200000000740; *(uint64_t*)0x200000002b88 = 0; *(uint64_t*)0x200000002b90 = 0x200000000780; *(uint64_t*)0x200000002b98 = 0; *(uint64_t*)0x200000002ba0 = 0x200000001780; *(uint64_t*)0x200000002ba8 = 0; *(uint64_t*)0x200000002bb0 = 0x200000001840; *(uint64_t*)0x200000002bb8 = 0; *(uint64_t*)0x200000002bc0 = 0x2000000018c0; *(uint64_t*)0x200000002bc8 = 0; *(uint64_t*)0x200000002bd0 = 0x2000000019c0; *(uint64_t*)0x200000002bd8 = 0; *(uint64_t*)0x200000002be0 = 0x200000001ac0; *(uint64_t*)0x200000002be8 = 0; *(uint64_t*)0x200000002bf0 = 0x200000002ac0; *(uint64_t*)0x200000002bf8 = 0; *(uint64_t*)0x200000003298 = 0; *(uint64_t*)0x2000000032a0 = 0x200000002c00; *(uint64_t*)0x2000000032a8 = 0; *(uint32_t*)0x2000000032b0 = 0; *(uint32_t*)0x2000000032b8 = 0xffff; *(uint64_t*)0x2000000032c0 = 0x200000002cc0; *(uint32_t*)0x2000000032c8 = 0; *(uint64_t*)0x2000000032d0 = 0x200000000000; *(uint64_t*)0x200000000000 = 0x200000000380; *(uint64_t*)0x200000000008 = 0; *(uint64_t*)0x2000000032d8 = 0; *(uint64_t*)0x2000000032e0 = 0x200000002e00; *(uint64_t*)0x2000000032e8 = 0; *(uint32_t*)0x2000000032f0 = 0; *(uint32_t*)0x2000000032f8 = 0xa5; *(uint64_t*)0x200000003300 = 0x200000002f00; *(uint32_t*)0x200000003308 = 0; *(uint64_t*)0x200000003310 = 0x200000003100; *(uint64_t*)0x200000003100 = 0x200000002f80; *(uint64_t*)0x200000003108 = 0; *(uint64_t*)0x200000003110 = 0x200000003040; *(uint64_t*)0x200000003118 = 0; *(uint64_t*)0x200000003318 = 0; *(uint64_t*)0x200000003320 = 0x200000003140; *(uint64_t*)0x200000003328 = 0; *(uint32_t*)0x200000003330 = 0; *(uint32_t*)0x200000003338 = 0x10; syscall(__NR_recvmmsg, /*fd=*/r[0], /*mmsg=*/0x200000003200ul, /*vlen=*/0x10133ul, /*f=MSG_PEEK*/ 2ul, /*timeout=*/0ul); 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; use_temporary_dir(); loop(); return 0; }