// https://syzkaller.appspot.com/bug?id=bceb07e140d83e181774dac5f612e53bc824a0c5 // 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 #ifndef __NR_memfd_create #define __NR_memfd_create 319 #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 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 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")) { } } 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[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 34 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: mount_flags = 0x2a0471a (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // fs_opt_elem[ext4_options] { // elem: union ext4_options { // errors_remount: buffer: {65 72 72 6f 72 73 3d 72 65 6d 6f 75 // 6e 74 2d 72 6f} (length 0x11) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x82 (1 bytes) // size: len = 0x48f (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x48f) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000200, "ext4\000", 5)); NONFAILING(memcpy((void*)0x2000000000c0, "./file1\000", 8)); NONFAILING(memcpy((void*)0x200000000280, "errors=remount-ro", 17)); NONFAILING(*(uint8_t*)0x200000000291 = 0x2c); NONFAILING(*(uint8_t*)0x200000000292 = 0); NONFAILING(memcpy( (void*)0x200000000380, "\x78\x9c\xec\xdc\xcd\x6f\x54\x55\x1f\x00\xe0\xdf\xbd\xfd\xe0\x7d\xf9\xac" "\x8a\x0a\x48\xb4\x4a\x8c\x8d\x1f\x2d\x2d\xa8\x2c\xdc\x68\x34\x71\x81\xd1" "\x44\x17\xa8\xab\xda\x16\x42\x28\xd4\xd0\x9a\x58\x42\xa0\x1a\x83\x1b\x13" "\x43\xa2\x6b\x75\x69\xe2\x5f\xe0\xce\x8d\x51\x57\x26\x26\xae\x74\x6f\x48" "\x88\xb2\x01\x8d\x8b\x31\xf7\xce\xbd\x32\x9d\x76\x98\xa1\x4e\x67\x0a\xf3" "\x3c\xc9\xd0\x73\xe6\x9c\x3b\xe7\x9c\x9e\x7b\xee\x3d\xf7\x1c\xa6\x01\xf4" "\xac\xe1\xec\x9f\x24\x62\x6b\x44\xfc\x12\x11\x3b\xaa\xd1\xe5\x19\x86\xab" "\x3f\xae\x5d\x39\x3b\xf5\xe7\x95\xb3\x53\x49\x54\x2a\xaf\xfe\x9e\xe4\xf9" "\xae\x5e\x39\x3b\x55\x66\x2d\x8f\xdb\x52\x44\x46\xd2\x88\xf4\x83\xa4\x28" "\x64\xb9\xf9\xc5\x33\x27\x26\x67\x67\x67\x4e\x17\xf1\xb1\x85\x93\x6f\x8f" "\xcd\x2f\x9e\x79\xe2\xf8\xc9\xc9\x63\x33\xc7\x66\x4e\x4d\x1c\x3a\x74\xf0" "\xc0\xf8\xd3\x4f\x4d\x3c\xd9\x96\x76\x66\xed\xba\xba\xe7\xdc\xdc\xde\xdd" "\x2f\xbe\x7e\xf1\xa5\xa9\x23\x17\xdf\xfa\xfe\xab\xac\xbe\x5b\x8b\xf4\xda" "\x76\xac\xc9\xe0\xca\xb7\x86\xb3\x86\xff\x51\xc9\xd5\xa7\x3d\x1c\xff\xff" "\x4f\xc5\x6d\x34\xdb\x6a\xc2\x49\x7f\x17\x2b\xc2\x4d\xe9\x8b\x88\xac\xbb" "\x06\xb2\xf1\x5f\xa9\x54\xce\xd7\xa4\xed\x88\x17\xde\x6f\x72\xf8\x96\x75" "\xae\x1e\xb0\x8e\xb2\x7b\xd3\xa6\x55\xde\x2f\xee\x8b\x4b\x95\x86\x92\x1b" "\xa6\x02\xb7\x82\x24\xba\x5d\x03\xa0\x3b\xca\xfb\x7d\xf6\xfc\x5b\xbe\x3a" "\x38\xfd\xe8\xba\xcb\xcf\x56\x1f\x80\xb2\x76\x5f\x2b\x5e\xd5\x94\xfe\x48" "\x8b\x3c\x03\x75\xcf\xb7\xed\x34\x1c\x11\x47\x96\xfe\xfa\x2c\x7b\x45\x3b" "\xd6\x21\x00\x00\x9a\xf8\x68\xea\xd3\xc3\xf1\xf8\x6a\xf3\xbf\x34\xee\xa9" "\xc9\xb7\xbd\xd8\x43\x19\x8a\x88\x3b\x22\xe2\xce\x88\xb8\x2b\x22\x76\x46" "\xc4\xdd\x11\x79\xde\x7b\x23\x62\x57\x2b\x85\xd6\x6c\x10\xd4\x6f\x0d\xad" "\x9c\xff\xa4\x97\xd6\xde\xba\xe6\xb2\xf9\xdf\x33\xc5\xde\xd6\xf2\xf9\x5f" "\x39\xfb\x8b\xa1\xbe\x22\xb6\x2d\x6f\xff\x40\x72\xf4\xf8\xec\xcc\xfe\xe2" "\x77\x32\x12\x03\x9b\xb2\xf8\xf8\x0d\xca\xf8\xe6\xf9\x9f\x3e\x6e\x94\x56" "\x3b\xff\xcb\x5e\x59\xf9\xe5\x5c\xb0\xa8\xc7\xa5\xfe\xba\x05\xba\xe9\xc9" "\x85\xc9\x7c\x52\xda\x06\x97\xdf\x8b\xd8\xd3\x1f\x7f\x57\x2a\x95\xba\xf6" "\x27\x51\xf6\x52\x12\x11\xbb\x23\x62\xcf\xcd\x7d\xf4\xf6\x32\x70\xfc\xd1" "\x2f\xf7\x36\xca\xd4\xbc\xfd\x2b\x3e\xee\xba\x36\xec\x33\x55\xbe\x88\x78" "\xa4\xda\xff\x4b\x51\xd7\xfe\x52\xb2\x72\x7f\x72\x70\xdb\xf5\xfd\xc9\xb1" "\xff\xc5\xec\xcc\xfe\xb1\xf2\xac\x58\xe9\x87\x1f\x2f\xbc\xd2\xa8\xfc\xd6" "\xdb\xbf\x3e\xb2\xfe\xdf\xbc\xfc\xfc\x2f\x52\x3e\x5f\x2c\x02\x43\x6f\xd6" "\xee\xd7\xce\x47\x83\x9d\xcb\xad\x0d\xcb\xb8\xf0\xeb\x87\x0d\x9f\x69\xd6" "\x7a\xfe\x0f\x26\xaf\xe5\xd7\xa3\x72\xdb\xf5\xdd\xc9\x85\x85\xd3\xe3\x11" "\x83\xc9\xe1\x3c\xbe\xec\xfd\x89\xeb\xc7\x96\xf1\x32\x7f\xd6\xfe\x91\x7d" "\x59\x4a\xd9\xfe\xf2\xc8\x34\xbf\xc6\x45\xd1\xff\xf7\x45\xc4\xde\x62\xbf" "\xec\xfe\x88\x78\xa0\xa8\xfb\x83\x11\xf1\x50\x44\xec\x6b\xd8\xfa\x88\xef" "\x9e\x6b\x9c\xb6\x11\xfa\x7f\xba\xa6\xff\x93\xa8\x3f\xff\x77\x9d\xab\xfe" "\x2c\xfb\x7f\xf1\xa6\x03\x7d\x27\xbe\xfd\xba\x51\xf9\xad\xf5\xff\xc1\x3c" "\x34\x52\xbc\x93\x5f\xff\x9a\x68\xb5\x82\x6b\xff\xcd\x01\x00\x00\xc0\xad" "\x23\xcd\x57\x6e\x92\x74\xf4\xdf\x70\x9a\x8e\x8e\x56\xff\x63\xef\xce\xd8" "\x9c\xce\xce\xcd\x2f\x3c\x76\x74\xee\x9d\x53\xd3\xd5\x15\x9e\xa1\x18\x48" "\xcb\x95\xae\x1d\x35\xeb\xa1\xe3\xc9\x52\xf1\x89\xd5\xf8\x44\xb1\x56\x5c" "\xa6\x1f\x28\xd6\x8d\x3f\xe9\x8b\x3c\x3e\x3a\x35\x37\x3b\xdd\xe5\xb6\x43" "\xaf\xdb\xd2\x60\xfc\x67\x7e\xeb\xeb\x76\xed\x80\x75\xb7\xda\x3e\xda\xc4" "\x2a\x5f\x68\x03\x6e\x3f\xf5\xe3\x3f\x5d\x1e\x3d\xff\x72\x27\x2b\x03\x74" "\x94\xef\x6b\x43\xef\x6a\x32\xfe\xd3\x4e\xd5\x03\xe8\x3c\xf7\x7f\xe8\x5d" "\xab\x8d\xff\xf3\x75\x71\x7b\x01\x70\x7b\x72\xff\x87\xde\x65\xfc\x43\xef" "\x32\xfe\xa1\x77\xd5\x8d\xff\xbe\xf8\xb9\x5b\x35\x01\x3a\x68\x0d\x5f\xe7" "\x17\x10\x98\x5f\x3c\x13\xe9\x86\xa8\x46\x4b\x81\xd6\xff\x1e\xc4\x7a\x07" "\xde\xd8\x18\xd5\x68\x21\xd0\xed\x2b\x13\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x7b\xfc\x13\x00\x00\xff\xff\x60\x3f\xec\x2b", 1167)); NONFAILING(syz_mount_image( /*fs=*/0x200000000200, /*dir=*/0x2000000000c0, /*flags=MS_LAZYTIME|MS_I_VERSION|MS_REC|MS_SYNCHRONOUS|MS_RELATIME|MS_NOSUID|0x708*/ 0x2a0471a, /*opts=*/0x200000000280, /*chdir=*/0x82, /*size=*/0x48f, /*img=*/0x200000000380)); // chdir arguments: [ // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // ] NONFAILING(memcpy((void*)0x200000000140, "./file0\000", 8)); syscall(__NR_chdir, /*dir=*/0x200000000140ul); // 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*)0x200000000180, "/dev/loop", 9)); NONFAILING(*(uint8_t*)0x200000000189 = 0x30); NONFAILING(*(uint8_t*)0x20000000018a = 0); syscall(__NR_quotactl, /*cmd=Q_QUOTAON_GRP*/ 0xffffffff80000201ul, /*special=*/0x200000000180ul, /*id=*/(intptr_t)-1, /*addr=*/0ul); // mprotect arguments: [ // addr: VMA[0x3000] // len: len = 0x3000 (8 bytes) // prot: mmap_prot = 0x9 (8 bytes) // ] syscall(__NR_mprotect, /*addr=*/0x200000000000ul, /*len=*/0x3000ul, /*prot=PROT_SEM|PROT_READ*/ 9ul); // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {68 75 67 65 74 6c 62 2e 31 47 42 2e 75 73 61 67 65 5f 69 6e // 5f 62 79 74 65 73 00} (length 0x1b) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd NONFAILING( memcpy((void*)0x200000000180, "hugetlb.1GB.usage_in_bytes\000", 27)); res = syscall(__NR_openat, /*fd=*/(intptr_t)-1, /*file=*/0x200000000180ul, /*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=*/0x200000000000ul, /*len=*/0xb36000ul, /*prot=PROT_SEM|PROT_WRITE*/ 0xaul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[0], /*offset=*/0ul); // syz_mount_image$vfat arguments: [ // fs: ptr[in, buffer] { // buffer: {76 66 61 74 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 00} (length 0xfd) // } // flags: mount_flags = 0x4b81415 (8 bytes) // opts: nil // chdir: int8 = 0x1 (1 bytes) // size: len = 0x0 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x0) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000080, "vfat\000", 5)); NONFAILING( memcpy((void*)0x200000000680, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 253)); NONFAILING(syz_mount_image( /*fs=*/0x200000000080, /*dir=*/0x200000000680, /*flags=MS_I_VERSION|MS_SHARED|MS_SLAVE|MS_SYNCHRONOUS|MS_RELATIME|MS_RDONLY|0x4001404*/ 0x4b81415, /*opts=*/0, /*chdir=*/1, /*size=*/0, /*img=*/0x200000002680)); // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 34 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x11 (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nombcache: buffer: {6e 6f 6d 62 63 61 63 68 65} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // debug: buffer: {64 65 62 75 67} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // norecovery: buffer: {6e 6f 72 65 63 6f 76 65 72 79} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // grpid: buffer: {67 72 70 69 64} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // norecovery: buffer: {6e 6f 72 65 63 6f 76 65 72 79} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // obj_user: fs_opt["obj_user", stringnoz] { // name: buffer: {6f 62 6a 5f 75 73 65 72} (length 0x8) // eq: const = 0x3d (1 bytes) // val: buffer: {27 2f 27 25} (length 0x4) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // fowner_gt: fs_opt_nodelim["fowner>", fmt[dec, uid]] { // name: buffer: {66 6f 77 6e 65 72 3e} (length 0x7) // val: uid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // appraise_type: buffer: {61 70 70 72 61 69 73 65 5f 74 79 70 65 // 3d 69 6d 61 73 69 67} (length 0x14) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // dont_hash: buffer: {64 6f 6e 74 5f 68 61 73 68} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // euid_gt: fs_opt_nodelim["euid>", fmt[dec, uid]] { // name: buffer: {65 75 69 64 3e} (length 0x5) // val: uid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // uid_eq: fs_opt["uid", fmt[dec, uid]] { // name: buffer: {75 69 64} (length 0x3) // eq: const = 0x3d (1 bytes) // val: uid (resource) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // smackfstransmute: fs_opt["smackfstransmute", stringnoz] { // name: buffer: {73 6d 61 63 6b 66 73 74 72 61 6e 73 6d 75 74 // 65} (length 0x10) eq: const = 0x3d (1 bytes) val: buffer: // {6e 6f 64 69 6f 72 65 61 64 5f 6e 6f 6c 6f 63 6b} (length // 0x10) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[fs_options_common] { // elem: union fs_options_common { // hash: buffer: {68 61 73 68} (length 0x4) // } // comma: const = 0x2c (1 bytes) // } // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x9 (1 bytes) // size: len = 0x61b (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x61b) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000080, "ext4\000", 5)); NONFAILING(memcpy((void*)0x200000000040, "./file0\000", 8)); NONFAILING(memcpy((void*)0x200000000900, "nombcache", 9)); NONFAILING(*(uint8_t*)0x200000000909 = 0x2c); NONFAILING(memcpy((void*)0x20000000090a, "debug", 5)); NONFAILING(*(uint8_t*)0x20000000090f = 0x2c); NONFAILING(memcpy((void*)0x200000000910, "norecovery", 10)); NONFAILING(*(uint8_t*)0x20000000091a = 0x2c); NONFAILING(memcpy((void*)0x20000000091b, "grpid", 5)); NONFAILING(*(uint8_t*)0x200000000920 = 0x2c); NONFAILING(memcpy((void*)0x200000000921, "norecovery", 10)); NONFAILING(*(uint8_t*)0x20000000092b = 0x2c); NONFAILING(memcpy((void*)0x20000000092c, "obj_user", 8)); NONFAILING(*(uint8_t*)0x200000000934 = 0x3d); NONFAILING(memcpy((void*)0x200000000935, "\'/\'%", 4)); NONFAILING(*(uint8_t*)0x200000000939 = 0x2c); NONFAILING(memcpy((void*)0x20000000093a, "fowner>", 7)); NONFAILING(sprintf((char*)0x200000000941, "%020llu", (long long)0)); NONFAILING(*(uint8_t*)0x200000000955 = 0x2c); NONFAILING(memcpy((void*)0x200000000956, "appraise_type=imasig", 20)); NONFAILING(*(uint8_t*)0x20000000096a = 0x2c); NONFAILING(memcpy((void*)0x20000000096b, "dont_hash", 9)); NONFAILING(*(uint8_t*)0x200000000974 = 0x2c); NONFAILING(memcpy((void*)0x200000000975, "euid>", 5)); NONFAILING(sprintf((char*)0x20000000097a, "%020llu", (long long)0)); NONFAILING(*(uint8_t*)0x20000000098e = 0x2c); NONFAILING(memcpy((void*)0x20000000098f, "uid", 3)); NONFAILING(*(uint8_t*)0x200000000992 = 0x3d); NONFAILING(sprintf((char*)0x200000000993, "%020llu", (long long)0)); NONFAILING(*(uint8_t*)0x2000000009a7 = 0x2c); NONFAILING(memcpy((void*)0x2000000009a8, "smackfstransmute", 16)); NONFAILING(*(uint8_t*)0x2000000009b8 = 0x3d); NONFAILING(memcpy((void*)0x2000000009b9, "nodioread_nolock", 16)); NONFAILING(*(uint8_t*)0x2000000009c9 = 0x2c); NONFAILING(memcpy((void*)0x2000000009ca, "hash", 4)); NONFAILING(*(uint8_t*)0x2000000009ce = 0x2c); NONFAILING(*(uint8_t*)0x2000000009cf = 0); NONFAILING(memcpy( (void*)0x200000001c80, "\x78\x9c\xec\xdd\xcf\x6f\x54\xd5\x1e\x00\xf0\xef\x9d\x4e\x7f\xd0\x3e\x5e" "\x0b\x79\x79\xef\xf1\x16\x8f\x26\x2f\x2f\x90\x28\x2d\x2d\x60\x88\x31\x11" "\xe2\x96\x10\xfc\xb1\x73\x55\x69\x21\x48\xa1\x84\xd6\x68\x91\x84\x92\xe0" "\x46\x63\xdc\xb8\x30\x71\xe5\x42\xfc\x2f\x94\xc4\xad\x0b\xb7\x2e\xdc\xb8" "\x32\x24\x8d\x31\x2c\xc4\xa0\x8c\xb9\xd3\x7b\xcb\x74\xa6\x53\xca\x74\x7e" "\xb4\x9d\xcf\x27\xb9\xf4\xdc\x7b\x3b\xf7\x7c\x6f\xe9\xb7\xe7\xcc\x99\x73" "\xef\x0d\xa0\x6b\x8d\xa6\xff\x14\x22\x0e\x44\xc4\xb5\x24\x62\xb8\x62\x5f" "\x31\xb2\x9d\xa3\x2b\xdf\xf7\xe0\xd7\x9b\xe7\xd3\x25\x89\x52\xe9\xf5\x5f" "\x92\xb8\x79\x2b\x59\xaa\x3c\x56\x92\x7d\x1d\xca\x5e\xfc\xe7\x70\x24\xdf" "\x17\x22\xf6\xf7\xd4\xd6\x3b\xbf\x78\xe3\xf2\xd4\xec\xec\xcc\xf5\x6c\x7d" "\x7c\xe1\xca\xb5\xf1\xf9\xc5\x1b\x47\x2e\x5d\x99\xba\x38\x73\x71\xe6\xea" "\xe4\x0b\x93\x27\x4f\x1c\x3f\x71\x72\xe2\xe8\x96\xce\x6f\x6f\x45\xf9\xcc" "\x9d\xb7\xdf\x1d\xfe\xf0\xec\x9b\x5f\x7e\xfe\x28\x99\xf8\xea\xc7\xb3\x49" "\x9c\x8a\xc7\x59\x6c\xe9\x79\x55\xbf\xb6\x7f\x4b\x35\xa7\x3f\xb3\xd1\x28" "\xad\x78\x58\xb9\x3d\xfd\xb9\x9e\xdc\xe2\xb1\xb7\x8b\xdf\x86\xf3\xdf\x93" "\x27\x92\xea\x0d\x6c\x5b\x17\xb2\xdf\xc7\xde\x88\xf8\x57\x0c\x47\x4f\xc5" "\xff\xe6\x70\x7c\xf0\x6a\x47\x83\x03\x5a\xaa\x94\x44\xde\x46\x01\x5d\x27" "\x69\x28\xff\x07\x9a\x1f\x08\xd0\x66\x79\x3f\x20\x7f\x6f\xbf\xde\xfb\xe0" "\x5a\x85\x16\xf7\x4a\x80\x76\x58\x3e\xbd\x32\x00\xb0\x92\xfb\xbd\x11\x91" "\xe7\x7f\x71\x65\x6c\x30\x06\xca\x63\x03\x83\x0f\x92\x35\xe3\x3c\x49\x44" "\x6c\x6d\x64\x6e\x45\x5a\xc7\x77\xdf\x9e\xbd\x93\x2e\x51\x67\x1c\x0e\x68" "\x8d\xa5\xdb\xf9\x28\x77\x75\xfb\x9f\x94\x73\x73\x24\x06\xca\x6b\x83\x0f" "\x0a\x6b\xf2\xbf\x50\xb1\xa4\xdb\x5f\x6b\xb0\xfe\xd1\xaa\x75\xf9\x0f\xed" "\xb3\x74\x3b\x22\xfe\x9d\xb5\xff\x7d\xd1\x70\xfe\xbf\xd5\x60\xfd\xf2\x1f" "\x00\x00\x00\x00\x00\x00\x9a\xe7\xde\xe9\x88\x78\x7e\xbd\xf9\x7f\x85\xd5" "\xf9\x3f\x7d\xeb\xcc\xff\x19\x8a\x88\x53\x4d\xa8\xff\xe9\x9f\xff\x15\xee" "\x67\x85\xa4\x09\xd5\x01\x15\x96\x4f\x47\xbc\x54\x33\xff\xf7\x8f\xca\xd9" "\xc1\x23\x3d\xd9\xe7\xfc\x7b\xcb\xf3\x01\x7a\x0b\x17\x2e\xcd\xce\x1c\x8d" "\x88\xbf\x47\xc4\xe1\xe8\xed\x4f\xd7\x27\xd6\x1e\x76\xcd\x04\xe1\x23\x1f" "\xef\xff\xac\x5e\xfd\x95\xf3\xff\xd2\x25\xad\x3f\x9f\x0b\x98\x1d\xea\x7e" "\xb1\xea\x42\xdc\xe9\xa9\x85\xa9\xe6\x9c\x3d\x74\xb7\xe5\xdb\x11\xff\x29" "\xcf\xff\x3d\x98\x6d\x59\x3b\xff\x27\x6d\xff\x93\xac\xfd\x2f\xdd\xca\x5f" "\xf5\xd1\x2b\x69\x82\x5f\xdb\x64\x1d\xfb\xff\x7f\xf7\x5c\xbd\x7d\x4f\xcf" "\x7f\xa0\x55\x4a\x5f\x44\x1c\x5a\xf7\xfa\x9f\x27\xdd\xed\x64\xe3\xfb\x73" "\x8c\x97\xfb\x03\xe3\x79\xaf\xa0\xd6\x7f\xdf\xff\xe4\xeb\x7a\xf5\xcb\x7f" "\xe8\x9c\xb4\xfd\x1f\xdc\x38\xff\xfb\x93\xca\xfb\xf5\xcc\x3f\xdb\xf1\xfb" "\x22\xe2\xd8\x62\xb1\x54\x6f\x7f\xa3\xfd\xff\xbe\xe4\x8d\x9e\xfc\xf8\xa9" "\xf7\xa6\x16\x16\xae\x4f\x44\xf4\x25\x67\x6a\xb7\x4f\x3e\x5b\xcc\xb0\x5b" "\xe5\xf9\x90\xe7\x4b\x9a\xff\x87\xff\xb7\xf1\xf8\x5f\xde\xff\xaf\xcc\xc3" "\x3d\x11\xb1\xb4\xc9\x3a\xff\xf9\x78\xe8\xa7\x7a\xfb\xb4\xff\xd0\x39\x69" "\xfe\x4f\x6f\xdc\xfe\x8f\xac\x6d\xff\xd7\x2d\x24\x51\x77\xd7\x40\x4c\xde" "\x1d\xf9\x26\xbb\xc5\x58\x8d\x73\x9b\x6a\xff\x8f\x97\xdb\xf4\xc3\xd9\x16" "\xe3\x7f\x50\xa9\xf6\x7e\x1c\x75\xd3\xb1\xaa\xd0\x91\x70\x01\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x60\x87\x2b\x44\xc4\xdf\x22\x29\x8c\xad\x96\x0b\x85\xb1\xb1" "\x88\xa1\x88\xf8\x47\x0c\x16\x66\xe7\xe6\x17\x9e\xbb\x30\xf7\xce\xd5\xe9" "\x74\xdf\xda\xe7\xff\x0f\xaf\xac\x27\xf9\xf3\xff\x47\x2a\xd6\x27\xab\xd6" "\x8f\x45\xc4\xbe\x88\xf8\xb4\x67\x4f\x79\x7d\xec\xfc\xdc\xec\x74\xa7\x4f" "\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x89" "\xa1\xf2\x35\xff\xa5\xfe\xea\xeb\xff\x53\x3f\xf7\x74\x3a\x3a\xa0\xe5\x8a" "\xd9\x57\xf9\x0e\xdd\xa7\xd8\xf0\x2b\x4b\xfd\x4d\x0d\x04\x68\xbb\xc6\xf3" "\x1f\xd8\xe9\x8a\xa5\xcd\x7e\x67\x6f\x6b\x03\x01\xda\xae\x7e\xfb\xff\xf0" "\x51\xa9\xac\xad\xe1\x00\x6d\xa4\xff\x0f\xdd\xab\xc1\xfc\xf7\x71\x01\xec" "\x02\xda\x7f\xe8\x56\x9b\x1c\xd3\x1b\x68\x75\x1c\x40\x27\x6c\xba\xfd\x5f" "\x6e\x6d\x1c\x00\x00\x00\x00\x00\x40\x53\xec\x3b\x78\xef\x87\x24\x22\x96" "\x5e\xdc\x53\x5e\x52\x7d\xd9\x3e\x93\xfd\x61\x77\x2b\x74\x3a\x00\xa0\x63" "\xcc\xe1\x85\xee\x55\x9c\xeb\x74\x04\x40\xa7\x78\x8f\x0f\x24\xab\xa5\xdf" "\xd7\xbd\xd8\xbf\xfe\xec\xff\xa4\x35\x01\x01\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x35\x0e\x1d\x70\xfd\x3f\x74\xab\x42\xc4\x06\x8f\xf0\x36\xb7" "\x1f\x76\xb3\x0d\xae\xff\x5f\x2f\xf9\xdd\x2e\x00\x76\x91\xfa\x8f\xfe\xd8" "\x4c\xdb\x9f\xe8\x21\xc0\x0e\xe6\x3d\x3e\xf0\xb4\x76\xdc\xf5\xff\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x0d\x0c\xdc\xb8\x3c\x35\x3b\x3b\x73" "\x7d\x7e\x71\xe7\x15\x5e\xde\x1e\x61\x3c\x5b\x61\x69\x6a\x5b\x84\xd1\xd4" "\xc2\xe3\xd6\x1c\xb9\x37\x22\xb6\xc7\x09\xb6\xbb\x90\xdf\x82\xa3\x83\x61" "\x74\xf8\xef\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xb0\xea\xaf\x00\x00\x00\xff\xff\x25\x46\x32\x0f", 1563)); NONFAILING(syz_mount_image(/*fs=*/0x200000000080, /*dir=*/0x200000000040, /*flags=MS_SYNCHRONOUS|MS_RDONLY*/ 0x11, /*opts=*/0x200000000900, /*chdir=*/9, /*size=*/0x61b, /*img=*/0x200000001c80)); // openat$dir arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2e 00} (length 0x2) // } // flags: open_flags = 0x0 (4 bytes) // mode: open_mode = 0x1 (2 bytes) // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000040, ".\000", 2)); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000040ul, /*flags=*/0, /*mode=S_IXOTH*/ 1); if (res != -1) r[1] = res; // getdents arguments: [ // fd: fd_dir (resource) // ent: nil // count: len = 0x0 (8 bytes) // ] syscall(__NR_getdents, /*fd=*/r[1], /*ent=*/0ul, /*count=*/0ul); } 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; install_segv_handler(); use_temporary_dir(); loop(); return 0; }