// https://syzkaller.appspot.com/bug?id=eae5e4b18aaa6a407890b9a5596f49fe2541976e // 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 #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; \ }) //% 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; } 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(); 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 30 00} (length 0x8) // } // flags: mount_flags = 0x1001a (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 { // barrier_val: fs_opt["barrier", fmt[hex, int32]] { // name: buffer: {62 61 72 72 69 65 72} (length 0x7) // eq: const = 0x3d (1 bytes) // val: int32 = 0x6 (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) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // barrier_val: fs_opt["barrier", fmt[hex, int32]] { // name: buffer: {62 61 72 72 69 65 72} (length 0x7) // eq: const = 0x3d (1 bytes) // val: int32 = 0x3 (18 bytes) // } // } // 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 { // 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 { // data_err_abort: buffer: {64 61 74 61 5f 65 72 72 3d 61 62 6f // 72 74} (length 0xe) // } // 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 = 0x42e (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x42e) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000540, "ext4\000", 5)); NONFAILING(memcpy((void*)0x200000000340, "./file0\000", 8)); NONFAILING(memcpy((void*)0x200000000600, "barrier", 7)); NONFAILING(*(uint8_t*)0x200000000607 = 0x3d); NONFAILING(sprintf((char*)0x200000000608, "0x%016llx", (long long)6)); NONFAILING(*(uint8_t*)0x20000000061a = 0x2c); NONFAILING(memcpy((void*)0x20000000061b, "resuid", 6)); NONFAILING(*(uint8_t*)0x200000000621 = 0x3d); NONFAILING(sprintf((char*)0x200000000622, "0x%016llx", (long long)0)); NONFAILING(*(uint8_t*)0x200000000634 = 0x2c); NONFAILING(memcpy((void*)0x200000000635, "barrier", 7)); NONFAILING(*(uint8_t*)0x20000000063c = 0x3d); NONFAILING(sprintf((char*)0x20000000063d, "0x%016llx", (long long)3)); NONFAILING(*(uint8_t*)0x20000000064f = 0x2c); NONFAILING(memcpy((void*)0x200000000650, "norecovery", 10)); NONFAILING(*(uint8_t*)0x20000000065a = 0x2c); NONFAILING(memcpy((void*)0x20000000065b, "block_validity", 14)); NONFAILING(*(uint8_t*)0x200000000669 = 0x2c); NONFAILING(memcpy((void*)0x20000000066a, "data_err=abort", 14)); NONFAILING(*(uint8_t*)0x200000000678 = 0x2c); NONFAILING(*(uint8_t*)0x200000000679 = 0); NONFAILING(memcpy( (void*)0x200000000d80, "\x78\x9c\xec\xdb\x4b\x6f\x1b\x45\x1c\x00\xf0\xff\xae\x93\x94\xbe\x48\x28" "\xe5\xd1\x07\x10\x28\x88\x88\x47\xd2\xa4\x05\x7a\xe0\x02\x02\x89\x0b\x12" "\x12\x1c\xca\x31\x24\x69\x15\xe2\x36\xa8\x09\x12\xad\x22\x08\x08\x71\x45" "\x95\xb8\x23\x8e\x48\x7c\x02\x4e\x70\x41\xc0\x09\x89\x2b\x1f\x00\x55\xaa" "\x50\x2e\x2d\x9c\x8c\xd6\xde\x4d\x6c\xc7\x79\x38\x75\xe2\x82\x7f\x3f\x69" "\x93\x99\xdd\x71\x66\xfe\xde\x19\x7b\x76\x27\x1b\x40\xcf\x1a\xce\x7e\x24" "\x11\x87\x22\xe2\x8f\x88\x18\xac\x65\x1b\x0b\x0c\xd7\x7e\xdd\x5e\x59\x9a" "\xfa\x7b\x65\x69\x2a\x89\x4a\xe5\xed\xbf\x92\x6a\xb9\x5b\x2b\x4b\x53\x45" "\xd1\xe2\x75\x07\xf3\xcc\x48\x1a\x91\x7e\x9e\xc4\x89\x16\xf5\x2e\x5c\xbd" "\x36\x37\x59\x2e\xcf\x5c\xc9\xf3\x63\x8b\x97\x3e\x18\x5b\xb8\x7a\xed\xf9" "\xd9\x4b\x93\x17\x67\x2e\xce\x5c\x9e\x38\x77\xee\xec\x99\xf1\x97\x5e\x9c" "\x78\xa1\x23\x71\x66\x6d\xba\x75\xfc\xe3\xf9\x93\xc7\xde\x78\xf7\xfa\x9b" "\x53\xe7\xaf\xbf\xf7\xcb\x77\x49\x11\x7f\x53\x1c\x1d\x32\xbc\xd9\xc1\xa7" "\x2a\x95\x0e\x57\xd7\x5d\x87\xeb\xd2\x49\x5f\x17\x1b\x42\x5b\x4a\x11\x91" "\x9d\xae\xfe\xea\xf8\x1f\x8c\x52\xac\x9d\xbc\xc1\x78\xfd\xb3\xae\x36\x0e" "\xd8\x55\x95\x4a\xa5\x72\x70\xe3\xc3\xcb\x15\xe0\x7f\x2c\x89\x6e\xb7\x00" "\xe8\x8e\xe2\x8b\x3e\xbb\xfe\x2d\xb6\x3d\x9a\x7a\xdc\x15\x6e\xbe\x52\xbb" "\x00\xca\xe2\xbe\x9d\x6f\xb5\x23\x7d\x91\xe6\x65\xfa\x9b\xae\x6f\x3b\x69" "\x38\x22\xce\x2f\xff\xf3\x75\xb6\xc5\xee\xdc\x87\x00\x00\x68\xf0\x43\x36" "\xff\x79\xae\xd5\xfc\x2f\x8d\x07\xeb\xca\xdd\x9b\xaf\x0d\x0d\x45\xc4\x7d" "\x11\x71\x24\x22\xee\x8f\x88\xa3\x11\xf1\x40\x44\xb5\xec\x43\x11\xf1\x70" "\x9b\xf5\x37\x2f\x92\xac\x9f\xff\xa4\x37\x76\x14\xd8\x36\x65\xf3\xbf\x97" "\xf3\xb5\xad\xc6\xf9\x5f\x31\xfb\x8b\xa1\x52\x9e\x3b\x5c\x8d\xbf\x3f\xb9" "\x30\x5b\x9e\x39\x9d\xbf\x27\x23\xd1\xbf\x2f\xcb\x8f\x6f\x52\xc7\x8f\xaf" "\xfd\xfe\xe5\x46\xc7\xea\xe7\x7f\xd9\x96\xd5\x5f\xcc\x05\xf3\x76\xdc\xe8" "\xdb\xd7\xf8\x9a\xe9\xc9\xc5\xc9\x3b\x89\xb9\xde\xcd\x4f\x23\x8e\xf7\xb5" "\x8a\x3f\x59\x5d\x09\x48\x22\xe2\x58\x44\x1c\xdf\x61\x1d\xb3\xcf\x7c\x7b" "\x72\xa3\x63\x5b\xc7\xbf\x89\x0e\xac\x33\x55\xbe\x89\x78\xba\x76\xfe\x97" "\xa3\x29\xfe\x42\xb2\xf9\xfa\xe4\xd8\x3d\x51\x9e\x39\x3d\x56\xf4\x8a\xf5" "\x7e\xfd\xed\x8b\xb7\x36\xaa\xff\x8e\xe2\xef\x80\xec\xfc\x1f\x68\xd9\xff" "\x57\xe3\x1f\x4a\xea\xd7\x6b\x17\xda\xfb\xfb\xfb\xb6\x38\xbe\xd3\xfe\x3f" "\x90\xbc\x53\x4d\x0f\xe4\xfb\x3e\x9a\x5c\x5c\xbc\x32\x1e\x31\x30\xd7\xd8" "\x29\xaa\xfb\x27\xd6\xe7\x8b\xf2\x59\xfc\x23\xa7\x5a\x8f\xff\x23\xb1\xf6" "\x4e\x9c\x88\x88\xac\x13\x3f\x12\x11\x8f\x46\xc4\x63\x79\xdb\x1f\x8f\x88" "\x27\x22\xe2\xd4\x26\x31\xfe\xfc\xea\x93\xef\xef\x3c\xfe\xdd\x95\xc5\x3f" "\xdd\xd6\xf9\x5f\x4b\x0c\x44\xf3\x9e\xd6\x89\xd2\xdc\x4f\xdf\x37\x54\x3a" "\xd4\x4e\xfc\xd9\xf9\x3f\x5b\x4d\x8d\xe4\x7b\xb6\xf3\xf9\xb7\x9d\x76\xb5" "\xdf\x9b\x01\x00\x00\xe0\xbf\x29\x8d\x88\x43\x91\xa4\xa3\xab\xe9\x34\x1d" "\x1d\xad\xfd\xbf\xfc\xd1\x38\x90\x96\xe7\x17\x16\x9f\xbd\x30\xff\xe1\xe5" "\xe9\xda\x33\x02\x43\xd1\x9f\x16\x77\xba\x06\xeb\xee\x87\x8e\xe7\x97\xf5" "\x45\x7e\xa2\x29\x7f\x26\xbf\x6f\xfc\x55\x69\x7f\x35\x3f\x3a\x35\x5f\x9e" "\xee\x76\xf0\xd0\xe3\x0e\x6e\x30\xfe\x33\x7f\x96\xba\xdd\x3a\x60\xd7\x79" "\x5e\x0b\x7a\x97\xf1\x0f\xbd\xcb\xf8\x87\xde\x65\xfc\x43\xef\x6a\x31\xfe" "\xf7\x77\xa3\x1d\xc0\xde\x6b\xf5\xfd\xff\x49\x17\xda\x01\xec\xbd\xa6\xf1" "\x6f\xd9\x0f\x7a\x88\xeb\x7f\xe8\x5d\xc6\x3f\xf4\x2e\xe3\x1f\x7a\xd2\xc2" "\xfe\xd8\xfa\x21\x79\x09\x89\x75\x89\x48\xef\x8a\x66\x48\xec\x52\xa2\xdb" "\x9f\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\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\xf1\x6f\x00" "\x00\x00\xff\xff\xd3\x9a\xe4\x9b", 1070)); NONFAILING(syz_mount_image( /*fs=*/0x200000000540, /*dir=*/0x200000000340, /*flags=MS_POSIXACL|MS_SYNCHRONOUS|MS_NOSUID|MS_NOEXEC*/ 0x1001a, /*opts=*/0x200000000600, /*chdir=*/1, /*size=*/0x42e, /*img=*/0x200000000d80)); // creat arguments: [ // file: 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 61 61 00} (length 0xff) // } // mode: open_mode = 0x50 (8 bytes) // ] // returns fd NONFAILING( memcpy((void*)0x200000000e00, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 255)); syscall(__NR_creat, /*file=*/0x200000000e00ul, /*mode=S_IWGRP|S_IXUSR*/ 0x50ul); // mknod$loop arguments: [ // file: 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 61 00} (length 0xfe) // } // mode: mknod_mode = 0x4 (8 bytes) // dev: proc = 0x1 (4 bytes) // ] NONFAILING( memcpy((void*)0x2000000009c0, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 254)); syscall(__NR_mknod, /*file=*/0x2000000009c0ul, /*mode=*/4ul, /*dev=*/0x701); // creat arguments: [ // file: 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 00} (length 0xfc) // } // mode: open_mode = 0x37 (8 bytes) // ] // returns fd NONFAILING( memcpy((void*)0x200000000ac0, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 252)); syscall(__NR_creat, /*file=*/0x200000000ac0ul, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IWGRP|S_IRGRP*/ 0x37ul); // syz_mount_image$exfat arguments: [ // fs: nil // 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 = 0x1380443 (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*)0x200000000940, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 253)); NONFAILING(syz_mount_image( /*fs=*/0, /*dir=*/0x200000000940, /*flags=MS_SHARED|MS_SLAVE|MS_STRICTATIME|MS_RELATIME|MS_RDONLY|0x442*/ 0x1380443, /*opts=*/0, /*chdir=*/3, /*size=*/0, /*img=*/0x200000000000)); // creat arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 32 00} (length 0x8) // } // mode: open_mode = 0x8 (8 bytes) // ] // returns fd NONFAILING(memcpy((void*)0x200000000040, "./file2\000", 8)); syscall(__NR_creat, /*file=*/0x200000000040ul, /*mode=S_IXGRP*/ 8ul); // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {62 6c 6b 69 6f 2e 62 66 71 2e 67 72 6f 75 70 5f 77 61 69 74 // 5f 74 69 6d 65 00} (length 0x1a) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd NONFAILING( memcpy((void*)0x200000000080, "blkio.bfq.group_wait_time\000", 26)); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000080ul, /*flags=*/0x275a, /*mode=*/0); // mknod arguments: [ // file: 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 00} // (length 0xfa) // } // mode: mknod_mode = 0x10 (8 bytes) // dev: int32 = 0x247 (4 bytes) // ] NONFAILING( memcpy((void*)0x200000000340, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 250)); syscall(__NR_mknod, /*file=*/0x200000000340ul, /*mode=*/0x10ul, /*dev=*/0x247); return 0; }