// https://syzkaller.appspot.com/bug?id=b3d4ed3e41b3085ce97f4504f4183e3f99115fb2 // 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_ioctl #define __NR_ioctl 29 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif static unsigned long long procid; 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_RDONLY); if (loopfd == -1) { return; } if (ioctl(loopfd, LOOP_CLR_FD, 0)) { } close(loopfd); } static long syz_mount_image(volatile long fsarg, volatile long dir, volatile long flags, volatile long optsarg, volatile long change_dir, volatile unsigned long size, volatile long image) { unsigned char* data = (unsigned char*)image; int res = -1, err = 0, need_loop_device = !!size; char* mount_opts = (char*)optsarg; char* target = (char*)dir; char* fs = (char*)fsarg; char* source = NULL; char loopname[64]; if (need_loop_device) { int loopfd; memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; close(loopfd); source = loopname; } mkdir(target, 0777); char opts[256]; memset(opts, 0, sizeof(opts)); if (strlen(mount_opts) > (sizeof(opts) - 32)) { } strncpy(opts, mount_opts, sizeof(opts) - 32); if (strcmp(fs, "iso9660") == 0) { flags |= MS_RDONLY; } else if (strncmp(fs, "ext", 3) == 0) { bool has_remount_ro = false; char* remount_ro_start = strstr(opts, "errors=remount-ro"); if (remount_ro_start != NULL) { char after = *(remount_ro_start + strlen("errors=remount-ro")); char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1); has_remount_ro = ((before == '\0' || before == ',') && (after == '\0' || after == ',')); } if (strstr(opts, "errors=panic") || !has_remount_ro) strcat(opts, ",errors=continue"); } else if (strcmp(fs, "xfs") == 0) { strcat(opts, ",nouuid"); } else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts, "errors=panic") || strstr(opts, "debug"))) { strcat(opts, ",errors=withdraw"); } res = mount(source, target, fs, flags, opts); if (res == -1) { err = errno; goto error_clear_loop; } res = open(target, O_RDONLY | O_DIRECTORY); if (res == -1) { err = errno; goto error_clear_loop; } if (change_dir) { if (chdir(target) == -1) { err = errno; close(res); res = -1; } } error_clear_loop: if (need_loop_device) reset_loop_device(loopname); errno = err; return res; } #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_RDONLY); 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[1] = {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 = 0x4000 (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 { // nodioread_nolock: 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[ext4_options] { // elem: union ext4_options { // grpquota: buffer: {67 72 70 71 75 6f 74 61} (length 0x8) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // init_itable: buffer: {69 6e 69 74 5f 69 74 61 62 6c 65} // (length 0xb) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // user_xattr: buffer: {75 73 65 72 5f 78 61 74 74 72} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nomblk_io_submit: buffer: {6e 6f 6d 62 6c 6b 5f 69 6f 5f 73 75 // 62 6d 69 74} (length 0x10) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x2 (1 bytes) // size: len = 0xbb8 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xbb8) // } // ] // returns fd_dir memcpy((void*)0x20000bc0, "ext4\000", 5); memcpy((void*)0x20000240, "./file1\000", 8); memcpy((void*)0x20000340, "nodioread_nolock", 16); *(uint8_t*)0x20000350 = 0x2c; memcpy((void*)0x20000351, "grpquota", 8); *(uint8_t*)0x20000359 = 0x2c; memcpy((void*)0x2000035a, "init_itable", 11); *(uint8_t*)0x20000365 = 0x2c; memcpy((void*)0x20000366, "user_xattr", 10); *(uint8_t*)0x20000370 = 0x2c; memcpy((void*)0x20000371, "nomblk_io_submit", 16); *(uint8_t*)0x20000381 = 0x2c; *(uint8_t*)0x20000382 = 0; memcpy( (void*)0x200017c0, "\x78\x9c\xec\xdc\xcd\x6b\x5c\x55\x1b\x00\xf0\xe7\xde\x4c\xa6\x69\x9b\xf7" "\x9d\xf4\xe5\x45\xac\x1b\x23\x22\x2d\x88\xd3\xa4\x92\x62\x8b\x60\x2b\x15" "\x37\x2e\x04\xdd\x0a\x0d\xe9\xa4\x84\x4c\x3f\x48\x22\x35\x69\x16\x13\xfd" "\x07\x44\x5d\x0b\x6e\x04\xb5\x28\x2e\xec\xba\x1b\x45\xb7\x6e\xb4\xdd\x2a" "\x2e\x84\x22\xb1\x51\x10\xd1\xc8\x9d\x8f\x24\x36\x99\x34\xb5\x33\xbd\x31" "\xfd\xfd\xe0\xcc\x3d\xe7\x9e\x99\x79\x9e\x67\x2e\x33\xf7\x1e\x98\x99\x00" "\xee\x5b\x83\xd9\x4d\x1a\xb1\x3f\x22\x4e\x25\x11\xa5\xe6\xfe\x34\x22\x8a" "\xf5\x5e\x5f\x44\xad\x71\xbf\xa5\xc5\xf9\xb1\x5f\x17\xe7\xc7\x92\x58\x5e" "\x7e\xe9\xa7\x24\x92\x88\xb8\xb9\x38\x3f\xd6\x7a\xae\xa4\xb9\xdd\xdb\x1c" "\xf4\x45\xc4\xd7\xcf\x26\xf1\xbf\x37\xd6\xc7\x9d\x9e\x9d\x9b\x1c\xad\x56" "\x2b\x53\xcd\xf1\xa1\x99\xb3\x17\x0e\x4d\xcf\xce\x3d\x31\x71\x76\xf4\x4c" "\xe5\x4c\xe5\xdc\xf0\x91\xa7\x46\x0e\x8f\x1c\x19\x3a\x3a\xd2\xb1\x5a\x7f" "\xfb\xee\xf8\x95\x5f\x1e\x79\xfe\x87\xda\xef\x1f\xfe\x71\xf9\xe7\xb7\xdf" "\x4f\xe2\x78\xf4\x37\xe7\xd6\xd6\xd1\x29\x83\x31\xb8\xf2\x9a\xac\x55\x88" "\x88\xd1\x4e\x07\xcb\x49\x4f\xb3\x9e\xb5\x75\x26\x85\xdb\x3c\x28\xed\x72" "\x52\x00\x00\xb4\x95\xae\xb9\x86\x7b\x20\x4a\xd1\x13\xab\x17\x6f\xa5\xf8" "\xfc\x9b\x5c\x93\x03\x00\x00\x00\x3a\x62\xb9\x27\x62\x19\x00\x00\x00\xd8" "\xe1\x12\xeb\x7f\x00\x00\x00\xd8\xe1\x5a\xdf\x03\xb8\xb9\x38\x3f\xd6\x6a" "\xf9\x7e\x23\xe1\xde\xba\x71\x22\x22\x06\x1a\xf5\x2f\x35\x5b\x63\xa6\x10" "\xb5\xfa\xb6\x2f\x7a\x23\x62\xcf\xcd\x24\xd6\xfe\xac\x35\x69\x3c\xec\xae" "\x0d\x46\xc4\xf7\xd7\x8f\x7e\x92\xb5\xe8\xd2\xef\x90\x37\x53\x5b\x88\x88" "\x07\x37\x3a\xfe\x49\xbd\xfe\x81\xfa\xaf\xb8\xd7\xd7\x9f\x46\xc4\x50\x07" "\xe2\x0f\xde\x32\xfe\x37\xd5\x7f\xbc\x03\xf1\xf3\xae\x1f\x80\xfb\xd3\xd5" "\x13\x8d\x13\xd9\xfa\xf3\x5f\xba\x72\xfd\x13\x1b\x9c\xff\x0a\x1b\x9c\xbb" "\xfe\x89\xbc\xcf\x7f\xad\xeb\xbf\xa5\x75\xd7\x7f\xab\xf5\xf7\xb4\xb9\xfe" "\x7b\x71\x8b\x31\x2e\x7d\xf0\xee\xc5\x76\x73\x59\xfd\x4f\x5f\x79\xee\xe3" "\x56\xcb\xe2\x67\xdb\xbb\x2a\xea\x0e\xdc\x58\x88\x78\xa8\xb0\x51\xfd\xc9" "\x4a\xfd\x49\x9b\xfa\x4f\x6d\x31\x46\xe9\xcf\x8b\x95\x76\x73\x79\xd7\xbf" "\xfc\x5e\xc4\x81\xd8\xb8\xfe\x96\x64\xf3\xff\x27\x3a\x34\x3e\x51\xad\x0c" "\x35\x6e\x37\x8c\xb1\xf0\xd5\xc8\x47\xed\xe2\xe7\x5d\x7f\x76\xfc\xf7\xb4" "\xa9\xbf\xf5\xff\x4f\xed\x8e\xff\x85\x2d\xc6\x78\xe5\xe4\xc9\x4f\xd7\xed" "\xbc\xbe\xda\xdd\xbc\xfe\xf4\xc7\x62\xf2\x72\xbd\x57\x6c\xee\x79\x6d\x74" "\x66\x66\x6a\x38\xa2\x98\xbc\xb0\x7e\xff\xe1\xcd\x73\x69\xdd\xa7\xf5\x1c" "\x59\xfd\x07\x1f\xdd\xfc\xfd\xbf\x51\xfd\xd9\x67\x42\xad\xf9\x3a\x64\x6b" "\x81\x85\xe6\x36\x1b\xbf\x7e\x4b\xcc\x67\x2e\x5f\xfa\xac\x5d\x3e\xad\xf5" "\x5f\x9e\xc7\xff\x74\x9b\xe3\xbf\xb6\xfe\x2f\x0b\xeb\x8f\xff\x9b\x5b\x8c" "\xf1\xd8\x17\x6f\x1d\x6c\x37\xb7\x76\xfd\x9b\xb5\x2c\x7e\x6b\x2d\x0c\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x2d\x69\x44\xf4\x47\x92\x96\x57\xfa\x69\x5a\x2e" "\x47\xec\x8d\x88\xff\xc7\x9e\xb4\x7a\x7e\x7a\xe6\xf1\xf1\xf3\xaf\x9e\x3b" "\x9d\xcd\x45\x0c\x44\x6f\x3a\x3e\x51\xad\x0c\x45\x44\xa9\x31\x4e\xb2\xf1" "\x70\xbd\xbf\x3a\x3e\x7c\xcb\xf8\xc9\x88\xd8\x17\x11\xef\x94\x76\xd7\xc7" "\xe5\xb1\xf3\xd5\xd3\x79\x17\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x8a" "\xbd\x11\xd1\x1f\x49\x5a\x8e\x88\x34\x22\x96\x4a\x69\x5a\x2e\xe7\x9d\x15" "\x00\x00\x00\xd0\x71\x03\x79\x27\x00\x00\x00\x00\x74\x9d\xf5\x3f\x00\x00" "\x00\xec\x7c\xd6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x74\xd9\xbe\x87\xaf\x5e\x4b\x22\xa2\x76\x6c\x77\xbd\x65\x8a\xcd" "\xb9\xde\x5c\x33\x03\xba\x2d\xcd\x3b\x01\x20\x37\x3d\x79\x27\x00\xe4\xa6" "\x90\x77\x02\x40\x6e\xee\x70\x8d\xef\x72\x01\x76\xa0\xe4\x36\xf3\x7d\x6d" "\x67\x76\x75\x3c\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\xaf\x03\xfb\xaf\x5e\x4b\x22\xa2" "\x76\x6c\x77\xbd\x65\x8a\xcd\xb9\xde\x5c\x33\x03\xba\x2d\xcd\x3b\x01\x20" "\x37\x3d\x9b\x4d\x16\xee\x5d\x1e\xc0\xbd\xe7\x2d\x0e\xf7\x2f\x6b\x7c\x20" "\xb9\xcd\x7c\xdf\xea\x7d\x6a\x7f\x9f\xd9\xd5\xb5\x9c\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8" "\x7e\xfa\xeb\x2d\x49\xcb\x11\x51\x6c\xee\x2b\x97\x23\xfe\x13\x11\x03\xd1" "\x9b\x8c\x4f\x54\x2b\x43\x11\xf1\xdf\x88\xf8\xb6\xd4\xbb\x2b\x1b\x0f\xe7" "\x9c\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x37\x3d\x3b\x37\x39\x5a" "\xad\x56\xa6\xb2\x4e\x1a\xcd\xce\xca\x1e\x9d\xd5\x4e\xd2\x78\xc5\x6a\xdb" "\x25\x1f\x9d\xbb\xec\x14\x63\x5b\xa4\xb1\x4d\x3b\x79\x7f\x32\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\x90\x87\xe9\xd9\xb9\xc9\xd1\x6a\xb5\x32\x35\x9d\x77" "\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xde\xa6\x67\xe7\x26\x47\xab\xd5\xca\x54\x17\x3b\x79\xd7\x08\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x7e\xfe\x0a\x00\x00\xff\xff\x60\x7e\x0a\x74", 3000); syz_mount_image(/*fs=*/0x20000bc0, /*dir=*/0x20000240, /*flags=MS_REC*/ 0x4000, /*opts=*/0x20000340, /*chdir=*/2, /*size=*/0xbb8, /*img=*/0x200017c0); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x42 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x20000040, "./file1\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul, /*flags=O_CREAT|O_RDWR*/ 0x42, /*mode=*/0); if (res != -1) r[0] = res; // ioctl$EXT4_IOC_MOVE_EXT arguments: [ // fd: fd (resource) // cmd: const = 0x40305829 (4 bytes) // arg: ptr[in, move_extent] { // move_extent { // reserved: const = 0x17c04 (4 bytes) // donor_fd: fd (resource) // orig_start: int64 = 0x0 (8 bytes) // donor_start: int64 = 0x100000001 (8 bytes) // len: int64 = 0x9 (8 bytes) // moved_len: int64 = 0x3ad (8 bytes) // } // } // ] *(uint32_t*)0x200000c0 = 0x17c04; *(uint32_t*)0x200000c4 = -1; *(uint64_t*)0x200000c8 = 0; *(uint64_t*)0x200000d0 = 0x100000001; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = 0x3ad; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40305829, /*arg=*/0x200000c0ul); // 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 = 0x8413 (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 { // noload: buffer: {6e 6f 6c 6f 61 64} (length 0x6) // } // 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 { // 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 { // noblock_validity: buffer: {6e 6f 62 6c 6f 63 6b 5f 76 61 6c 69 // 64 69 74 79} (length 0x10) // } // 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 = 0x533 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x533) // } // ] // returns fd_dir memcpy((void*)0x20000040, "ext4\000", 5); memcpy((void*)0x20000300, "./file0\000", 8); memcpy((void*)0x20000080, "noload", 6); *(uint8_t*)0x20000086 = 0x2c; memcpy((void*)0x20000087, "debug", 5); *(uint8_t*)0x2000008c = 0x2c; memcpy((void*)0x2000008d, "nogrpid", 7); *(uint8_t*)0x20000094 = 0x2c; memcpy((void*)0x20000095, "noblock_validity", 16); *(uint8_t*)0x200000a5 = 0x2c; *(uint8_t*)0x200000a6 = 0; memcpy( (void*)0x20001540, "\x78\x9c\xec\xdd\xcf\x6f\x23\x57\x1d\x00\xf0\xef\x78\xed\x74\xb3\xc9\x36" "\x29\x70\x80\x4a\xb4\xa5\x2d\xca\x46\xb0\x76\xd2\xa8\x6d\x84\x50\x29\x12" "\x82\x53\x25\xa0\xdc\x97\x90\x38\x51\x14\x27\x5e\xc5\x4e\xbb\x89\x2a\x9a" "\x88\x3f\x00\x81\x10\x20\x71\x82\x0b\x17\x24\xfe\x00\x24\x54\x89\x0b\x47" "\x84\x54\x09\xce\x20\x40\x20\x04\x5b\x38\x80\x44\x3b\xc8\xf6\x38\x9b\x1f" "\xb6\x93\x66\x1d\x3b\x4d\x3e\x1f\x69\x76\xde\x9b\x37\xe3\xef\x7b\xbb\x9e" "\xf1\xbc\x99\xd9\x79\x01\x5c\x59\x2f\x67\xd3\x7b\x69\x9a\x4e\x47\xc4\x44" "\xb6\x3c\x97\x4d\x4f\x37\x32\xbb\x11\x4f\x45\xc4\x3b\xf7\xdf\x58\x6c\x4c" "\x49\xa4\xe9\xab\xff\x48\x22\xc9\x96\xb5\x3f\x2b\x6d\x7a\x24\xc6\x5a\x9b" "\x44\xe4\x23\xbe\xfa\xa5\x88\x6f\x24\xc7\xe3\xd6\xb6\x77\xd6\x16\x2a\x95" "\xf2\x66\x96\x2f\xd5\xd7\xef\x96\x6a\xdb\x3b\xb7\x57\xd7\x17\x56\xca\x2b" "\xe5\x8d\xb9\xb9\xd9\x17\xe6\x5f\x9c\x7f\x7e\x7e\xe6\x61\x9a\xb7\x3c\x96" "\x25\x6e\x46\xc4\x4b\x5f\xf8\xcb\xf7\xbf\xfd\xd3\x2f\xbe\xf4\xcb\x4f\xbf" "\xfe\xc7\x3b\x7f\xbb\xf5\xcd\xa4\x55\xe7\x37\xe3\x48\x3b\x4e\xa9\x90\xcd" "\xf3\xbd\x56\x4a\xb2\x55\xaf\x67\xf9\xe9\x6c\xbe\xf9\x3e\x83\x5d\x64\xf9" "\x83\x89\xd1\xd3\x6d\xb3\x97\x7d\x45\x00\x00\x18\xac\xc6\x79\xe9\x87\xb2" "\xf3\xfc\xe9\x98\x88\x6b\x3d\x4e\x67\xdf\x1d\x68\xcd\x00\x00\x00\x80\x7e" "\x49\x3f\x37\x1e\xff\x4b\xda\xf7\xee\x8e\x19\xe9\xb2\x1c\x00\x00\x00\xf8" "\x00\xc9\x45\xc4\x78\x24\xb9\x62\xf6\xbc\xef\x78\xe4\x72\xc5\x62\x34\x9f" "\xe1\xfd\x48\xdc\xc8\x55\xaa\xb5\xfa\xa7\x96\xab\x5b\x1b\x4b\x8d\xb2\x88" "\xc9\x28\xe4\x96\x57\x2b\xe5\x99\xec\x59\xe1\xc9\x28\x24\x8d\xfc\x6c\x33" "\xfd\x20\xff\xdc\x91\xfc\x5c\x44\x3c\x16\x11\xdf\x9b\x18\x6d\xe6\x8b\x8b" "\xd5\xca\xd2\xb0\x2f\x7e\x00\x00\x00\xc0\x15\x31\x76\xa4\xff\xff\xef\x89" "\x56\xff\x1f\x00\x00\x00\xb8\x64\x26\x87\x5d\x01\x00\x00\x00\xe0\xdc\xe9" "\xff\x03\x00\x00\xc0\xe5\xa7\xff\x0f\x00\x00\x00\x97\xda\x97\x5f\x79\xa5" "\x31\xa5\xed\xf1\xaf\x97\x5e\xdb\xde\x5a\xab\xbe\x76\x7b\xa9\x5c\x5b\x2b" "\xae\x6f\x2d\x16\x17\xab\x9b\x77\x8b\x2b\xd5\xea\x4a\xf3\x9d\x7d\xeb\x3d" "\x3f\x6c\x7f\xe8\xc0\x8d\xad\x7b\xa5\x7a\xb9\x56\x2f\xd5\xb6\x77\xee\xac" "\x57\xb7\x36\xea\x77\x56\xf7\x87\xc0\x06\x00\x00\x00\x06\xec\xb1\x27\xdf" "\xfa\x7d\x12\x11\xbb\x9f\x19\x6d\x4e\x0d\x23\x07\xca\xff\x9b\x8d\x13\xd0" "\x65\xf3\xcf\x0e\xa4\x92\xc0\xb9\xd8\xbf\x64\x17\x49\x36\x1f\x39\xbe\xd2" "\x1f\x1e\x6d\xad\xf8\xe7\xc1\xd5\x0b\x38\x7f\xd7\x86\x5d\x01\x60\x68\xf2" "\xc3\xae\x00\x30\x34\x85\x61\x57\x00\x18\xba\xe4\x84\xf2\xae\x0f\xef\xfc" "\x26\x9b\x7f\xa2\xbf\xf5\x01\x00\x00\xfa\x6f\xea\x63\xdd\xef\xff\xe7\x7a" "\x6e\xb9\xdb\xbb\x18\xb8\xf0\xec\xc4\x70\x75\xb9\xff\x0f\x57\x57\xf3\xfe" "\x7f\x87\x47\xfe\x3a\x72\xb2\x00\x97\x4a\xc1\x19\x00\x5c\x79\x0f\x7d\xff" "\xff\x44\x5d\xff\x0f\x11\x00\x00\x30\x20\xe3\xcd\x29\xc9\x15\xb3\xcb\x7b" "\xe3\x91\xcb\x15\x8b\x11\x37\x9b\xc3\x02\x14\x92\xe5\xd5\x4a\x79\x26\x22" "\x1e\x8d\x88\xdf\x4d\x14\x1e\x69\xe4\x67\x9b\x5b\x26\x27\xf6\x19\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80" "\x96\x34\x4d\x22\xed\xe1\xe9\xc3\xa5\xed\x21\x40\x7a\x6d\x02\x00\x00\x00" "\x5c\x30\x11\xb9\xbf\x26\xbf\x6a\xbd\xcb\x7f\x6a\xe2\xd9\xf1\xa3\xd7\x07" "\x46\x92\xff\x4c\x44\x36\x44\xe8\xeb\x3f\x7a\xf5\x07\xf7\x16\xea\xf5\xcd" "\xd9\xc6\xf2\x7f\xee\x2f\xaf\xff\x30\x5b\xfe\xdc\xc0\x2f\x5f\x00\x00\x00" "\x00\x1d\xb4\xfb\xe9\xed\x7e\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\xd3\x3b\xf7\xdf\x58\x6c\x4f\x83" "\x8c\xfb\xf7\xcf\x47\xc4\x64\xa7\xf8\xf9\xb8\xde\x9c\x5f\x8f\x42\x44\xdc" "\xf8\x57\x12\xf9\x03\xdb\x25\x11\x71\xad\x0f\xf1\x77\xf7\x22\xe2\xa3\x9d" "\xe2\x27\x8d\x6a\xed\x87\xec\x14\x7f\xf4\xfc\xe3\xc7\x64\xf6\xb7\xd0\x29" "\xfe\x58\x1f\xe2\xc3\x55\xf6\x56\xe3\xf8\xf3\x72\xa7\xfd\x2f\x17\x4f\x35" "\xe7\x9d\xf7\xbf\x7c\xc4\xa1\xfc\x59\x75\x3f\xfe\xc5\xfe\xf1\xef\x5a\x97" "\xfd\xff\xe6\x29\x63\x3c\xfe\xf6\xcf\x4b\x87\x97\x7c\xe7\x41\xfc\xbd\x88" "\xc7\xf3\x9d\x8f\x3f\xed\xf8\x49\x97\xf8\xcf\x9c\x32\xfe\xd7\xbf\xb6\xb3" "\xd3\xad\x2c\xfd\x71\xc4\x54\xc7\xdf\x9f\xe4\x50\xac\x52\x7d\xfd\x6e\xa9" "\xb6\xbd\x73\x7b\x75\x7d\x61\xa5\xbc\x52\xde\x98\x9b\x9b\x7d\x61\xfe\xc5" "\xf9\xe7\xe7\x67\x4a\xcb\xab\x95\x72\xf6\x67\xc7\x18\xdf\xfd\xf8\x2f\xde" "\xeb\x16\xbf\xd1\xfe\x1b\x5d\xe2\x4f\x9e\xd0\xfe\x67\x4f\xd9\xfe\x77\xdf" "\xbe\x77\xff\xc3\xad\x64\xa1\x53\xfc\x5b\xcf\x74\x88\xff\xeb\x9f\x64\x6b" "\x1c\x8f\x9f\xcb\x7e\xfb\x3e\x99\xa5\x1b\xe5\x53\xed\xf4\x6e\x2b\x7d\xd0" "\x13\x3f\xfb\xed\x13\xbd\xda\xbf\xd4\xa5\xfd\x27\xfd\xfb\xdf\x3a\x65\xfb" "\xa7\xbf\xf2\xad\x3f\x9d\x72\x55\x00\x60\x00\x6a\xdb\x3b\x6b\x0b\x95\x4a" "\x79\xf3\xd2\x26\x1a\xbd\xf4\x0b\x50\x8d\x0f\x46\x22\xb9\x18\xd5\x18\x54" "\xe2\xcd\xe3\x45\x4f\xc6\x99\x3f\x30\x4d\xd3\xb4\xb1\x4f\x3d\x44\xc5\x92" "\xb3\x47\xef\xf7\x17\x60\xd8\x47\x26\x00\x00\xa0\xdf\x1e\x9c\xfd\x0f\xbb" "\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x75" "\xbd\xdf\x37\x84\xa5\x67\x78\xaf\xd8\xd1\x98\x7b\xfb\xa9\xa4\x1f\xaf\xd0" "\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xe8\x8b\xff\x07\x00\x00\xff\xff\xd9\x36\xe1\x8c", 1331); syz_mount_image( /*fs=*/0x20000040, /*dir=*/0x20000300, /*flags=MS_SYNCHRONOUS|MS_SILENT|MS_RDONLY|MS_NOSUID|0x400*/ 0x8413, /*opts=*/0x20000080, /*chdir=*/0, /*size=*/0x533, /*img=*/0x20001540); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; use_temporary_dir(); loop(); return 0; }