// https://syzkaller.appspot.com/bug?id=c1757aebdcacab7d2b70d4403ceaef99c50ddff3 // 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 = 0x200000 (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 { // block_validity: buffer: {62 6c 6f 63 6b 5f 76 61 6c 69 64 69 // 74 79} (length 0xe) // } // comma: const = 0x2c (1 bytes) // } // 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) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // sysvgroups: buffer: {73 79 73 76 67 72 6f 75 70 73} (length // 0xa) // } // 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 { // debug_want_extra_isize: fs_opt["debug_want_extra_isize", // fmt[hex, int32]] { // name: buffer: {64 65 62 75 67 5f 77 61 6e 74 5f 65 78 74 72 // 61 5f 69 73 69 7a 65} (length 0x16) eq: const = 0x3d (1 // bytes) val: int32 = 0x80 (18 bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // grpjquota: buffer: {67 72 70 6a 71 75 6f 74 61 3d} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nogrpid: buffer: {6e 6f 67 72 70 69 64} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // noauto_da_alloc: buffer: {6e 6f 61 75 74 6f 5f 64 61 5f 61 6c // 6c 6f 63} (length 0xf) // } // 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 = 0x3 (1 bytes) // size: len = 0x577 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x577) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000040, "ext4\000", 5)); NONFAILING(memcpy((void*)0x200000000140, "./file1\000", 8)); NONFAILING(memcpy((void*)0x200000000bc0, "block_validity", 14)); NONFAILING(*(uint8_t*)0x200000000bce = 0x2c); NONFAILING(memcpy((void*)0x200000000bcf, "errors=remount-ro", 17)); NONFAILING(*(uint8_t*)0x200000000be0 = 0x2c); NONFAILING(memcpy((void*)0x200000000be1, "sysvgroups", 10)); NONFAILING(*(uint8_t*)0x200000000beb = 0x2c); NONFAILING(memcpy((void*)0x200000000bec, "norecovery", 10)); NONFAILING(*(uint8_t*)0x200000000bf6 = 0x2c); NONFAILING(memcpy((void*)0x200000000bf7, "debug_want_extra_isize", 22)); NONFAILING(*(uint8_t*)0x200000000c0d = 0x3d); NONFAILING(sprintf((char*)0x200000000c0e, "0x%016llx", (long long)0x80)); NONFAILING(*(uint8_t*)0x200000000c20 = 0x2c); NONFAILING(memcpy((void*)0x200000000c21, "grpjquota=", 10)); NONFAILING(*(uint8_t*)0x200000000c2b = 0x2c); NONFAILING(memcpy((void*)0x200000000c2c, "nogrpid", 7)); NONFAILING(*(uint8_t*)0x200000000c33 = 0x2c); NONFAILING(memcpy((void*)0x200000000c34, "noauto_da_alloc", 15)); NONFAILING(*(uint8_t*)0x200000000c43 = 0x2c); NONFAILING(memcpy((void*)0x200000000c44, "norecovery", 10)); NONFAILING(*(uint8_t*)0x200000000c4e = 0x2c); NONFAILING(*(uint8_t*)0x200000000c4f = 0); NONFAILING(memcpy( (void*)0x200000000640, "\x78\x9c\xec\xdd\xcf\x6b\x1c\x55\x1c\x00\xf0\xef\x6c\x92\x36\xfd\xa1\x4d" "\xa1\x14\xf5\x20\x81\x1e\xac\xd4\x6e\x9a\xc4\x1f\x15\x84\xd6\xa3\x68\xb1" "\xa0\xf7\xba\x6c\xa6\xa1\x64\xd3\x2d\xd9\x4d\x69\x62\xa1\xed\xc1\x5e\xbc" "\x48\x11\x44\x2c\x88\x7f\x80\x77\x8f\xc5\x7f\xc0\xbf\xa2\xa0\x85\x22\x25" "\xe8\xc1\x4b\x64\x36\xb3\xcd\x36\xc9\xe6\x57\x37\x4d\x74\x3e\x1f\x98\xf6" "\xbd\x99\xd9\xbc\x79\xfb\xe6\xfb\xf6\x3b\x3b\xbb\x6c\x00\x85\x35\x9c\xfd" "\x53\x8a\x78\x35\x22\xbe\x49\x22\x8e\x74\x6c\xeb\x8f\x7c\xe3\xf0\xd2\x7e" "\x0b\x4f\x6e\x56\x17\x0e\xdc\xac\x26\xb1\xb8\xf8\xd9\x9f\x49\x24\xf9\xba" "\xf6\xfe\x49\xfe\xff\xa1\xbc\xf2\x4a\x44\xfc\xfa\x55\xc4\xa9\xd2\xea\x76" "\x1b\x73\xf3\x53\x95\x5a\x2d\x9d\xc9\xeb\x23\xcd\xe9\x6b\x23\x8d\xb9\xf9" "\xd3\x57\xa6\x2b\x93\xe9\x64\x7a\x75\x6c\x7c\xfc\xec\x3b\xe3\x63\xef\xbf" "\xf7\x6e\xcf\xfa\xfa\xe6\xc5\xbf\xbf\xff\xf4\xc1\x47\x67\xbf\x3e\xb1\xf0" "\xdd\xcf\x8f\x8e\xde\x4b\xe2\x7c\x1c\xce\xb7\x75\xf6\xe3\x39\xdc\xee\xac" "\x0c\xc7\x70\xfe\x9c\x0c\xc4\xf9\x15\x3b\x8e\xf6\xa0\xb1\xbd\x24\xd9\xed" "\x03\x60\x5b\xfa\xf2\x38\x1f\x88\x6c\x0e\x38\x12\x7d\x79\xd4\x03\xff\x7f" "\xb7\x22\x62\x11\x28\xa8\x44\xfc\x43\x41\xb5\xf3\x80\xd6\xb5\x7d\xbe\xec" "\x6e\x46\xf2\x62\x3d\xfe\x70\xe9\x02\x68\x75\xff\xfb\x97\xde\x1b\x89\xc1" "\xd6\xb5\xd1\xc1\x85\xe4\x99\x2b\xa3\xec\x7a\x77\xa8\x07\xed\x67\x6d\xfc" "\xf2\xc7\xfd\x7b\xd9\x12\x1b\xbc\x0f\x71\xab\x07\xed\x01\xb4\xdd\xbe\x13" "\x11\x67\xfa\xfb\x57\xcf\x7f\x49\x3e\xff\x6d\xdf\x99\xd6\x9b\xc7\xeb\x5b" "\xd9\x46\xd1\x5e\x7f\x60\x37\x3d\xc8\xf2\x9f\xb7\xd6\xca\x7f\x4a\x4f\xf3" "\x9f\x58\x23\xff\x39\xb4\x46\xec\x6e\xc7\xc6\xf1\x5f\x7a\xd4\x83\x66\xba" "\xca\xf2\xbf\x0f\xd6\xcc\x7f\x9f\x4e\x5d\x43\x7d\x79\xed\xa5\x56\xce\x37" "\x90\x5c\xbe\x52\x4b\xcf\x44\xc4\xcb\x11\x71\x32\x06\xf6\x67\xf5\xf5\xee" "\xe7\x9c\x5d\x78\xb8\xd8\x6d\x5b\x67\xfe\x97\x2d\x59\xfb\xed\x5c\x30\x3f" "\x8e\x47\xfd\xfb\x9f\x7d\xcc\x44\xa5\x59\x79\x9e\x3e\x77\x7a\x7c\x27\xe2" "\xb5\xe5\xfc\x37\x89\x55\xf3\xff\x60\x2b\xd7\x5d\x39\xfe\xd9\xf3\x71\x71" "\x93\x6d\x1c\x4f\xef\xbf\xde\x6d\xdb\xc6\xfd\xef\xd4\xfb\x0c\x78\xf1\xa7" "\x88\x37\xd6\x1c\xff\xe5\x3b\x5a\xc9\xfa\xf7\x27\x47\x5a\xe7\xc3\x48\xfb" "\xac\x58\xed\xaf\xbb\xc7\x7f\xeb\xd6\xfe\xd6\xfa\xdf\x7b\xd9\xf8\x1f\x5c" "\xbf\xff\x43\x49\xe7\xfd\xda\xc6\xd6\xdb\xf8\x71\xf0\x9f\xb4\xdb\xb6\xed" "\x9e\xff\xfb\x92\xcf\x5b\xe5\x7d\xb1\x74\xfd\x76\xa3\xd2\x6c\xce\x8c\x46" "\xec\x4b\x3e\x59\x5e\x1f\xf9\xfa\xb1\xe5\xc7\xb6\xeb\xed\xfd\xb3\xfe\x9f" "\x3c\xb1\xfe\xfc\xb7\xd6\xf9\x7f\x20\x22\xbe\xd8\x64\xff\xef\x1e\xbb\xdb" "\x75\xd7\xbd\x30\xfe\x13\x5b\x1a\xff\xad\x17\x1e\x7e\xfc\xe5\x0f\xdd\xda" "\xdf\xdc\xf8\xbf\xdd\x2a\x9d\xcc\xd7\x6c\x66\xfe\xdb\xec\x01\x3e\xcf\x73" "\x07\x00\x00\x00\x00\x00\x00\x7b\x4d\x29\x22\x0e\x47\x52\x2a\x3f\x2d\x97" "\x4a\xe5\xf2\xd2\xe7\x3b\x8e\xc5\xc1\x52\xad\xde\x68\x9e\xba\x5c\x9f\xbd" "\x3a\x11\xad\xef\xca\x0e\xc5\x40\xa9\x7d\xa7\xfb\x48\xc7\xe7\x21\x46\xf3" "\xcf\xc3\xb6\xeb\x63\x2b\xea\xe3\x11\x71\x34\x22\xbe\xed\x3b\xd0\xaa\x97" "\xab\xf5\xda\xc4\x6e\x77\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xf6\x88\x43\x5d\xbe\xff\x9f\xf9\xbd\x6f\xb7\x8f\x0e\xd8" "\x71\x7e\xf2\x1b\x8a\x6b\xc3\xf8\xef\xc5\x2f\x3d\x01\x7b\x92\xd7\x7f\x28" "\x2e\xf1\x0f\xc5\x25\xfe\xa1\xb8\xc4\x3f\x14\x97\xf8\x87\xe2\x12\xff\x50" "\x5c\xe2\x1f\x8a\x4b\xfc\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x4f\x5d\xbc\x70\x21\x5b\x16\x17" "\x9e\xdc\xac\x66\xf5\x89\xeb\x73\xb3\x53\xf5\xeb\xa7\x27\xd2\xc6\x54\x79" "\x7a\xb6\x5a\xae\xd6\x67\xae\x95\x27\xeb\xf5\xc9\x5a\x5a\xae\xd6\xa7\x37" "\xfa\x7b\xb5\x7a\xfd\xda\xe8\x58\xcc\xde\x18\x69\xa6\x8d\xe6\x48\x63\x6e" "\xfe\xd2\x74\x7d\xf6\x6a\xf3\xd2\x95\xe9\xca\x64\x7a\x29\x1d\x78\x21\xbd" "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xff\x96" "\xc6\xdc\xfc\x54\xa5\x56\x4b\x67\x14\xba\x16\xce\xc5\x9e\x38\x8c\x6d\x17" "\x92\x8d\x46\xf9\x5c\x7e\x32\x6c\xab\x89\xfe\xdd\xef\xa0\xc2\x0e\x14\x36" "\x35\x7d\x0c\xee\xe8\xe4\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\xb9\x7f\x03\x00\x00\xff\xff\x96\xfc\x32\xeb", 1399)); NONFAILING(syz_mount_image(/*fs=*/0x200000000040, /*dir=*/0x200000000140, /*flags=MS_RELATIME*/ 0x200000, /*opts=*/0x200000000bc0, /*chdir=*/3, /*size=*/0x577, /*img=*/0x200000000640)); // quotactl$Q_QUOTAON arguments: [ // cmd: quota_cmd_quota_on = 0xffffffff80000202 (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_PRJ*/ 0xffffffff80000202ul, /*special=*/0x200000000180ul, /*id=*/(intptr_t)-1, /*addr=*/0ul); // 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 = 0x0 (2 bytes) // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000440, ".\000", 2)); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000440ul, /*flags=*/0, /*mode=*/0); if (res != -1) r[0] = res; // symlinkat arguments: [ // old: ptr[in, buffer] { // buffer: {2e 02 00} (length 0x3) // } // newfd: fd_dir (resource) // new: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // ] NONFAILING(memcpy((void*)0x200000000080, ".\002\000", 3)); NONFAILING(memcpy((void*)0x200000000200, "./file0\000", 8)); syscall(__NR_symlinkat, /*old=*/0x200000000080ul, /*newfd=*/r[0], /*new=*/0x200000000200ul); // 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[1] = res; // mmap arguments: [ // addr: VMA[0xb36000] // len: len = 0xb36000 (4 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=*/0xb36000, /*prot=PROT_SEM|PROT_WRITE*/ 0xaul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[1], /*offset=*/0ul); // 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 = 0x2800000 (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 { // inode_readahead_blks: fs_opt["inode_readahead_blks", fmt[hex, // flags[ext4_inode_readahead_blks]]] { // name: buffer: {69 6e 6f 64 65 5f 72 65 61 64 61 68 65 61 64 // 5f 62 6c 6b 73} (length 0x14) eq: const = 0x3d (1 bytes) // val: ext4_inode_readahead_blks = 0x4000000 (18 bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // noauto_da_alloc: buffer: {6e 6f 61 75 74 6f 5f 64 61 5f 61 6c // 6c 6f 63} (length 0xf) // } // 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 { // test_dummy_encryption_v1: buffer: {74 65 73 74 5f 64 75 6d 6d // 79 5f 65 6e 63 72 79 70 74 69 6f 6e 3d 76 31} (length 0x18) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nodiscard: buffer: {6e 6f 64 69 73 63 61 72 64} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // data_err_ignore: buffer: {64 61 74 61 5f 65 72 72 3d 69 67 6e // 6f 72 65} (length 0xf) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // acl: buffer: {61 63 6c} (length 0x3) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // journal_ioprio: fs_opt["journal_ioprio", fmt[hex, int32[0:7]]] // { // name: buffer: {6a 6f 75 72 6e 61 6c 5f 69 6f 70 72 69 6f} // (length 0xe) eq: const = 0x3d (1 bytes) val: int32 = 0x0 (18 // bytes) // } // } // 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) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0xbb4 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xbb4) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000340, "ext4\000", 5)); NONFAILING(memcpy((void*)0x200000000280, "./file0\000", 8)); NONFAILING(memcpy((void*)0x200000000140, "inode_readahead_blks", 20)); NONFAILING(*(uint8_t*)0x200000000154 = 0x3d); NONFAILING(sprintf((char*)0x200000000155, "0x%016llx", (long long)0x4000000)); NONFAILING(*(uint8_t*)0x200000000167 = 0x2c); NONFAILING(memcpy((void*)0x200000000168, "noauto_da_alloc", 15)); NONFAILING(*(uint8_t*)0x200000000177 = 0x2c); NONFAILING(memcpy((void*)0x200000000178, "grpid", 5)); NONFAILING(*(uint8_t*)0x20000000017d = 0x2c); NONFAILING(memcpy((void*)0x20000000017e, "test_dummy_encryption=v1", 24)); NONFAILING(*(uint8_t*)0x200000000196 = 0x2c); NONFAILING(memcpy((void*)0x200000000197, "nodiscard", 9)); NONFAILING(*(uint8_t*)0x2000000001a0 = 0x2c); NONFAILING(memcpy((void*)0x2000000001a1, "data_err=ignore", 15)); NONFAILING(*(uint8_t*)0x2000000001b0 = 0x2c); NONFAILING(memcpy((void*)0x2000000001b1, "acl", 3)); NONFAILING(*(uint8_t*)0x2000000001b4 = 0x2c); NONFAILING(memcpy((void*)0x2000000001b5, "journal_ioprio", 14)); NONFAILING(*(uint8_t*)0x2000000001c3 = 0x3d); NONFAILING(sprintf((char*)0x2000000001c4, "0x%016llx", (long long)0)); NONFAILING(*(uint8_t*)0x2000000001d6 = 0x2c); NONFAILING(memcpy((void*)0x2000000001d7, "resuid", 6)); NONFAILING(*(uint8_t*)0x2000000001dd = 0x3d); NONFAILING(sprintf((char*)0x2000000001de, "0x%016llx", (long long)0)); NONFAILING(*(uint8_t*)0x2000000001f0 = 0x2c); NONFAILING(*(uint8_t*)0x2000000001f1 = 0); NONFAILING(memcpy( (void*)0x2000000017c0, "\x78\x9c\xec\xdc\xcd\x6b\x5c\xe5\x1a\x00\xf0\xe7\x9c\x7c\xb6\xcd\xbd\x93" "\x5e\x2e\x97\xdb\xbb\x69\x2e\x97\x4b\x0b\xe2\x34\xad\xa4\xd8\x22\xd8\x4a" "\xc5\x8d\x0b\x41\xb7\x42\x43\x3a\x29\x21\xd3\x0f\x92\x48\x4d\x9a\xc5\x44" "\xff\x01\x51\xd7\x82\x1b\x41\x2d\x4a\x17\x76\xdd\x8d\x82\x5b\x37\x5a\xb7" "\x16\x17\x42\x91\xd8\x28\x88\x68\xe4\xcc\x47\x92\x26\x33\x49\xda\x4e\x72" "\x62\xf2\xfb\xc1\x9b\xf3\xbe\xf3\x9c\x39\xef\xf3\xe4\x30\x73\xce\x0b\x33" "\x13\xc0\x9e\x35\x90\xfd\x49\x23\x0e\x45\xc4\xf9\x24\xa2\x50\x7f\x3c\x8d" "\x88\xee\x6a\xaf\x37\xa2\x52\xdb\x6f\x61\x7e\x76\xe4\x97\xf9\xd9\x91\x24" "\x16\x17\x5f\xfe\x31\x89\x24\x22\xee\xcf\xcf\x8e\x34\x8e\x95\xd4\xb7\x07" "\xea\x83\xde\x88\xf8\xea\xb9\x24\xfe\xf1\xe6\xda\x79\x27\xa7\x67\xc6\x87" "\xcb\xe5\xd2\x44\x7d\x7c\x6c\xea\xd2\xd5\x63\x93\xd3\x33\x4f\x8e\x5d\x1a" "\xbe\x58\xba\x58\xba\x7c\xfc\xe4\xd3\x43\x27\x86\x4e\x0e\x9e\x1a\x6a\x5b" "\xad\xbf\x7e\x77\xe6\xd6\xcf\xff\x7d\xe1\xfb\xca\x6f\x1f\xfd\x7e\xe3\xa7" "\x77\x3e\x48\xe2\x4c\xf4\xd5\x63\x2b\xeb\xa8\x57\xfd\xd8\x06\x62\x60\xe9" "\x7f\xb2\x52\x67\x44\x0c\xb7\xe1\xf8\x3b\x41\x47\xbd\x9e\x95\x75\x26\x9d" "\x1b\x3c\x29\xdd\xe2\xa4\x00\x00\x68\x29\x5d\x71\x0f\xf7\xaf\x28\x44\x47" "\x2c\xdf\xbc\x15\xe2\xf3\xaf\x73\x4d\x0e\x00\x00\x00\x68\x8b\xc5\x8e\x88" "\x45\x00\x00\x00\x60\x97\x4b\xac\xff\x01\x00\x00\x60\x97\x6b\x7c\x0e\xe0" "\xfe\xfc\xec\x48\xa3\xe5\xfb\x89\x84\xed\x75\xef\x6c\x44\xf4\xd7\xea\x5f" "\xa8\xb7\x5a\xa4\x33\x2a\xd5\x6d\x6f\x74\x45\xc4\xfe\xfb\x49\xac\xfc\x5a" "\x6b\x52\x7b\xda\x63\x1b\x88\x88\xbb\xdf\x9e\xfa\x34\x6b\xd1\xe4\x7b\xc8" "\x5b\xad\x32\x17\x11\xff\x6e\x76\xfe\x93\x6a\xfd\xfd\xf5\x6f\x42\xaf\xae" "\x3f\x8d\x88\xc1\x36\xcc\x3f\xb0\x6a\xfc\x57\xaa\xff\x4c\x1b\xe6\xcf\xbb" "\x7e\x00\xf6\xa6\xdb\x67\x6b\x17\xb2\xb5\xd7\xbf\x74\xe9\xfe\x27\x9a\x5c" "\xff\x3a\x9b\x5c\xbb\x1e\x45\xde\xd7\xbf\xc6\xfd\xdf\xc2\x9a\xfb\xbf\xe5" "\xfa\x3b\x5a\xdc\xff\xbd\xb4\xc9\x39\xae\x7f\xf8\xde\xb5\x56\xb1\xac\xfe" "\x67\x6e\x3d\xff\x49\xa3\x65\xf3\x67\xdb\xc7\x2a\xea\x21\xdc\x9b\x8b\xf8" "\x4f\x67\xb3\xfa\x93\xa5\xfa\x93\x16\xf5\x9f\xdf\xe4\x1c\x85\x3f\xae\x95" "\x5a\xc5\xf2\xae\x7f\xf1\xfd\x88\x23\xd1\xbc\xfe\x86\x64\xfd\xdf\x27\x3a" "\x36\x3a\x56\x2e\x0d\xd6\xfe\x36\x9d\x63\xee\xcb\xa1\x8f\x5b\xcd\x9f\x77" "\xfd\xd9\xf9\xdf\xdf\xa2\xfe\x8d\xce\xff\xd5\x07\x8e\xd4\xfa\x47\x7d\x5e" "\x3d\x77\xee\x66\xab\xd8\xc6\xf5\xa7\x3f\x74\x27\xaf\x54\x7b\xdd\xf5\x47" "\x5e\x1f\x9e\x9a\x9a\x38\x1e\xd1\x9d\xbc\xb8\xf6\xf1\x13\xeb\xd7\xdb\xd8" "\xa7\x71\x8c\xac\xfe\xa3\xff\x5b\xff\xf5\xdf\xac\xfe\xec\x3d\xa1\x52\xff" "\x3f\x64\x95\xcf\xd5\xb7\xd9\xf8\x8d\x55\x73\x3e\x7b\xe3\xfa\x67\xeb\xd5" "\x9f\xad\xfd\xf2\x3c\xff\x17\x1e\xf1\xfc\xbf\xb5\xc9\x39\xfe\xff\xc5\xdb" "\x47\x5b\xc5\x56\xae\x7f\xb3\x96\xcd\x7f\x37\xa9\xad\x85\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xa0\x21\x8d\x88\xbe\x48\xd2\x62\x44\x24\xd5\x7e\x9a\x16\x8b" "\x11\x07\x22\xe2\x9f\xb1\x3f\x2d\x5f\x99\x9c\x7a\x62\xf4\xca\x6b\x97\x2f" "\x64\xb1\x88\xfe\xe8\x4a\x47\xc7\xca\xa5\xc1\x88\x28\xd4\xc6\x49\x36\x3e" "\x5e\xed\x2f\x8f\x4f\xac\x1a\x3f\x15\x11\x07\x23\xe2\xdd\xc2\xbe\xea\xb8" "\x38\x72\xa5\x7c\x21\xef\xe2\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\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x72" "\x20\x22\xfa\x22\x49\x8b\x11\x91\x46\xc4\x42\x21\x4d\x8b\xc5\xbc\xb3\x02" "\x00\x00\x00\xda\xae\x3f\xef\x04\x00\x00\x00\x80\x2d\x67\xfd\x0f\x00\x00" "\x00\xbb\x9f\xf5\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x5b\xec\xe0\xe1\xdb\x77\x92\x88\xa8\x9c\xde\x57\x6d\x99\xee\x7a" "\xac\x2b\xd7\xcc\x80\xad\x96\xe6\x9d\x00\x90\x9b\x8e\xbc\x13\x00\x72\xd3" "\x99\x77\x02\x40\x6e\x1e\x72\x8d\xef\x76\x01\x76\xa1\x64\x83\x78\x6f\xcb" "\x48\x4f\xdb\x73\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\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\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\xe7\x3a\x72\xe8\xf6\x9d\x24\x22\x2a" "\xa7\xf7\x55\x5b\xa6\xbb\x1e\xeb\x6a\xfa\x8c\xc3\xdb\x98\x1d\xb0\x95\xd2" "\xbc\x13\x00\x72\xd3\xb1\x5e\xb0\x73\xfb\xf2\x00\xb6\x9f\x97\x38\xec\x5d" "\xcd\xd7\xf8\xc0\x5e\x92\x6c\x10\xef\x5d\xde\xa7\xf2\x60\xa4\x67\xcb\x72" "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xe7\xe9\xab\xb6\x24\x2d\x46\x44\x5a\xed\xa7\x69\xb1" "\x18\xf1\xb7\x88\xe8\x8f\xae\x64\x74\xac\x5c\x1a\x8c\x88\xbf\x47\xc4\x37" "\x85\xae\x9e\x6c\xdc\x93\x77\xd2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4" "\xdd\xe4\xf4\xcc\xf8\x70\xb9\x5c\x9a\xd0\xd1\xd1\xc9\xb7\x93\xec\x8c\x34" "\x6a\x9d\xbc\xdf\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\xc3\xe4\xf4\xcc" "\xf8\x70\xb9\x5c\x9a\x98\xcc\x3b\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\x20\x6f\x93\xd3\x33\xe3\xc3\xe5\x72" "\x69\x62\x13\x9d\x9b\x0f\xb3\xf3\x8a\x4e\xde\x35\x02\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x9f\x3f\x03" "\x00\x00\xff\xff\xd6\xf8\x0d\xf4", 2996)); NONFAILING(syz_mount_image(/*fs=*/0x200000000340, /*dir=*/0x200000000280, /*flags=MS_LAZYTIME|MS_I_VERSION*/ 0x2800000, /*opts=*/0x200000000140, /*chdir=*/1, /*size=*/0xbb4, /*img=*/0x2000000017c0)); // chdir arguments: [ // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // ] NONFAILING(memcpy((void*)0x200000000040, "./file0\000", 8)); syscall(__NR_chdir, /*dir=*/0x200000000040ul); // fchmodat arguments: [ // dirfd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 00} (length 0x2) // } // mode: open_mode = 0xffffff50 (8 bytes) // ] NONFAILING(memcpy((void*)0x200000000300, ".\000", 2)); syscall(__NR_fchmodat, /*dirfd=*/0xffffff9c, /*file=*/0x200000000300ul, /*mode=S_IWGRP|S_IXUSR|S_IRUSR|0xfffffe00*/ 0xffffff50ul); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000, /*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; }