// https://syzkaller.appspot.com/bug?id=7a53091be2839c92272bbbeb7c7e9cf89503b9e8 // 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_accept4 #define __NR_accept4 242 #endif #ifndef __NR_bind #define __NR_bind 200 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_mprotect #define __NR_mprotect 226 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_quotactl #define __NR_quotactl 60 #endif #ifndef __NR_recvmsg #define __NR_recvmsg 212 #endif #ifndef __NR_sendmmsg #define __NR_sendmmsg 269 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 208 #endif #ifndef __NR_socket #define __NR_socket 198 #endif static unsigned long long procid; static __thread int clone_ongoing; static __thread int skip_segv; static __thread jmp_buf segv_env; static void segv_handler(int sig, siginfo_t* info, void* ctx) { if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { exit(sig); } uintptr_t addr = (uintptr_t)info->si_addr; const uintptr_t prog_start = 1 << 20; const uintptr_t prog_end = 100 << 20; int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; int valid = addr < prog_start || addr > prog_end; if (skip && valid) { _longjmp(segv_env, 1); } exit(sig); } static void install_segv_handler(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8); syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8); memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = segv_handler; sa.sa_flags = SA_NODEFER | SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGBUS, &sa, NULL); } #define NONFAILING(...) \ ({ \ int ok = 1; \ __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ if (_setjmp(segv_env) == 0) { \ __VA_ARGS__; \ } else \ ok = 0; \ __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ ok; \ }) static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } //% This code is derived from puff.{c,h}, found in the zlib development. The //% original files come with the following copyright notice: //% Copyright (C) 2002-2013 Mark Adler, all rights reserved //% version 2.3, 21 Jan 2013 //% This software is provided 'as-is', without any express or implied //% warranty. In no event will the author be held liable for any damages //% arising from the use of this software. //% Permission is granted to anyone to use this software for any purpose, //% including commercial applications, and to alter it and redistribute it //% freely, subject to the following restrictions: //% 1. The origin of this software must not be misrepresented; you must not //% claim that you wrote the original software. If you use this software //% in a product, an acknowledgment in the product documentation would be //% appreciated but is not required. //% 2. Altered source versions must be plainly marked as such, and must not be //% misrepresented as being the original software. //% 3. This notice may not be removed or altered from any source distribution. //% Mark Adler madler@alumni.caltech.edu //% BEGIN CODE DERIVED FROM puff.{c,h} #define MAXBITS 15 #define MAXLCODES 286 #define MAXDCODES 30 #define MAXCODES (MAXLCODES + MAXDCODES) #define FIXLCODES 288 struct puff_state { unsigned char* out; unsigned long outlen; unsigned long outcnt; const unsigned char* in; unsigned long inlen; unsigned long incnt; int bitbuf; int bitcnt; jmp_buf env; }; static int puff_bits(struct puff_state* s, int need) { long val = s->bitbuf; while (s->bitcnt < need) { if (s->incnt == s->inlen) longjmp(s->env, 1); val |= (long)(s->in[s->incnt++]) << s->bitcnt; s->bitcnt += 8; } s->bitbuf = (int)(val >> need); s->bitcnt -= need; return (int)(val & ((1L << need) - 1)); } static int puff_stored(struct puff_state* s) { s->bitbuf = 0; s->bitcnt = 0; if (s->incnt + 4 > s->inlen) return 2; unsigned len = s->in[s->incnt++]; len |= s->in[s->incnt++] << 8; if (s->in[s->incnt++] != (~len & 0xff) || s->in[s->incnt++] != ((~len >> 8) & 0xff)) return -2; if (s->incnt + len > s->inlen) return 2; if (s->outcnt + len > s->outlen) return 1; for (; len--; s->outcnt++, s->incnt++) { if (s->in[s->incnt]) s->out[s->outcnt] = s->in[s->incnt]; } return 0; } struct puff_huffman { short* count; short* symbol; }; static int puff_decode(struct puff_state* s, const struct puff_huffman* h) { int first = 0; int index = 0; int bitbuf = s->bitbuf; int left = s->bitcnt; int code = first = index = 0; int len = 1; short* next = h->count + 1; while (1) { while (left--) { code |= bitbuf & 1; bitbuf >>= 1; int count = *next++; if (code - count < first) { s->bitbuf = bitbuf; s->bitcnt = (s->bitcnt - len) & 7; return h->symbol[index + (code - first)]; } index += count; first += count; first <<= 1; code <<= 1; len++; } left = (MAXBITS + 1) - len; if (left == 0) break; if (s->incnt == s->inlen) longjmp(s->env, 1); bitbuf = s->in[s->incnt++]; if (left > 8) left = 8; } return -10; } static int puff_construct(struct puff_huffman* h, const short* length, int n) { int len; for (len = 0; len <= MAXBITS; len++) h->count[len] = 0; int symbol; for (symbol = 0; symbol < n; symbol++) (h->count[length[symbol]])++; if (h->count[0] == n) return 0; int left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= h->count[len]; if (left < 0) return left; } short offs[MAXBITS + 1]; offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + h->count[len]; for (symbol = 0; symbol < n; symbol++) if (length[symbol] != 0) h->symbol[offs[length[symbol]]++] = symbol; return left; } static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode, const struct puff_huffman* distcode) { static const short lens[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; static const short dists[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; static const short dext[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; int symbol; do { symbol = puff_decode(s, lencode); if (symbol < 0) return symbol; if (symbol < 256) { if (s->outcnt == s->outlen) return 1; if (symbol) s->out[s->outcnt] = symbol; s->outcnt++; } else if (symbol > 256) { symbol -= 257; if (symbol >= 29) return -10; int len = lens[symbol] + puff_bits(s, lext[symbol]); symbol = puff_decode(s, distcode); if (symbol < 0) return symbol; unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]); if (dist > s->outcnt) return -11; if (s->outcnt + len > s->outlen) return 1; while (len--) { if (dist <= s->outcnt && s->out[s->outcnt - dist]) s->out[s->outcnt] = s->out[s->outcnt - dist]; s->outcnt++; } } } while (symbol != 256); return 0; } static int puff_fixed(struct puff_state* s) { static int virgin = 1; static short lencnt[MAXBITS + 1], lensym[FIXLCODES]; static short distcnt[MAXBITS + 1], distsym[MAXDCODES]; static struct puff_huffman lencode, distcode; if (virgin) { lencode.count = lencnt; lencode.symbol = lensym; distcode.count = distcnt; distcode.symbol = distsym; short lengths[FIXLCODES]; int symbol; for (symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; for (; symbol < 256; symbol++) lengths[symbol] = 9; for (; symbol < 280; symbol++) lengths[symbol] = 7; for (; symbol < FIXLCODES; symbol++) lengths[symbol] = 8; puff_construct(&lencode, lengths, FIXLCODES); for (symbol = 0; symbol < MAXDCODES; symbol++) lengths[symbol] = 5; puff_construct(&distcode, lengths, MAXDCODES); virgin = 0; } return puff_codes(s, &lencode, &distcode); } static int puff_dynamic(struct puff_state* s) { static const short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; int nlen = puff_bits(s, 5) + 257; int ndist = puff_bits(s, 5) + 1; int ncode = puff_bits(s, 4) + 4; if (nlen > MAXLCODES || ndist > MAXDCODES) return -3; short lengths[MAXCODES]; int index; for (index = 0; index < ncode; index++) lengths[order[index]] = puff_bits(s, 3); for (; index < 19; index++) lengths[order[index]] = 0; short lencnt[MAXBITS + 1], lensym[MAXLCODES]; struct puff_huffman lencode = {lencnt, lensym}; int err = puff_construct(&lencode, lengths, 19); if (err != 0) return -4; index = 0; while (index < nlen + ndist) { int symbol; int len; symbol = puff_decode(s, &lencode); if (symbol < 0) return symbol; if (symbol < 16) lengths[index++] = symbol; else { len = 0; if (symbol == 16) { if (index == 0) return -5; len = lengths[index - 1]; symbol = 3 + puff_bits(s, 2); } else if (symbol == 17) symbol = 3 + puff_bits(s, 3); else symbol = 11 + puff_bits(s, 7); if (index + symbol > nlen + ndist) return -6; while (symbol--) lengths[index++] = len; } } if (lengths[256] == 0) return -9; err = puff_construct(&lencode, lengths, nlen); if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) return -7; short distcnt[MAXBITS + 1], distsym[MAXDCODES]; struct puff_huffman distcode = {distcnt, distsym}; err = puff_construct(&distcode, lengths + nlen, ndist); if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) return -8; return puff_codes(s, &lencode, &distcode); } static int puff(unsigned char* dest, unsigned long* destlen, const unsigned char* source, unsigned long sourcelen) { struct puff_state s = { .out = dest, .outlen = *destlen, .outcnt = 0, .in = source, .inlen = sourcelen, .incnt = 0, .bitbuf = 0, .bitcnt = 0, }; int err; if (setjmp(s.env) != 0) err = 2; else { int last; do { last = puff_bits(&s, 1); int type = puff_bits(&s, 2); err = type == 0 ? puff_stored(&s) : (type == 1 ? puff_fixed(&s) : (type == 2 ? puff_dynamic(&s) : -1)); if (err != 0) break; } while (!last); } *destlen = s.outcnt; return err; } //% END CODE DERIVED FROM puff.{c,h} #define ZLIB_HEADER_WIDTH 2 static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcelen, int dest_fd) { if (sourcelen < ZLIB_HEADER_WIDTH) return 0; source += ZLIB_HEADER_WIDTH; sourcelen -= ZLIB_HEADER_WIDTH; const unsigned long max_destlen = 132 << 20; void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); if (ret == MAP_FAILED) return -1; unsigned char* dest = (unsigned char*)ret; unsigned long destlen = max_destlen; int err = puff(dest, &destlen, source, sourcelen); if (err) { munmap(dest, max_destlen); errno = -err; return -1; } if (write(dest_fd, dest, destlen) != (ssize_t)destlen) { munmap(dest, max_destlen); return -1; } return munmap(dest, max_destlen); } static int setup_loop_device(unsigned char* data, unsigned long size, const char* loopname, int* loopfd_p) { int err = 0, loopfd = -1; int memfd = syscall(__NR_memfd_create, "syzkaller", 0); if (memfd == -1) { err = errno; goto error; } if (puff_zlib_to_file(data, size, memfd)) { err = errno; goto error_close_memfd; } loopfd = open(loopname, O_RDWR); if (loopfd == -1) { err = errno; goto error_close_memfd; } if (ioctl(loopfd, LOOP_SET_FD, memfd)) { if (errno != EBUSY) { err = errno; goto error_close_loop; } ioctl(loopfd, LOOP_CLR_FD, 0); usleep(1000); if (ioctl(loopfd, LOOP_SET_FD, memfd)) { err = errno; goto error_close_loop; } } close(memfd); *loopfd_p = loopfd; return 0; error_close_loop: close(loopfd); error_close_memfd: close(memfd); error: errno = err; return -1; } static void reset_loop_device(const char* loopname) { int loopfd = open(loopname, O_RDWR); if (loopfd == -1) { return; } if (ioctl(loopfd, LOOP_CLR_FD, 0)) { } close(loopfd); } static long syz_mount_image(volatile long fsarg, volatile long dir, volatile long flags, volatile long optsarg, volatile long change_dir, volatile unsigned long size, volatile long image) { unsigned char* data = (unsigned char*)image; int res = -1, err = 0, need_loop_device = !!size; char* mount_opts = (char*)optsarg; char* target = (char*)dir; char* fs = (char*)fsarg; char* source = NULL; char loopname[64]; if (need_loop_device) { int loopfd; memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; close(loopfd); source = loopname; } mkdir(target, 0777); char opts[256]; memset(opts, 0, sizeof(opts)); if (strlen(mount_opts) > (sizeof(opts) - 32)) { } strncpy(opts, mount_opts, sizeof(opts) - 32); if (strcmp(fs, "iso9660") == 0) { flags |= MS_RDONLY; } else if (strncmp(fs, "ext", 3) == 0) { bool has_remount_ro = false; char* remount_ro_start = strstr(opts, "errors=remount-ro"); if (remount_ro_start != NULL) { char after = *(remount_ro_start + strlen("errors=remount-ro")); char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1); has_remount_ro = ((before == '\0' || before == ',') && (after == '\0' || after == ',')); } if (strstr(opts, "errors=panic") || !has_remount_ro) strcat(opts, ",errors=continue"); } else if (strcmp(fs, "xfs") == 0) { strcat(opts, ",nouuid"); } else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts, "errors=panic") || strstr(opts, "debug"))) { strcat(opts, ",errors=withdraw"); } res = mount(source, target, fs, flags, opts); if (res == -1) { err = errno; goto error_clear_loop; } res = open(target, O_RDONLY | O_DIRECTORY); if (res == -1) { err = errno; goto error_clear_loop; } if (change_dir) { res = chdir(target); if (res == -1) { err = errno; } } error_clear_loop: if (need_loop_device) reset_loop_device(loopname); errno = err; return res; } static void 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, 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[3] = {0xffffffffffffffff, 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: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x4000 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {6d 6f 64 65 3d 30 30 30 30 30 30 30 30 30 30 30 // 30 30 30 30 30 30 30 30 30 31 37 37 2c 70 61 72 74 69 74 69 6f 6e // 3d 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 2c // 73 68 6f 72 74 61 64 2c 75 74 66 38 2c 73 68 6f 72 74 61 64 2c 73 // 68 6f 72 74 61 64 2c 73 65 73 73 69 6f 6e 3d 30 30 30 30 30 30 30 // 30 30 30 30 30 31 36 37 37 37 32 32 33 2c 75 6d 61 73 6b 3d 30 30 // 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 32 35 30 2c // 67 69 64 3d 66 6f 72 67 65 74 2c 73 68 6f 72 74 61 64 2c 64 6d 6f // 64 65 3d 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 37 // 30 34 33 30 2c 67 69 64 3d 69 67 6e 6f 72 65 2c 61 64 69 6e 69 63 // 62 2c 75 6e 64 65 6c 65 74 65 2c 6d 6f 64 65 3d 30 30 30 30 30 30 // 30 30 30 30 30 30 30 30 30 30 30 30 30 32 30 30 30 2c 6c 61 73 74 // 62 6c 6f 63 6b 3d 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 // 31 30 32 34 2c 70 61 72 74 69 74 69 6f 6e 3d 30 30 30 30 30 30 30 // 30 30 30 30 30 30 30 30 30 30 30 30 37 2c 65 75 69 64 3e} (length // 0x141) // } // union ANYUNION { // ANYRESDEC: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 66 73 6d 61 67 69 63 3d 30 78 30 30 30 30 30 // 30 30 30 30 30 30 30 30 30 30 32 2c 64 6f 6e 74 5f 68 61 73 68 2c // 66 6f 77 6e 65 72 3e} (length 0x2d) // } // union ANYUNION { // ANYRESDEC: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 73 6d 61 63 6b 66 73 74 72 61 6e 73 6d 75 74 // 65 3d 00 1c 0b 23 5f fd ce 27 80 38 a2 cc f0 34 e2 3e d0 e0 47 54 // a8 1c 49 8e 5b c5 8f d4 58 19 2d 2e a1 25 36 cd 8b 3a} (length // 0x38) // } // } // } // chdir: int8 = 0x2 (1 bytes) // size: len = 0xc2d (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xc2d) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000c0, "udf\000", 4)); NONFAILING(memcpy((void*)0x20000180, "./file0\000", 8)); NONFAILING(memcpy((void*)0x20001180, "mode=00000000000000000000177,partition=" "00000000000000000001,shortad,utf8,shortad,shortad,session=" "00000000000016777223,umask=00000000000000000000250,gid=" "forget,shortad,dmode=00000000000000000170430,gid=ignore," "adinicb,undelete,mode=00000000000000000002000,lastblock=" "00000000000000001024,partition=00000000000000000007,euid>", 321)); NONFAILING(sprintf((char*)0x200012c1, "%020llu", (long long)0)); NONFAILING(memcpy((void*)0x200012d5, ",fsmagic=0x0000000000000002,dont_hash,fowner>", 45)); NONFAILING(sprintf((char*)0x20001302, "%020llu", (long long)0)); NONFAILING(memcpy((void*)0x20001316, "\x2c\x73\x6d\x61\x63\x6b\x66\x73\x74\x72\x61\x6e\x73\x6d" "\x75\x74\x65\x3d\x00\x1c\x0b\x23\x5f\xfd\xce\x27\x80\x38" "\xa2\xcc\xf0\x34\xe2\x3e\xd0\xe0\x47\x54\xa8\x1c\x49\x8e" "\x5b\xc5\x8f\xd4\x58\x19\x2d\x2e\xa1\x25\x36\xcd\x8b\x3a", 56)); NONFAILING(memcpy( (void*)0x200001c0, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x7d\x07\xf0\xdf\x1b\x2d\xc5\x95\xdc\x56" "\x4c\xec\x28\x4e\x1a\x17\x9b\xb6\x48\x65\xc5\x72\xf5\x2f\xa6\x62\x15\xee" "\xaa\xa6\xd9\x06\x90\x65\x22\x14\x73\x0b\xc0\x15\x49\xa9\x0b\x53\x24\x41" "\x52\x8d\x6c\xa4\x05\xd3\x4b\x0f\x3d\x04\x28\x8a\x1e\x72\x22\xd0\x1a\x05" "\x52\x34\x30\x9a\x22\xe8\x91\x69\x5d\x20\xb9\xf8\x50\xe4\xd4\x13\xd1\xc2" "\x46\x50\xf4\xc0\x16\x01\x72\x0a\x18\xcc\xec\x5b\x71\x49\x91\x36\x2d\x8a" "\x12\x65\x7d\x3e\x36\xf5\xdd\x9d\x7d\x6f\xe6\xbd\x79\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\x1f\xbc" "\x72\xe9\xf4\x99\xf4\xb0\x5b\x01\x00\x3c\x48\x57\x46\xbf\x7a\xfa\xac\xfb" "\x3f\x00\x3c\x56\xae\xfa\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x38\xe8\x52\x14\xf1\x64\xa4\x98\xbb\xb2\x96\xc6\xab\xf7\x1d\xf5\xcb" "\xed\xbe\x5b\xb7\xc7\x86\x86\xb7\xaf\x76\x24\x55\x35\x0f\x55\xe5\xcb\x9f" "\xfa\x99\xb3\xe7\xce\x7f\xe9\x85\xc1\x0b\xdd\xbc\xdc\x9e\xf9\x80\xfa\xf7" "\xdb\x67\xe3\xb5\xd1\xab\x97\x1a\x2f\xcf\xde\x9c\x9b\x9f\x5a\x58\x98\x9a" "\x6c\x8c\xcd\xb4\x27\x66\x27\xa7\x76\xbd\x87\xbd\xd6\xdf\xea\x64\x75\x02" "\x1a\x37\x5f\xbf\x35\x79\xfd\xfa\x42\xe3\xec\xf3\xe7\x36\x7d\x7c\x7b\xe0" "\xfd\xfe\x27\x8e\x0f\x5c\x1c\x7c\xf6\xd4\x33\xdd\xb2\x63\x43\xc3\xc3\xa3" "\x1b\x45\xea\xbd\xe5\x6b\xf7\xdc\x90\x8e\x9d\x66\x78\x1c\x8e\x22\x4e\x45" "\x8a\xe7\xbe\xf7\xd3\xd4\x8a\x88\x22\xf6\x7e\x2e\xea\x0f\x76\xec\xb7\x3a" "\x52\x75\xe2\x64\xd5\x89\xb1\xa1\xe1\xaa\x23\xd3\xed\xd6\xcc\x62\xf9\xe1" "\x48\xf7\x44\x14\x11\x8d\x9e\x4a\xcd\xee\x39\xda\x7e\x2c\xa2\xd6\xf7\x40" "\xfb\xb0\xb3\x66\xc4\x52\xd9\xfc\xb2\xc1\x27\xcb\xee\x8d\xce\xb5\xe6\x5b" "\xd7\xa6\xa7\x1a\x23\xad\xf9\xc5\xf6\x62\x7b\x76\x66\x24\x75\x5a\x5b\xf6" "\xa7\x11\x45\x5c\x48\x11\xcb\x11\xb1\xda\x7f\xf7\xee\xfa\xa2\x88\x5a\xa4" "\xf8\xce\xb1\xb5\x74\x2d\x22\x0e\x75\xcf\xc3\x17\xab\x89\xc1\x3b\xb7\xa3" "\xd8\xc7\x3e\xee\x42\xd9\xce\x46\x5f\xc4\x72\xf1\x08\x8c\xd9\x01\xd6\x1f" "\x45\xbc\x1a\x29\x7e\xf6\xce\x89\x98\xc8\xd7\x99\xea\x5a\xf3\x85\x88\x57" "\xcb\xfc\x41\xc4\x5b\x65\xbe\x14\x91\xca\x2f\xc6\xf9\x88\xf7\xb6\xf9\x1e" "\xf1\x68\xaa\x45\x11\x7f\x59\x8e\xff\xc5\xb5\x34\x59\x5d\x0f\xba\xd7\x95" "\xcb\x5f\x6b\x7c\x65\xe6\xfa\x6c\x4f\xd9\xee\x75\xe5\x23\xde\x1f\xee\xba" "\x52\x3c\xa4\xfb\xc3\x91\x2d\xf9\x60\x1c\xf0\x6b\x53\x3d\x8a\x68\x55\x57" "\xfc\xb5\x74\xef\xbf\xd9\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\xe0\x7e\x3b\x12\x45\x7c\x26\x52\xbc\xf2\x1f\x7f\x52\xcd\x2b\x8e\x6a" "\x5e\xfa\xb1\x8b\x83\x7f\x38\xf0\xab\xbd\x73\xc6\x9f\xfe\x90\xfd\x94\x65" "\x9f\x8f\x88\xa5\x62\x77\x73\x72\x0f\xe7\x89\x81\x23\x69\x24\xa5\x87\x3c" "\x97\xf8\x71\x56\x8f\x22\xfe\x34\xcf\xff\xfb\xd6\xc3\x6e\x0c\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x63\xad\x88\x9f\x44\x8a" "\x17\xdf\x3d\x91\x96\xa3\x77\x4d\xf1\xf6\xcc\x8d\xc6\xd5\xd6\xb5\xe9\xce" "\xaa\xb0\xdd\xb5\x7f\xbb\x6b\xa6\xaf\xaf\xaf\xaf\x37\x52\x27\x9b\x39\xc7" "\x73\x2e\xe5\x5c\xce\xb9\x92\x73\x35\x67\x14\xb9\x7e\xce\x66\xce\xf1\x9c" "\x4b\x39\x97\x73\xae\xe4\x5c\xcd\x19\x87\x72\xfd\x9c\xcd\x9c\xe3\x39\x97" "\x72\x2e\xe7\x5c\xc9\xb9\x9a\x33\x6a\xb9\x7e\xce\x66\xce\xf1\x9c\x4b\x39" "\x97\x73\xae\xe4\x5c\xcd\x19\x07\x64\xed\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x80\x8f\x93\x22\x8a\xf8\x45\xa4\xf8\xf6\x37\xd6\x52\xa4\x88" "\x68\x46\x8c\x47\x27\x57\xfa\x1f\x76\xeb\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\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\x52\x7f\x2a\xe2\xfb\x91" "\xa2\xf1\x47\xcd\x3b\xdb\x6a\x11\x91\xaa\x7f\x3b\x4e\x94\xbf\x9c\x8f\xe6" "\xe1\x32\x3f\x19\xcd\xc1\x32\x5f\x8a\xe6\xa5\x9c\xad\x2a\x6b\xcd\x6f\x3d" "\x84\xf6\xb3\x37\x7d\xa9\x88\x1f\x47\x8a\xfe\xfa\xdb\x77\x06\x3c\x8f\x7f" "\x5f\xe7\xdd\x9d\xaf\x41\xbc\xf5\xcd\x8d\x77\x9f\xad\x75\xf2\x50\xf7\xc3" "\x81\xf7\xfb\x9f\x38\x7e\xec\xe2\xe0\xf0\x6f\x3c\xbd\xd3\xeb\xb4\x5d\x03" "\x4e\x5e\x6e\xcf\xdc\xba\xdd\x18\x1b\x1a\x1e\x1e\xed\xd9\x5c\xcb\x47\xff" "\x64\xcf\xb6\x81\x7c\xdc\xe2\xfe\x74\x9d\x88\x58\x78\xe3\xcd\xd7\x5b\xd3" "\xd3\x53\xf3\xf7\xfe\xa2\xfc\x0a\xec\xa1\xfa\x23\xf4\x22\xd5\x1e\x97\x9e" "\x7a\x51\xbd\x88\xda\x81\x68\xc6\xc3\xe9\x3b\x8f\x81\xf2\xfe\xff\x5e\xa4" "\xf8\xdd\x77\xff\xb3\x7b\xc3\xef\xdc\xff\xeb\xf1\x2b\x9d\x77\x77\xee\xf0" "\xf1\xf3\x3f\xdb\xb8\xff\xbf\xb8\x75\x47\xbb\xbc\xff\xd7\xb6\xd6\xcb\xf7" "\xff\xf2\x9e\xbe\xdd\xfd\xff\xc9\x9e\x6d\x2f\xe6\xdf\x8d\xf4\xd5\x22\xea" "\x8b\x37\xe7\xfa\x8e\x47\xd4\x17\xde\x78\xf3\x54\xfb\x66\xeb\xc6\xd4\x8d" "\xa9\x99\xf3\xa7\x4f\x7f\x79\x70\xf0\xcb\xe7\x4e\xf7\x1d\x8e\xa8\x5f\x6f" "\x4f\x4f\xf5\xbc\xba\x2f\xa7\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\xe0\xc1\x49\x45\xfc\x7e\xa4\x68\xfd\x78\x2d\x35\x22\xe2\x76\x35" "\x5f\x6b\xe0\xe2\xe0\xb3\xa7\x9e\x39\x14\x87\xaa\xf9\x56\x9b\xe6\x6d\xbf" "\x36\x7a\xf5\x52\xe3\xe5\xd9\x9b\x73\xf3\x53\x0b\x0b\x53\x93\x8d\xb1\x99" "\xf6\xc4\xec\xe4\xd4\x6e\x0f\x57\xaf\xa6\x7b\x8d\x0d\x0d\xef\x4b\x67\x3e" "\xd4\x91\x7d\x6e\xff\x91\xfa\xcb\xb3\x73\x6f\xcc\xb7\x6f\xfc\xf1\xe2\xb6" "\x9f\x1f\xad\x5f\xba\xb6\xb0\x38\xdf\x9a\xd8\xfe\xe3\x38\x12\x45\x44\xb3" "\x77\xcb\xc9\xaa\xc1\x63\x43\xc3\x55\xa3\xa7\xdb\xad\x99\xaa\xea\xc8\xb6" "\x93\xe9\x3f\xba\xbe\x54\xc4\x7f\x45\x8a\x89\xf3\x8d\xf4\xf9\xbc\x2d\xcf" "\xff\xdf\x3a\xc3\x7f\xd3\xfc\xff\xa5\xad\x3b\xda\xa7\xf9\xff\x9f\xe8\xd9" "\x56\x1e\x33\xa5\x22\x7e\x1e\x29\x7e\xe7\xaf\x9e\x8e\xcf\x57\xed\x3c\x1a" "\x77\x9d\xb3\x5c\xee\xef\x22\xc5\xc9\x0b\x9f\xcb\xe5\xe2\x70\x59\xae\xdb" "\x86\xce\x73\x05\x3a\x33\x03\xcb\xb2\xff\x17\x29\xfe\xe9\x17\x9b\xcb\x76" "\xe7\x43\x3e\xb9\x51\xf6\xcc\xae\x4f\xec\x23\xa2\x1c\xff\x63\x91\xe2\xfb" "\x7f\xf1\xdd\xf8\xcd\xbc\x6d\xf3\xf3\x1f\xb6\x1f\xff\xa3\x5b\x77\xb4\x4f" "\xe3\xff\x54\xcf\xb6\xa3\x9b\x9e\x57\xb0\xe7\xae\x93\xc7\xff\x54\xa4\x78" "\xe9\xc9\xb7\xe3\xb7\xf2\xb6\x0f\x7a\xfe\x47\xf7\xd9\x1b\x27\x72\xe1\x3b" "\xcf\xe7\xd8\xa7\xf1\xff\x54\xcf\xb6\x81\x7c\xdc\xdf\xbe\x3f\x5d\x07\x00" "\x00\x00\x00\x00\x00\x00\x00\x78\xa4\xf5\xa5\x22\xfe\x3e\x52\xfc\x70\xb8" "\x96\x5e\xc8\xdb\x76\xf3\xf7\xff\x26\xb7\xee\x68\x9f\xfe\xfe\xd7\xa7\x7b" "\xb6\x4d\xde\x9f\xf5\x8a\x3e\xf4\xc5\x9e\x4f\x2a\x00\x00\x00\x00\x1c\x10" "\x7d\xa9\x88\x9f\x44\x8a\x1b\x8b\x6f\xdf\x99\x43\xbd\x79\xfe\x77\xcf\xfc" "\xcf\xdf\xdb\x98\xff\x39\x94\xb6\x7c\x5a\xfd\x39\xdf\xaf\x55\xcf\x0d\xb8" "\x9f\x7f\xfe\xd7\x6b\x20\x1f\x77\x7c\xef\xdd\x06\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x03\x25\xa5\x22\x5e\xc8\xeb\xa9\x8f" "\x57\xf3\xf9\x27\x77\x5c\x4f\x7d\x25\x52\xbc\xf2\x3f\xcf\xe5\x72\xe9\x78" "\x59\xae\xbb\x0e\xfc\x40\xf5\x6b\xfd\xca\xec\xcc\xa9\x4b\xd3\xd3\xb3\x13" "\xad\xc5\xd6\xb5\xe9\xa9\xc6\xe8\x5c\x6b\x62\xaa\xac\xfb\x54\xa4\x58\xfb" "\xdb\xcf\xe5\xba\x45\xb5\xbe\x7a\x77\xbd\xf9\xce\x1a\xef\x1b\x6b\xb1\xcf" "\x47\x8a\xe1\x7f\xe8\x96\xed\xac\xc5\xde\x5d\x9b\xfc\xa9\x8d\xb2\x67\xca" "\xb2\x9f\x88\x14\xff\xfd\x8f\x9b\xcb\x76\xd7\xb1\xfe\xd4\x46\xd9\xb3\x65" "\xd9\xbf\x89\x14\x5f\xff\x97\xed\xcb\x1e\xdf\x28\x7b\xae\x2c\xfb\xdd\x48" "\xf1\xa3\xaf\x37\xba\x65\x8f\x96\x65\xbb\xcf\x47\xfd\xf4\x46\xd9\xe7\x27" "\x66\x8b\x7d\x18\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x1e\x37\x7d\xa9\x88\x3f\x8f\x14\xff\x7b\x73\xf9\xce\x5c\xfe\xbc" "\xfe\x7f\x5f\xcf\xdb\xca\x5b\xdf\xec\x59\xef\x7f\x8b\xdb\xd5\x3a\xff\x03" "\xd5\xfa\xff\x3b\xbd\xbe\x97\xf5\xff\xab\xe7\x0a\x2c\xed\x74\x54\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x78\x4a" "\x51\xc4\x9b\x91\x62\xee\xca\x5a\x5a\xe9\x2f\xdf\x77\xd4\x2f\xb7\x67\x6e" "\xdd\x1e\x1b\x1a\xde\xbe\xda\x91\x54\xd5\x3c\x54\x95\x2f\x7f\xea\x67\xce" "\x9e\x3b\xff\xa5\x17\x06\x2f\x74\xf3\x83\xeb\xdf\x6f\x9f\x89\xd7\x46\xaf" "\x5e\x6a\xbc\x3c\x7b\x73\x6e\x7e\x6a\x61\x61\x6a\xb2\x31\x36\xd3\x9e\x98" "\x9d\x9c\xda\xf5\x1e\xf6\x5a\x7f\xab\x93\xd5\x09\x68\xdc\x7c\xfd\xd6\xe4" "\xf5\xeb\x0b\x8d\xb3\xcf\x9f\xdb\xf4\xf1\xed\x81\xf7\xfb\x9f\x38\x3e\x70" "\x71\xf0\xd9\x53\xcf\x74\xcb\x8e\x0d\x0d\x0f\x8f\xf6\x94\xa9\xf5\xdd\xf3" "\xd1\xef\x92\x76\xd8\x7e\x38\x8a\xf8\xeb\x48\xf1\xdc\xf7\x7e\x9a\x7e\xd8" "\x1f\x51\xc4\xde\xcf\xc5\x87\x7c\x77\xf6\xdb\x91\xaa\x13\x27\xab\x4e\x8c" "\x0d\x0d\x57\x1d\x99\x6e\xb7\x66\x16\xcb\x0f\x47\xba\x27\xa2\x88\x68\xf4" "\x54\x6a\x76\xcf\xd1\x03\x18\x8b\x3d\x69\x46\x2c\x95\xcd\x2f\x1b\x7c\xb2" "\xec\xde\xe8\x5c\x6b\xbe\x75\x6d\x7a\xaa\x31\xd2\x9a\x5f\x6c\x2f\xb6\x67" "\x67\x46\x52\xa7\xb5\x65\x7f\x1a\x51\xc4\x85\x14\xb1\x1c\x11\xab\xfd\x77" "\xef\xae\x2f\x8a\x78\x3d\x52\x7c\xe7\xd8\x5a\xfa\xd7\xfe\x88\x43\xdd\xf3" "\xf0\xc5\x2b\xa3\x5f\x3d\x7d\x76\xe7\x76\x14\xfb\xd8\xc7\x5d\x28\xdb\xd9" "\xe8\x8b\x58\x2e\x1e\x81\x31\x3b\xc0\xfa\xa3\x88\x7f\x8e\x14\x3f\x7b\xe7" "\x44\xfc\x5b\x7f\x44\x2d\x3a\x3f\xf1\x85\x88\x57\xcb\xfc\x41\xc4\x5b\xd1" "\x19\xef\x54\x7e\x31\xce\x47\xbc\xb7\xcd\xf7\x88\x47\x53\x2d\x8a\xf8\xff" "\x72\xfc\x2f\xae\xa5\x77\xfa\xcb\xeb\x41\xf7\xba\x72\xf9\x6b\x8d\xaf\xcc" "\x5c\x9f\xed\x29\xdb\xbd\xae\x3c\xf2\xf7\x87\x07\xe9\x80\x5f\x9b\xea\x51" "\xc4\x8f\xaa\x2b\xfe\x5a\xfa\x77\xff\x5d\x03\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x1c\x20\x45\xfc\x7a\xa4\x78\xf1\xdd\x13\xa9\x9a\x1f" "\x7c\x67\x4e\x71\x7b\xe6\x46\xe3\x6a\xeb\xda\x74\x67\x5a\x5f\x77\xee\x5f" "\x77\xce\xf4\xfa\xfa\xfa\x7a\x23\x75\xb2\x99\x73\x3c\xe7\x52\xce\xe5\x9c" "\x2b\x39\x57\x73\x46\x91\xeb\xe7\x6c\x96\x59\x5f\x5f\x1f\xcf\xef\x97\x72" "\x2e\xe7\x5c\xc9\xb9\x9a\x33\x0e\xe5\xfa\x39\x9b\x39\xc7\x73\x2e\xe5\x5c" "\xce\xb9\x92\x73\x35\x67\xd4\x72\xfd\x9c\xcd\x9c\xe3\x39\x97\x72\x2e\xe7" "\x5c\xc9\xb9\x9a\x33\x0e\xc8\xdc\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xe0\xe3\xa5\xa8\xfe\x49\xf1\xed\x6f\xac\xa5\xf5\xfe" "\xce\xfa\xd2\xe3\xd1\xc9\x15\xeb\x81\x7e\xec\xfd\x32\x00\x00\xff\xff\x21" "\x5f\xf8\xab", 3117)); NONFAILING(syz_mount_image(/*fs=*/0x200000c0, /*dir=*/0x20000180, /*flags=MS_REC*/ 0x4000, /*opts=*/0x20001180, /*chdir=*/2, /*size=*/0xc2d, /*img=*/0x200001c0)); // quotactl$Q_QUOTAON arguments: [ // cmd: quota_cmd_quota_on = 0xffffffff80000201 (8 bytes) // special: ptr[in, blockdev_filename] { // union blockdev_filename { // loop: loop_filename { // prefix: buffer: {2f 64 65 76 2f 6c 6f 6f 70} (length 0x9) // id: proc = 0x0 (1 bytes) // z: const = 0x0 (1 bytes) // } // } // } // id: uid (resource) // addr: nil // ] NONFAILING(memcpy((void*)0x20000180, "/dev/loop", 9)); NONFAILING(*(uint8_t*)0x20000189 = 0x30); NONFAILING(*(uint8_t*)0x2000018a = 0); syscall(__NR_quotactl, /*cmd=Q_QUOTAON_GRP*/ 0xffffffff80000201ul, /*special=*/0x20000180ul, /*id=*/0, /*addr=*/0ul); // mprotect arguments: [ // addr: VMA[0x3000] // len: len = 0x3000 (8 bytes) // prot: mmap_prot = 0x1 (8 bytes) // ] syscall(__NR_mprotect, /*addr=*/0x20000000ul, /*len=*/0x3000ul, /*prot=PROT_READ*/ 1ul); // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {6d 65 6d 6f 72 79 2e 63 75 72 72 65 6e 74 00} (length 0xf) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd NONFAILING(memcpy((void*)0x20000180, "memory.current\000", 15)); res = syscall(__NR_openat, /*fd=*/(intptr_t)-1, /*file=*/0x20000180ul, /*flags=*/0x275a, /*mode=*/0); if (res != -1) r[0] = res; // mmap arguments: [ // addr: VMA[0xb36000] // len: len = 0xb36000 (8 bytes) // prot: mmap_prot = 0xa (8 bytes) // flags: mmap_flags = 0x28011 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0xb36000ul, /*prot=PROT_SEM|PROT_WRITE*/ 0xaul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[0], /*offset=*/0ul); // socket$alg arguments: [ // domain: const = 0x26 (8 bytes) // type: const = 0x5 (8 bytes) // proto: const = 0x0 (4 bytes) // ] // returns sock_alg res = syscall(__NR_socket, /*domain=*/0x26ul, /*type=*/5ul, /*proto=*/0); if (res != -1) r[1] = res; // bind$alg arguments: [ // fd: sock_alg (resource) // addr: ptr[in, sockaddr_alg] { // sockaddr_alg { // family: const = 0x26 (2 bytes) // type: buffer: {73 6b 63 69 70 68 65 72 00 00 00 00 00 00} (length // 0xe) feat: af_alg_type = 0x0 (4 bytes) mask: af_alg_type = 0x0 (4 // bytes) name: buffer: {65 63 62 28 61 72 63 34 29 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00} (length 0x40) // } // } // addrlen: len = 0x58 (8 bytes) // ] NONFAILING(*(uint16_t*)0x200004c0 = 0x26); NONFAILING(memcpy((void*)0x200004c2, "skcipher\000\000\000\000\000\000", 14)); NONFAILING(*(uint32_t*)0x200004d0 = 0); NONFAILING(*(uint32_t*)0x200004d4 = 0); NONFAILING(memcpy((void*)0x200004d8, "ecb(arc4)" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000", 64)); syscall(__NR_bind, /*fd=*/r[1], /*addr=*/0x200004c0ul, /*addrlen=*/0x58ul); // setsockopt$ALG_SET_KEY arguments: [ // fd: sock_alg (resource) // level: const = 0x117 (4 bytes) // opt: const = 0x1 (4 bytes) // key: ptr[in, buffer] { // buffer: {ad} (length 0x1) // } // keylen: len = 0x1 (8 bytes) // ] NONFAILING(memset((void*)0x20000280, 173, 1)); syscall(__NR_setsockopt, /*fd=*/r[1], /*level=*/0x117, /*opt=*/1, /*key=*/0x20000280ul, /*keylen=*/1ul); // accept4 arguments: [ // fd: sock (resource) // peer: nil // peerlen: nil // flags: accept_flags = 0x800 (8 bytes) // ] // returns sock res = syscall(__NR_accept4, /*fd=*/r[1], /*peer=*/0ul, /*peerlen=*/0ul, /*flags=SOCK_NONBLOCK*/ 0x800ul); if (res != -1) r[2] = res; // sendmmsg$alg arguments: [ // fd: sock_algconn (resource) // mmsg: ptr[in, array[msghdr_alg]] { // array[msghdr_alg] { // msghdr_alg { // addr: const = 0x0 (8 bytes) // addrlen: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, array[iovec[in, array[int8]]]] { // array[iovec[in, array[int8]]] { // iovec[in, array[int8]] { // addr: ptr[in, buffer] { // buffer: {f7 8d 9c a3 8f ff 48 f3 be 52 16 34 48 41 2b a8} // (length 0x10) // } // len: len = 0xfffffe3f (8 bytes) // } // iovec[in, array[int8]] { // addr: ptr[in, buffer] { // buffer: {eb e3 a0 e9 79 6c fd 16 47 e2 99 f4 e3 76 fd ba // 12 82 80 b3 72 21 9d 20 5e 81 f4 a7 f7 1c 19 26 aa e1 ef // d7 e0 05 4a 86 3f 3d 5c fe 6c b5 5b 5b b9 fa 69 35 84 9e // 60 98 ed 88 4e 7c b5 17 26 b3 60 fb b3 7b 4f e0 35 bb b0 // 95 87 30 48} (length 0x4d) // } // len: len = 0x0 (8 bytes) // } // iovec[in, array[int8]] { // addr: ptr[in, buffer] { // buffer: {e8 70 0e 44 4d 50 a9 69 ff 67 34 7c ff 61 27 e6 // ef 12 ee 38 19 27 14 82 a4 97 5a 52 c1 ab 9b 8b 4d b3 94 // 5d 10 32 00 5e ab e9 7b 4d c3 3a 47 d3 a1 58 da 98 84 56 // d3 00 26 b4 33 18 6f 53 cd cd b9 3a 47 22 bf 30 6a 10 47 // 0d 50 f5 cb 1e ce 9e ad 34 59 ba b1 cf 15 38 cd 0b 15 76 // 53 c5 e8 92 96 2c 80 f1 58 c4 43 e9 c6 ad 7d 2a 81 03 ef // 2f 4b 93 76 6b 9a 21 50 1f 94 c1 56 8b 13 75 6b 66 f7 4f // 46 cf 80 17 04 d2 da 8b 96 c3 40 70 b2 33 af 0a fc c4 36 // 71 2e 58 ed 25 e7 21 19 3a f0 5a 04 5a d3 fd c9 28 f0 2f // 3d ba d1 9d 3e 66 ee bd a2 e6 3f 3f 46 ef 45 11 ce e2 6d // 7b 48 24 18 47 bf 9e 34 3e f4 67 4c 45 e2 a0 85 06 0f 11} // (length 0xce) // } // len: len = 0x0 (8 bytes) // } // } // } // vlen: len = 0x1 (8 bytes) // ctrl: ptr[in, array[cmsghdr_alg]] { // array[cmsghdr_alg] { // union cmsghdr_alg { // op: cmsghdr_alg_op { // len: len = 0x18 (8 bytes) // level: const = 0x117 (4 bytes) // type: const = 0x3 (4 bytes) // op: alg_op_op = 0x1 (4 bytes) // pad = 0x0 (4 bytes) // } // } // } // } // ctrllen: bytesize = 0x18 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // } // vlen: len = 0x1 (8 bytes) // f: send_flags = 0x40800 (8 bytes) // ] NONFAILING(*(uint64_t*)0x20000040 = 0); NONFAILING(*(uint32_t*)0x20000048 = 0); NONFAILING(*(uint64_t*)0x20000050 = 0x20000000); NONFAILING(*(uint64_t*)0x20000000 = 0x20000080); NONFAILING(memcpy( (void*)0x20000080, "\xf7\x8d\x9c\xa3\x8f\xff\x48\xf3\xbe\x52\x16\x34\x48\x41\x2b\xa8", 16)); NONFAILING(*(uint64_t*)0x20000008 = 0xfffffe3f); NONFAILING(*(uint64_t*)0x20000010 = 0x20000140); NONFAILING( memcpy((void*)0x20000140, "\xeb\xe3\xa0\xe9\x79\x6c\xfd\x16\x47\xe2\x99\xf4\xe3\x76\xfd\xba" "\x12\x82\x80\xb3\x72\x21\x9d\x20\x5e\x81\xf4\xa7\xf7\x1c\x19\x26" "\xaa\xe1\xef\xd7\xe0\x05\x4a\x86\x3f\x3d\x5c\xfe\x6c\xb5\x5b\x5b" "\xb9\xfa\x69\x35\x84\x9e\x60\x98\xed\x88\x4e\x7c\xb5\x17\x26\xb3" "\x60\xfb\xb3\x7b\x4f\xe0\x35\xbb\xb0\x95\x87\x30\x48", 77)); NONFAILING(*(uint64_t*)0x20000018 = 0); NONFAILING(*(uint64_t*)0x20000020 = 0x200003c0); NONFAILING(memcpy( (void*)0x200003c0, "\xe8\x70\x0e\x44\x4d\x50\xa9\x69\xff\x67\x34\x7c\xff\x61\x27\xe6\xef\x12" "\xee\x38\x19\x27\x14\x82\xa4\x97\x5a\x52\xc1\xab\x9b\x8b\x4d\xb3\x94\x5d" "\x10\x32\x00\x5e\xab\xe9\x7b\x4d\xc3\x3a\x47\xd3\xa1\x58\xda\x98\x84\x56" "\xd3\x00\x26\xb4\x33\x18\x6f\x53\xcd\xcd\xb9\x3a\x47\x22\xbf\x30\x6a\x10" "\x47\x0d\x50\xf5\xcb\x1e\xce\x9e\xad\x34\x59\xba\xb1\xcf\x15\x38\xcd\x0b" "\x15\x76\x53\xc5\xe8\x92\x96\x2c\x80\xf1\x58\xc4\x43\xe9\xc6\xad\x7d\x2a" "\x81\x03\xef\x2f\x4b\x93\x76\x6b\x9a\x21\x50\x1f\x94\xc1\x56\x8b\x13\x75" "\x6b\x66\xf7\x4f\x46\xcf\x80\x17\x04\xd2\xda\x8b\x96\xc3\x40\x70\xb2\x33" "\xaf\x0a\xfc\xc4\x36\x71\x2e\x58\xed\x25\xe7\x21\x19\x3a\xf0\x5a\x04\x5a" "\xd3\xfd\xc9\x28\xf0\x2f\x3d\xba\xd1\x9d\x3e\x66\xee\xbd\xa2\xe6\x3f\x3f" "\x46\xef\x45\x11\xce\xe2\x6d\x7b\x48\x24\x18\x47\xbf\x9e\x34\x3e\xf4\x67" "\x4c\x45\xe2\xa0\x85\x06\x0f\x11", 206)); NONFAILING(*(uint64_t*)0x20000028 = 0); NONFAILING(*(uint64_t*)0x20000058 = 1); NONFAILING(*(uint64_t*)0x20000060 = 0x20000380); NONFAILING(*(uint64_t*)0x20000380 = 0x18); NONFAILING(*(uint32_t*)0x20000388 = 0x117); NONFAILING(*(uint32_t*)0x2000038c = 3); NONFAILING(*(uint32_t*)0x20000390 = 1); NONFAILING(*(uint64_t*)0x20000068 = 0x18); NONFAILING(*(uint32_t*)0x20000070 = 0); syscall(__NR_sendmmsg, /*fd=*/r[2], /*mmsg=*/0x20000040ul, /*vlen=*/1ul, /*f=MSG_BATCH|MSG_CONFIRM*/ 0x40800ul); // recvmsg arguments: [ // fd: sock (resource) // msg: ptr[inout, recv_msghdr] { // recv_msghdr { // msg_name: nil // 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 = 0x7ffff000 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x20000253 (8 bytes) // } // } // } // msg_iovlen: len = 0x2 (8 bytes) // msg_control: nil // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: recv_flags = 0x0 (8 bytes) // ] NONFAILING(*(uint64_t*)0x200005c0 = 0); NONFAILING(*(uint32_t*)0x200005c8 = 0); NONFAILING(*(uint64_t*)0x200005d0 = 0x200001c0); NONFAILING(*(uint64_t*)0x200001c0 = 0x200000c0); NONFAILING(*(uint64_t*)0x200001c8 = 0x7ffff000); NONFAILING(*(uint64_t*)0x200001d0 = 0x20000200); NONFAILING(*(uint64_t*)0x200001d8 = 0x20000253); NONFAILING(*(uint64_t*)0x200005d8 = 2); NONFAILING(*(uint64_t*)0x200005e0 = 0); NONFAILING(*(uint64_t*)0x200005e8 = 0); NONFAILING(*(uint32_t*)0x200005f0 = 0); syscall(__NR_recvmsg, /*fd=*/r[2], /*msg=*/0x200005c0ul, /*f=*/0ul, 0); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*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=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; install_segv_handler(); do_sandbox_none(); return 0; }