// https://syzkaller.appspot.com/bug?id=c6cb5acb423a886f588352e8f44ae448cdcbc053 // 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 = 0x3 (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=*/3, /*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 = 0x4011 (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 { // resuid: fs_opt["resuid", fmt[hex, uid]] { // name: buffer: {72 65 73 75 69 64} (length 0x6) // eq: const = 0x3d (1 bytes) // val: uid (resource) // } // } // 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]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x0 (1 bytes) // size: len = 0x617 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x617) // } // ] // 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, "resuid", 6)); NONFAILING(*(uint8_t*)0x200000000910 = 0x3d); NONFAILING(sprintf((char*)0x200000000911, "0x%016llx", (long long)0)); NONFAILING(*(uint8_t*)0x200000000923 = 0x2c); NONFAILING(memcpy((void*)0x200000000924, "norecovery", 10)); NONFAILING(*(uint8_t*)0x20000000092e = 0x2c); NONFAILING(memcpy((void*)0x20000000092f, "grpid", 5)); NONFAILING(*(uint8_t*)0x200000000934 = 0x2c); NONFAILING(memcpy((void*)0x200000000935, "norecovery", 10)); NONFAILING(*(uint8_t*)0x20000000093f = 0x2c); NONFAILING(*(uint8_t*)0x200000000940 = 0); NONFAILING(memcpy( (void*)0x200000001f00, "\x78\x9c\xec\xdd\xcf\x6f\x14\x65\x1f\x00\xf0\xef\x4c\xb7\x3f\x68\x5f\xde" "\x16\xf2\xe6\x55\x3c\x48\x13\x63\x20\x51\x5a\x5a\xc0\x10\x63\x22\xc4\x2b" "\x21\xf8\xe3\xe6\xa9\xd2\x42\x90\x42\x09\xad\xd1\x22\x89\x25\xc1\x8b\xc6" "\x78\xf1\x60\xe2\xc9\x83\xf8\x5f\x28\x89\x57\x0f\x5e\x3d\x78\xf1\x64\x48" "\x1a\x63\x38\x88\x41\x59\x33\xdb\xdd\x76\xdb\xdd\x2d\xcb\x76\x7f\xb4\xdd" "\xcf\x27\x19\xfa\xcc\x0c\x3b\xcf\x77\x96\x7e\x79\x9e\x7d\xf6\x99\x99\x00" "\xba\xd6\x68\xf6\x47\x1a\x71\x20\x22\xae\x25\x11\xc3\x65\xfb\x72\x51\xdc" "\x39\xba\xf2\xf7\xee\xff\x71\xf3\x7c\xb6\x24\x91\xcf\xbf\xf9\x7b\x12\x37" "\x3f\x4a\x96\xca\x8f\x95\x14\x7f\x0e\x15\x5f\xfc\xcf\x70\x24\x3f\xa5\x11" "\xfb\x7b\x2a\xeb\x9d\x5f\xbc\x71\x79\x6a\x76\x76\xe6\x7a\xa1\xe6\xcc\x95" "\x6b\xe3\xf3\x8b\x37\x8e\x5c\xba\x32\x75\x71\xe6\xe2\xcc\xd5\xc9\x97\x26" "\x4f\x9e\x38\x7e\xe2\xe4\xc4\xd1\x2d\x9d\xdf\xde\xb2\xf2\x99\xdb\xef\xbe" "\x3f\xfc\xc9\xd9\xb7\xbf\xf9\xea\x61\x32\xf1\xed\x2f\x67\x93\x38\x15\x8f" "\x8a\xb1\x65\xe7\xb5\xf1\xb5\xfd\x5b\xaa\x39\x7b\xcf\x46\x23\xbf\xe2\x41" "\xf9\xf6\xec\x7d\x3d\xb9\xc5\x63\x6f\x17\x7f\x0e\x97\x7e\x4f\xd6\x24\x1b" "\x37\xb0\x6d\x5d\x28\xfe\x3e\xf6\x46\xc4\x53\x31\x1c\x3d\x65\xff\x9a\xc3" "\xf1\xf1\xeb\x1d\x0d\x0e\x68\xa9\x7c\x12\xa5\x36\x0a\xe8\x3a\x49\x43\xf9" "\x3f\xd0\xfc\x40\x80\x36\x2b\xf5\x03\x4a\x9f\xed\xab\x7d\x0e\xae\x94\xb6" "\xb8\x57\x02\xb4\xc3\xf2\xe9\x95\x01\x80\x95\xdc\xef\x8d\x88\x52\xfe\xe7" "\x56\xc6\x06\x63\xa0\x30\x36\x30\x78\x3f\x59\x37\xce\x93\x44\xc4\xd6\x46" "\xe6\x56\x64\x75\xfc\xf8\xc3\xd9\xdb\xd9\x12\x35\xc6\xe1\x80\xd6\x58\xba" "\x55\x1a\xe5\xde\xd8\xfe\x27\x85\xdc\x1c\x89\x81\xc2\xda\xe0\xfd\x74\x5d" "\xfe\xa7\x65\x4b\xb6\xfd\x8d\x06\xeb\x1f\xdd\xb0\x2e\xff\xa1\x7d\x96\x6e" "\x45\xc4\xd3\xc5\xf6\xbf\x2f\x1a\xce\xff\x77\x1a\xac\x5f\xfe\x03\x00\x00" "\x00\x00\x00\x40\xf3\xdc\x3d\x1d\x11\x2f\x56\x9b\xff\x97\xae\xce\xff\xe9" "\xab\x32\xff\x67\x28\x22\x4e\x35\xa1\xfe\xc7\x7f\xff\x97\xde\x2b\x16\x92" "\x26\x54\x07\x94\x59\x3e\x1d\xf1\x4a\xc5\xfc\xdf\xbf\xcb\x67\x07\x8f\xf4" "\x14\xbf\xe7\xdf\x5b\x98\x0f\xd0\x9b\x5e\xb8\x34\x3b\x73\x34\x22\xfe\x1b" "\x11\x87\x23\xd7\x9f\xad\x4f\xac\x3f\xec\xba\x09\xc2\x47\x3e\xdb\xff\x65" "\xad\xfa\xcb\xe7\xff\x65\x4b\x56\x7f\x69\x2e\x60\xf1\x50\xf7\x72\x1b\x2e" "\xc4\x9d\x9e\x5a\x98\x6a\xce\xd9\x43\x77\x5b\xbe\x15\xf1\x4c\x61\xfe\xef" "\xc1\xe2\x96\xf5\xf3\x7f\xb2\xf6\x3f\xa9\x68\xff\x3f\x7d\x2d\x4b\xf0\x6b" "\x75\xd6\xb1\xff\xf9\x3b\xe7\x6a\xed\x7b\x7c\xfe\x03\xad\x92\xff\x3a\xe2" "\x50\xd5\xeb\x7f\xd6\xba\xdb\x59\x69\x7c\xa1\xe6\xfd\x39\xc6\x0b\xfd\x81" "\xf1\x52\xaf\xa0\xd2\xb3\x1f\x7e\xfe\x5d\xad\xfa\xe5\x3f\x74\x4e\xd6\xfe" "\x0f\x6e\x9e\xff\xfd\x49\xf9\xfd\x7a\xe6\x9f\xec\xf8\x7d\x11\x71\x6c\x31" "\x97\xaf\xb5\xbf\xd1\xfe\x7f\x5f\xf2\x56\x4f\xe9\xf8\x99\x0f\xa6\x16\x16" "\xae\x4f\x44\xf4\x25\x67\x2a\xb7\x4f\x3e\x59\xcc\xb0\x5b\x95\xf2\xa1\x94" "\x2f\x59\xfe\x1f\x7e\x6e\xf3\xf1\xbf\xd5\xfe\x7f\x59\x1e\xee\x89\x88\xa5" "\x3a\xeb\xfc\xff\xa3\xa1\x5f\x6b\xed\xd3\xfe\x43\xe7\x64\xf9\x3f\xbd\x79" "\xfb\x3f\xb2\xbe\xfd\x7f\xd2\xc2\x40\x4c\xde\x19\xf9\xbe\x78\x8b\xb1\x0a" "\xe7\xea\x6a\xff\x8f\x17\xda\xf4\xc3\xc5\x2d\xc6\xff\xa0\x5c\xe5\xfd\x38" "\xea\x4d\xd0\x8e\x84\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\x3b\x5c\x1a\x11\xff" "\x89\x24\x1d\x5b\x2d\xa7\xe9\xd8\x58\xc4\x50\x44\xfc\x2f\x06\xd3\xd9\xb9" "\xf9\x85\x17\x2e\xcc\xbd\x77\x75\x3a\xdb\xb7\xfe\xf9\xff\xc3\x2b\xeb\x49" "\xe9\xf9\xff\x23\x65\xeb\x93\x1b\xd6\x8f\x45\xc4\xbe\x88\xf8\xa2\x67\x4f" "\x61\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\xc2\x35\xff\xf9\xfe\x8d\xd7\xff" "\x67\x7e\xeb\xe9\x74\x74\x40\xcb\xe5\x8a\x3f\xe5\x3b\x74\x9f\x5c\xc3\xaf" "\xcc\xf7\x37\x35\x10\xa0\xed\x1a\xcf\x7f\x60\xa7\xab\x3f\xff\x7b\x5b\x1a" "\x07\xd0\x7e\xb5\xf3\xff\xc1\xc3\x7c\x41\x5b\xc3\x01\xda\x48\xff\x1f\xba" "\x57\x83\xf9\xef\xeb\x02\xd8\x05\xb4\xff\xd0\xad\xea\x1c\xd3\x1b\x68\x75" "\x1c\x40\x27\xd4\xdd\xfe\x2f\xb7\x36\x0e\x00\x00\x00\x00\x00\xa0\x29\xf6" "\x1d\xbc\xfb\x73\x12\x11\x4b\x2f\xef\x29\x2c\x99\xbe\xe2\x3e\x93\xfd\x61" "\x77\x4b\x3b\x1d\x00\xd0\x31\xe6\xf0\x42\xf7\xca\xcd\x75\x3a\x02\xa0\x53" "\x7c\xc6\x07\x92\xd5\xd2\x5f\x55\x2f\xf6\x5f\x9b\xfd\xdf\x57\xf3\x95\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x6b\x1d\x3a\xe0\xfa\x7f\xe8\x56" "\x69\xc4\x26\x8f\xf0\x36\xb7\x1f\x76\xb3\x4d\xae\xff\xaf\x96\xfc\x6e\x17" "\x00\xbb\x48\xed\x47\x7f\xd4\xd3\xf6\x27\x7a\x08\xb0\x83\xf9\x8c\x0f\x3c" "\xae\x1d\xaf\xfd\xf4\x3f\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x68\x9b\x81\x1b\x97\xa7\x66\x67\x67\xae\xcf\x2f\xee\xbc\xc2\xab\xdb\x23" "\x8c\x1a\x85\xec\xdd\xad\xb2\x6b\x69\xaa\xd3\x81\x35\xbf\xf0\xa8\x35\x47" "\xee\x8d\x88\xed\x71\x82\xed\x2e\x94\x6e\xc1\xd1\xc1\x30\x3a\xfb\xdf\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" "\xe6\xdf\x00\x00\x00\xff\xff\x4c\x32\x2e\x2e", 1559)); NONFAILING(syz_mount_image(/*fs=*/0x200000000080, /*dir=*/0x200000000040, /*flags=MS_REC|MS_SYNCHRONOUS|MS_RDONLY*/ 0x4011, /*opts=*/0x200000000900, /*chdir=*/0, /*size=*/0x617, /*img=*/0x200000001f00)); // 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; }