// 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 #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_pwrite64 #define __NR_pwrite64 68 #endif #ifndef __NR_read #define __NR_read 63 #endif static unsigned long long procid; 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_RDONLY); 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) { if (chdir(target) == -1) { err = errno; close(res); res = -1; } } error_clear_loop: if (need_loop_device) reset_loop_device(loopname); errno = err; return res; } static void setup_gadgetfs(); static void setup_binderfs(); static void setup_fusectl(); static void sandbox_common_mount_tmpfs(void) { write_file("/proc/sys/fs/mount-max", "100000"); if (mkdir("./syz-tmp", 0777)) exit(1); if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot", 0777)) exit(1); if (mkdir("./syz-tmp/newroot/dev", 0700)) exit(1); unsigned bind_mount_flags = MS_BIND | MS_REC | MS_PRIVATE; if (mount("/dev", "./syz-tmp/newroot/dev", NULL, bind_mount_flags, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/proc", 0700)) exit(1); if (mount("syz-proc", "./syz-tmp/newroot/proc", "proc", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/selinux", 0700)) exit(1); const char* selinux_path = "./syz-tmp/newroot/selinux"; if (mount("/selinux", selinux_path, NULL, bind_mount_flags, NULL)) { if (errno != ENOENT) exit(1); if (mount("/sys/fs/selinux", selinux_path, NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); } if (mkdir("./syz-tmp/newroot/sys", 0700)) exit(1); if (mount("/sys", "./syz-tmp/newroot/sys", 0, bind_mount_flags, NULL)) exit(1); if (mount("/sys/kernel/debug", "./syz-tmp/newroot/sys/kernel/debug", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/sys/fs/smackfs", "./syz-tmp/newroot/sys/fs/smackfs", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/proc/sys/fs/binfmt_misc", "./syz-tmp/newroot/proc/sys/fs/binfmt_misc", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/newroot/syz-inputs", 0700)) exit(1); if (mount("/syz-inputs", "./syz-tmp/newroot/syz-inputs", NULL, bind_mount_flags | MS_RDONLY, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/pivot", 0777)) exit(1); if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { if (chdir("./syz-tmp")) exit(1); } else { if (chdir("/")) exit(1); if (umount2("./pivot", MNT_DETACH)) exit(1); } if (chroot("./newroot")) exit(1); if (chdir("/")) exit(1); setup_gadgetfs(); setup_binderfs(); setup_fusectl(); } static void setup_gadgetfs() { if (mkdir("/dev/gadgetfs", 0777)) { } if (mount("gadgetfs", "/dev/gadgetfs", "gadgetfs", 0, NULL)) { } } static void setup_fusectl() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void setup_binderfs() { if (mkdir("/dev/binderfs", 0777)) { } if (mount("binder", "/dev/binderfs", "binder", 0, "stats=global")) { if (mount("binder", "/dev/binderfs", "binder", 0, NULL)) { } } if (symlink("/dev/binderfs", "./binderfs")) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); if (getppid() == 1) exit(1); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 128 << 20; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } static int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static void drop_caps(void) { struct __user_cap_header_struct cap_hdr = {}; struct __user_cap_data_struct cap_data[2] = {}; cap_hdr.version = _LINUX_CAPABILITY_VERSION_3; cap_hdr.pid = getpid(); if (syscall(SYS_capget, &cap_hdr, &cap_data)) exit(1); const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE); cap_data[0].effective &= ~drop; cap_data[0].permitted &= ~drop; cap_data[0].inheritable &= ~drop; if (syscall(SYS_capset, &cap_hdr, &cap_data)) exit(1); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); sandbox_common_mount_tmpfs(); loop(); exit(1); } uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void loop(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$udf arguments: [ // fs: ptr[in, buffer] { // buffer: {75 64 66 00} (length 0x4) // } // dir: ptr[in, buffer] { // buffer: {13 13 77 c5 fc 35 d4 14 54 d5 d4 1d 29 ad 1a 60 29 59 81 46 // e6 be 16 6e 41 ad 0d bd 40 54 03 3c 9f 33 bb da 82 24 a2 f3 d7 72 e7 // 63 6e 48 b3 3c bf 70 83 72 e8 f1 b9 93 3e c5 12 77 43 be 22 06 20 9e // f0 2d f9 cb f2 f6 e8 80 d3 38 2f 00} (length 0x4e) // } // flags: mount_flags = 0x8002 (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 { // undelete: buffer: {75 6e 64 65 6c 65 74 65} (length 0x8) // } // 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) // } // 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 { // utf8: buffer: {75 74 66 38} (length 0x4) // } // 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) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // gid_forget: buffer: {67 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 { // longad: buffer: {6c 6f 6e 67 61 64} (length 0x6) // } // comma: const = 0x2c (1 bytes) // } // 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: {63 70 31 32 35 31} (length 0x6) // } // } // comma: const = 0x2c (1 bytes) // } // 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: {63 70 31 32 35 30} (length 0x6) // } // } // comma: const = 0x2c (1 bytes) // } // 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: {69 73 6f 38 38 35 39 2d 33} (length 0x9) // } // } // comma: const = 0x2c (1 bytes) // } // 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: {6b 6f 69 38 2d 72 75} (length 0x7) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[udf_options] { // elem: union udf_options { // dmode: fs_opt["dmode", fmt[oct, int32]] { // name: buffer: {64 6d 6f 64 65} (length 0x5) // eq: const = 0x3d (1 bytes) // val: int32 = 0x5 (23 bytes) // } // } // 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 { // noadinicb: buffer: {6e 6f 61 64 69 6e 69 63 62} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0xc66 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xc66) // } // ] // returns fd_dir memcpy((void*)0x200000c0, "udf\000", 4); memcpy((void*)0x20000100, "\023\023w\305\3745\324\024T\325\324\035)\255\032`)" "Y\201F\346\276\026nA\255\r\275@T\003<\2373\273\332\202$" "\242\363\327r\347cnH\263<\277p\203r\350\361\271\223>" "\305\022wC\276\"\006 \236\360-\371\313\362\366\350\200\3238/\000", 78); memcpy((void*)0x200028c0, "undelete", 8); *(uint8_t*)0x200028c8 = 0x2c; memcpy((void*)0x200028c9, "nostrict", 8); *(uint8_t*)0x200028d1 = 0x2c; memcpy((void*)0x200028d2, "gid", 3); *(uint8_t*)0x200028d5 = 0x3d; sprintf((char*)0x200028d6, "%020llu", (long long)0); *(uint8_t*)0x200028ea = 0x2c; memcpy((void*)0x200028eb, "utf8", 4); *(uint8_t*)0x200028ef = 0x2c; memcpy((void*)0x200028f0, "nostrict", 8); *(uint8_t*)0x200028f8 = 0x2c; memcpy((void*)0x200028f9, "gid=forget", 10); *(uint8_t*)0x20002903 = 0x2c; memcpy((void*)0x20002904, "longad", 6); *(uint8_t*)0x2000290a = 0x2c; memcpy((void*)0x2000290b, "iocharset", 9); *(uint8_t*)0x20002914 = 0x3d; memcpy((void*)0x20002915, "cp1251", 6); *(uint8_t*)0x2000291b = 0x2c; memcpy((void*)0x2000291c, "iocharset", 9); *(uint8_t*)0x20002925 = 0x3d; memcpy((void*)0x20002926, "cp1250", 6); *(uint8_t*)0x2000292c = 0x2c; memcpy((void*)0x2000292d, "iocharset", 9); *(uint8_t*)0x20002936 = 0x3d; memcpy((void*)0x20002937, "iso8859-3", 9); *(uint8_t*)0x20002940 = 0x2c; memcpy((void*)0x20002941, "iocharset", 9); *(uint8_t*)0x2000294a = 0x3d; memcpy((void*)0x2000294b, "koi8-ru", 7); *(uint8_t*)0x20002952 = 0x2c; memcpy((void*)0x20002953, "dmode", 5); *(uint8_t*)0x20002958 = 0x3d; sprintf((char*)0x20002959, "%023llo", (long long)5); *(uint8_t*)0x20002970 = 0x2c; memcpy((void*)0x20002971, "uid=forget", 10); *(uint8_t*)0x2000297b = 0x2c; memcpy((void*)0x2000297c, "noadinicb", 9); *(uint8_t*)0x20002985 = 0x2c; *(uint8_t*)0x20002986 = 0; memcpy( (void*)0x20009140, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x7d\x07\xf0\xdf\x1b\xed\x8a\x2b\xb9\xad" "\x98\x38\x55\x9c\x34\x0e\x36\x6d\x91\xca\x8a\xe5\xea\x5f\x4c\xc5\x2a\xdc" "\x55\x4d\xb3\x0d\x20\xcb\x42\x28\xe6\x16\x80\x2b\x91\x52\x17\xa6\x48\x82" "\xa4\x1a\xd9\x48\x5b\xa6\x97\x1e\x7a\x08\x50\x14\x3d\xe4\x44\xa0\x35\x0a" "\xa4\x68\x60\x34\x45\xd0\x23\xd3\xba\x40\x72\xf1\xa1\xc8\xa9\x27\xa2\x85" "\x8d\xa0\xe8\x81\x2d\x02\x04\x28\x1a\x6c\x31\xb3\x6f\xa5\x25\x45\xda\xb2" "\x44\x4a\x94\xfc\xf9\xd8\xd4\x77\x77\xe6\xbd\x99\xf7\x66\xd6\x33\x32\xb1" "\x6f\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\xbf" "\xf3\xf2\xb9\xe3\x27\xd2\x16\x2b\xf6\xdd\x4d\xed\x62\xe7\x1b\x04\x00\xec" "\xba\x0b\xe3\x5f\x39\x7e\x72\xab\xfb\x3f\x00\xf0\xd8\xba\xb4\xdd\xff\xff" "\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x45\x8a\x22\x9e\x8c" "\x14\xf3\x17\xd6\xd3\x64\xf5\xbe\xa7\x71\xbe\x53\xbf\x71\x73\x62\x74\x6c" "\xeb\x6a\x07\x52\x55\x73\x5f\x55\xbe\xfc\x69\x9c\x38\x79\xea\xf4\x17\x9f" "\x1f\x39\xd3\xcf\xf3\x9d\xd9\xf7\xa9\xbf\xd3\x3e\x1d\xaf\x8e\x5f\x3a\xd7" "\x7c\x69\xee\xfa\xfc\xc2\xf4\xe2\xe2\xf4\x54\x73\x62\xb6\x73\x65\x6e\x6a" "\xfa\xae\xb7\x70\xbf\xf5\x37\x3b\x5a\x1d\x80\xe6\xf5\xd7\x6e\x4c\x5d\xbd" "\xba\xd8\x3c\xf9\xdc\xa9\x0d\xab\x6f\x0e\xbf\x37\xf4\xc4\xe1\xe1\xb3\x23" "\xcf\x1c\x7b\xba\x5f\x76\x62\x74\x6c\x6c\xfc\x76\x91\xc6\x60\xf9\xda\x3d" "\x37\xa4\x67\xbb\x11\x1e\xfb\xa3\x88\x63\x91\xe2\xd9\xef\xfe\x24\xb5\xfb" "\x0f\x74\xb8\xcf\x63\xd1\x78\xb0\xe7\x7e\xb3\x03\x55\x27\x8e\x56\x9d\x98" "\x18\x1d\xab\x3a\x32\xd3\x69\xcf\x2e\x95\x2b\x2f\xf6\x0f\x44\x11\xd1\x1c" "\xa8\xd4\xea\x1f\xa3\xad\xcf\x45\xd4\xea\x0f\xb4\x0f\xdb\x6b\x45\x2c\x97" "\xcd\x2f\x1b\x7c\xb4\xec\xde\xf8\x7c\x7b\xa1\x7d\x79\x66\xba\x79\xb1\xbd" "\xb0\xd4\x59\xea\xcc\xcd\x5e\x4c\xbd\xd6\x96\xfd\x69\x46\x11\x67\x52\xc4" "\x4a\x44\xac\x0d\xdd\xb9\xb9\x7a\x14\x51\x8b\x14\xdf\x3e\xb4\x9e\x2e\xe7" "\xa7\x7e\x54\xc7\xe1\x0b\xd5\xc0\xe0\xed\xdb\xf1\x90\x9f\xfc\x51\xb6\xb3" "\x59\x8f\x58\x29\x1e\x81\x73\xb6\x87\x0d\x45\x11\xaf\x44\x8a\x9f\xbe\x7d" "\x24\xae\xe4\xeb\x4c\x75\xad\xf9\x7c\xc4\x2b\x65\x7e\x3f\xe2\xcd\x32\x5f" "\x8c\x48\xe5\x07\xe3\x74\xc4\xbb\x5b\x7c\x8e\x78\x34\xd5\xa2\x88\x3f\x2b" "\xcf\xff\xd9\xf5\x34\x55\x5d\x0f\xfa\xd7\x95\xf3\x5f\x6d\x7e\x79\xf6\xea" "\xdc\x40\xd9\xfe\x75\xe5\x43\xde\x1f\xee\xb8\x52\x3c\xa4\xfb\xc3\x81\x4d" "\xf9\x60\xec\xf1\x6b\x53\x23\x8a\x68\x57\x57\xfc\xf5\x74\xef\x7f\xd9\x01" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\xa7\x1d\x88\x22\x3e" "\x15\x29\x5e\xfe\xd7\x3f\xa8\xc6\x15\x47\x35\x2e\xfd\xd0\xd9\x91\xdf\x1d" "\xfe\xc5\xc1\x31\xe3\x4f\x7d\xc0\x76\xca\xb2\xcf\x45\xc4\x72\x71\x77\x63" "\x72\xf7\xe7\x81\x81\x17\xd3\xc5\x94\x1e\xf2\x58\xe2\x8f\xb2\x46\x14\xf1" "\x87\x79\xfc\xdf\x37\x1f\x76\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x3e\xd2\x8a\xf8\x71\xa4\xa1\x78\xe7\x48\x5a\x89\xc1" "\x39\xc5\x3b\xb3\xd7\x9a\x97\xda\x97\x67\x7a\xb3\xc2\xf6\xe7\xfe\xed\xcf" "\x99\xde\xed\x76\xbb\xcd\xd4\xcb\x56\xce\xc9\x9c\xcb\x39\x57\x72\xae\xe6" "\x5c\xcb\x19\x45\xae\x9f\xb3\x95\x73\x32\xe7\x72\xce\x95\x9c\xab\x39\xd7" "\x72\xc6\xbe\x5c\x3f\x67\x2b\xe7\x64\xce\xe5\x9c\x2b\x39\x57\x73\xae\xe5" "\x8c\x5a\xae\x9f\xb3\x95\xb3\x91\x73\x39\xe7\x4a\xce\xd5\x9c\x6b\x39\x63" "\x8f\xcc\xdd\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\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\x38\x29\xa2" "\x88\x9f\x47\x8a\x6f\x7d\x7d\x3d\x45\x8a\x88\x56\xc4\x64\xf4\x72\x75\xe8" "\x61\xb7\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x28\x0d\xa5\x22\xbe\x17\x29\x9a\xbf\xd7\xba\xb5\xac\x16" "\x11\xa9\xfa\xb7\xe7\x48\xf9\xc7\xe9\x68\xed\x2f\xf3\xe3\xd1\x1a\x29\xf3" "\xc5\x68\x9d\xcb\xd9\xae\xb2\xd6\xfa\xe6\x43\x68\x3f\xf7\xa7\x9e\x8a\xf8" "\x51\xa4\x18\x6a\xbc\x75\xeb\x84\xe7\xf3\x5f\xef\xbd\xbb\xf5\x31\x88\x37" "\xbf\x71\xfb\xdd\xa7\x6b\xbd\xdc\xd7\x5f\x39\xfc\xde\xd0\x13\x87\x0f\x9d" "\x1d\x19\xfb\xec\x53\xdb\xbd\x4e\x5b\x35\xe0\xe8\xf9\xce\xec\x8d\x9b\xcd" "\x89\xd1\xb1\xb1\xf1\x81\xc5\xb5\xbc\xf7\x8f\x0f\x2c\x1b\xce\xfb\x2d\x76" "\xa6\xeb\x44\xc4\xe2\xeb\x6f\xbc\xd6\x9e\x99\x99\x5e\xb8\xf7\x17\xe5\x47" "\xe0\x1e\xab\xf7\xcf\xe4\x7d\xec\xfd\x41\xbe\x48\xb5\x47\xa6\xa9\x5e\xec" "\xc4\x8b\xa8\xed\x89\x66\x3c\x9c\xbe\x6f\xd0\x78\x18\x17\x27\x76\x5d\x79" "\xff\x7f\x37\x52\xfc\xe6\x3b\xff\xd6\xbf\xe1\xf7\xee\xff\x8d\xf8\x85\xde" "\xbb\x5b\x77\xf8\xf8\xd9\x1f\xed\xbf\x75\xff\x7f\x61\xf3\x86\xee\xf2\xfe" "\x5f\xdb\x5c\x2f\xdf\xff\xcb\x3b\xc1\x56\xf7\xff\x27\x07\x96\xbd\x90\xff" "\x36\x52\xaf\x45\x34\x96\xae\xcf\xd7\x0f\x47\x34\x16\x5f\x7f\xe3\x58\xe7" "\x7a\xfb\xda\xf4\xb5\xe9\xd9\xd3\xc7\x8f\x7f\x69\x64\xe4\x4b\xa7\x8e\xd7" "\xf7\x47\x34\xae\x76\x66\xa6\x07\x5e\xed\xc8\xe1\x02\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x78\x70\x52\x11\xbf\x1d\x29\xda\x3f\x5a\x4f" "\xcd\x88\xb8\x59\x8d\xd7\x1a\x3e\x3b\xf2\xcc\xb1\xa7\xf7\xc5\xbe\x6a\xbc" "\xd5\x86\x71\xdb\xaf\x8e\x5f\x3a\xd7\x7c\x69\xee\xfa\xfc\xc2\xf4\xe2\xe2" "\xf4\x54\x73\x62\xb6\x73\x65\x6e\x6a\xfa\x6e\x77\xd7\xa8\x86\x7b\x4d\x8c" "\x8e\xed\x4a\x67\x3e\xd0\x81\x5d\x6e\xff\x81\xc6\x4b\x73\xf3\xaf\x2f\x74" "\xae\xfd\xfe\xd2\x96\xeb\x0f\x36\xce\x5d\x5e\x5c\x5a\x68\x5f\xd9\x7a\x75" "\x1c\x88\x22\xa2\x35\xb8\xe4\x68\xd5\xe0\x89\xd1\xb1\xaa\xd1\x33\x9d\xf6" "\x6c\x55\xf5\xe2\x96\x83\xe9\x3f\xbc\x7a\x2a\xe2\xdf\x23\xc5\x95\xd3\xcd" "\xf4\xb9\xbc\x2c\x8f\xff\xdf\x3c\xc2\x7f\xc3\xf8\xff\xe5\xcd\x1b\xda\xc1" "\xf1\xff\x9f\x3d\x78\x7b\xfc\xdf\xc7\x06\x8a\x96\xfb\x4c\xa9\x88\x9f\x45" "\x8a\xdf\xf8\xf3\xa7\xe2\x73\x55\x3b\x0f\xc6\x1d\xc7\x2c\x97\xfb\xeb\x48" "\x71\xf4\xcc\x67\x72\xb9\xd8\x5f\x96\xeb\xb7\xa1\xf7\x5c\x81\xde\xc8\xc0" "\xb2\xec\x7f\x47\x8a\xbf\xff\xf9\xc6\xb2\xfd\xf1\x90\x4f\xde\x2e\x7b\xe2" "\x43\x1d\xdc\x47\x40\x79\xfe\x0f\x45\x8a\xef\xfd\xe9\x77\xe2\x57\xf3\xb2" "\x8d\xcf\x7f\xd8\xfa\xfc\x1f\xdc\xbc\xa1\x5d\x7a\xfe\xc3\x27\x06\x96\x1d" "\xdc\xf0\xbc\x82\xfb\xee\x3a\xf9\xfc\x1f\x8b\x14\x2f\x3e\xf9\x56\xfc\x5a" "\xb5\xe4\x7f\xdf\xf7\xf9\x1f\xfd\x27\x36\x1c\xe9\x15\xbe\xfd\x7c\x8e\x5d" "\x3a\xff\xbf\x3c\xb0\x6c\x38\xef\xf7\xd7\x77\xaa\xf3\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x8f\xb0\x7a\x2a\xe2\x6f\x22\xc5\x0f\xc6\x6a\xe9\xf9\xbc" "\xec\x6e\xbe\xff\x37\xb5\x79\x43\xbb\xf4\xfd\xaf\x4f\x0e\x2c\x9b\xca\xdf" "\xff\x4b\xb1\xf3\xb3\x9e\x74\xbb\xdd\x3f\x2e\xf7\xe1\x9b\x85\x00\x00\x00" "\x00\x3c\x4e\xea\xa9\x88\x1f\x47\x8a\x6b\x4b\x6f\xdd\x1a\x43\xbd\x71\xfc" "\xf7\xc0\xf8\xcf\xdf\xba\x3d\xfe\x73\x34\x6d\x5a\x5b\xfd\x9e\xef\x97\xaa" "\xe7\x06\xec\xe4\xef\xff\x06\x0d\xe7\xfd\x4e\xde\x7f\xb7\x01\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x4f\x49\xa9\x88\xe7\xf3" "\x7c\xea\x93\xd5\x78\xfe\xa9\x6d\xe7\x53\x5f\x8d\x14\x2f\xff\xe7\xb3\xb9" "\x5c\x3a\x5c\x96\xeb\xcf\x03\x3f\x5c\xfd\xd9\xb8\x30\x37\x7b\xec\xdc\xcc" "\xcc\x5c\x23\x96\xda\x97\x67\xa6\x9b\xe3\xf3\xed\x2b\xd3\x65\xdd\x4f\x44" "\x8a\xf5\xbf\xfa\x4c\xae\x5b\x54\xf3\xab\xf7\xe7\x9b\xef\xcd\xf1\x7e\x7b" "\x2e\xf6\x85\x48\x31\xf6\xb7\xfd\xb2\xbd\xb9\xd8\xfb\x73\x93\xf7\xe6\x03" "\x6f\x74\xbb\x11\x27\xca\xb2\x1f\x8b\x14\xff\xf1\x77\x1b\xcb\xe6\xa9\xa9" "\xf3\xdc\xd1\xd5\x76\x4f\x96\x65\xff\x32\x52\x7c\xed\x1f\xb7\x2e\x7b\xf8" "\x76\xd9\x53\x65\xd9\xef\x44\x8a\x1f\x7e\xad\xd9\x2f\x7b\xb0\x2c\xdb\x7f" "\x3e\xea\x27\x6f\x97\x7d\xee\xca\x5c\xb1\x0b\x67\x05\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x8f\x9a\x7a\x2a\xe2\x4f\x22\xc5" "\x7f\x5d\x5f\xb9\x35\x96\x3f\xcf\xff\x5f\x1f\x78\x5b\x79\xf3\x1b\x03\xf3" "\xfd\x6f\x72\xb3\x9a\xe7\x7f\xb8\x9a\xff\x7f\xbb\xd7\xf7\x32\xff\x7f\xf5" "\x5c\x81\xe5\xed\xf6\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x8f\xa7\x14\x45\xbc\x11\x29\xe6\x2f\xac\xa7\xd5\xa1" "\xf2\x7d\x4f\xe3\x7c\x67\xf6\xc6\xcd\x89\xd1\xb1\xad\xab\x1d\x48\x55\xcd" "\x7d\x55\xf9\xf2\xa7\x71\xe2\xe4\xa9\xd3\x5f\x7c\x7e\xe4\x4c\x3f\xdf\xbf" "\xfe\x4e\xfb\x54\xbc\x3a\x7e\xe9\x5c\xf3\xa5\xb9\xeb\xf3\x0b\xd3\x8b\x8b" "\xd3\x53\xcd\x89\xd9\xce\x95\xb9\xa9\xe9\xbb\xde\xc2\xfd\xd6\xdf\xec\x68" "\x75\x00\x9a\xd7\x5f\xbb\x31\x75\xf5\xea\x62\xf3\xe4\x73\xa7\x36\xac\xbe" "\x39\xfc\xde\xd0\x13\x87\x87\xcf\x8e\x3c\x73\xec\xe9\x7e\xd9\x89\xd1\xb1" "\xb1\xf1\x81\x32\xb5\xfa\x3d\xef\xfd\x0e\x69\x9b\xe5\xfb\xa3\x88\xbf\x88" "\x14\xcf\x7e\xf7\x27\xe9\x07\x43\x11\x45\xdc\x71\x2c\xfe\xef\xc3\x1e\x8b" "\x0f\xf8\xec\xec\xb6\x03\x55\x27\x8e\x56\x9d\x98\x18\x1d\xab\x3a\x32\xd3" "\x69\xcf\x2e\x95\x2b\x2f\xf6\x0f\x44\x11\xd1\x1c\xa8\xd4\xea\x1f\xa3\x07" "\x70\x2e\xee\x4b\x2b\x62\xb9\x6c\x7e\xd9\xe0\xa3\x65\xf7\xc6\xe7\xdb\x0b" "\xed\xcb\x33\xd3\xcd\x8b\xed\x85\xa5\xce\x52\x67\x6e\xf6\x62\xea\xb5\xb6" "\xec\x4f\x33\x8a\x38\x93\x22\x56\x22\x62\x6d\xe8\xce\xcd\xd5\xa3\x88\xd7" "\x22\xc5\xb7\x0f\xad\xa7\x7f\x1a\x8a\xd8\xd7\x3f\x0e\x5f\xb8\x30\xfe\x95" "\xe3\x27\xb7\x6f\x47\xb1\x8b\x7d\xbc\x0b\x65\x3b\x9b\xf5\x88\x95\xe2\x11" "\x38\x67\x7b\xd8\x50\x14\xf1\x0f\x91\xe2\xa7\x6f\x1f\x89\x7f\x1e\x8a\xa8" "\x45\xef\x27\x3e\x1f\xf1\x4a\x99\xdf\x8f\x78\x33\x7a\xe7\x3b\x95\x1f\x8c" "\xd3\x11\xef\x6e\xf1\x39\xe2\xd1\x54\x8b\x22\xfe\xa7\x3c\xff\x67\xd7\xd3" "\xdb\x43\xe5\xf5\xa0\x7f\x5d\x39\xff\xd5\xe6\x97\x67\xaf\xce\x0d\x94\xed" "\x5f\x57\xee\xf7\x5e\xf9\xd0\xef\x0f\x0f\xd2\x1e\xbf\x36\x35\xa2\x88\x1f" "\x56\x57\xfc\xf5\xf4\x2f\xfe\xbb\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xd8\x43\x8a\xf8\x95\x48\xf1\xc2\x3b\x47\x52\x35\x3e\xf8\xd6" "\x98\xe2\xce\xec\xb5\xe6\xa5\xf6\xe5\x99\xde\xb0\xbe\xfe\xd8\xbf\xfe\x98" "\xe9\x6e\xb7\xdb\x6d\xa6\x5e\xb6\x72\x4e\xe6\x5c\xce\xb9\x92\x73\xb5\xca" "\x7a\xac\xe5\xf7\x51\xe4\xfa\x39\x5b\x65\x36\xba\xdd\xc9\xfc\x7e\x39\xe7" "\x4a\xce\xd5\x9c\x6b\x39\xab\xc1\xbf\xd1\xed\x36\xf7\xe5\xfa\x39\x27\x73" "\x2e\xe7\x5c\xc9\xb9\x9a\x73\x2d\x67\xd4\xf2\xfe\x73\xb6\x72\x4e\xe6\x5c" "\xce\xb9\x92\x73\x35\xe7\x5a\xce\xd8\x23\x63\xf7\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x80\xc7\x4b\x51\xfd\x93\xe2\x5b\x5f\x5f" "\x4f\xdd\xa1\xde\xfc\xd2\x93\xd1\xcb\x55\xf3\x81\x3e\xf6\xfe\x3f\x00\x00" "\xff\xff\xa6\x2e\xf1\x66", 3174); syz_mount_image(/*fs=*/0x200000c0, /*dir=*/0x20000100, /*flags=MS_SILENT|MS_NOSUID*/ 0x8002, /*opts=*/0x200028c0, /*chdir=*/1, /*size=*/0xc66, /*img=*/0x20009140); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x42 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x20000540, "./file1\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000540ul, /*flags=O_CREAT|O_RDWR*/ 0x42, /*mode=*/0); if (res != -1) r[0] = res; // pwrite64 arguments: [ // fd: fd (resource) // buf: ptr[in, buffer] { // buffer: {0c} (length 0x1) // } // count: len = 0x1 (8 bytes) // pos: intptr = 0x8000c61 (8 bytes) // ] memset((void*)0x20000580, 12, 1); syscall(__NR_pwrite64, /*fd=*/r[0], /*buf=*/0x20000580ul, /*count=*/1ul, /*pos=*/0x8000c61ul); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x101042 (4 bytes) // mode: open_mode = 0x15 (2 bytes) // ] // returns fd memcpy((void*)0x200005c0, "./file1\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200005c0ul, /*flags=O_SYNC|O_CREAT|O_RDWR*/ 0x101042, /*mode=S_IXOTH|S_IROTH|S_IWGRP*/ 0x15); if (res != -1) r[1] = res; // mmap arguments: [ // addr: VMA[0xb36000] // len: len = 0xb36000 (4 bytes) // prot: mmap_prot = 0x2 (8 bytes) // flags: mmap_flags = 0x28011 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0xb36000, /*prot=PROT_WRITE*/ 2ul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[1], /*offset=*/0ul); // read$FUSE arguments: [ // fd: fd_fuse (resource) // buf: ptr[out, fuse_in[read_buffer]] { // fuse_in[read_buffer] { // len: len = 0x2020 (4 bytes) // opcode: int32 = 0x0 (4 bytes) // unique: fuse_unique (resource) // uid: uid (resource) // gid: gid (resource) // pid: pid (resource) // padding: int32 = 0x0 (4 bytes) // payload: buffer: (DirOut) // } // } // len: bytesize = 0xfffffeb1 (8 bytes) // ] syscall(__NR_read, /*fd=*/r[1], /*buf=*/0x20000780ul, /*len=*/0xfffffeb1ul); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*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=*/0x21000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; do_sandbox_none(); return 0; }