// https://syzkaller.appspot.com/bug?id=e8876b0dfced9b04be83beea77587b4a0aebe6b0 // 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, unsigned long extra_space, 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; } if (extra_space) { off_t cur = lseek(memfd, 0, SEEK_END); if (cur >= 0 && ftruncate(memfd, cur + extra_space)) { } } 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); unsigned long extra_space = strncmp(fs, "ext", 3) == 0 ? (16 << 20) : 0; if (setup_loop_device(data, size, extra_space, 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; } 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(); if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 33 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x0 (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 { // 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 { // 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 { // debug: buffer: {64 65 62 75 67} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // discard: buffer: {64 69 73 63 61 72 64} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0xee (1 bytes) // size: len = 0x498 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x498) // } // ] // returns fd_ext4_mnt NONFAILING(memcpy((void*)0x2000000001c0, "ext3\000", 5)); NONFAILING(memcpy((void*)0x2000000002c0, "./file0\000", 8)); NONFAILING(memcpy((void*)0x200000000300, "norecovery", 10)); NONFAILING(*(uint8_t*)0x20000000030a = 0x2c); NONFAILING(memcpy((void*)0x20000000030b, "grpquota", 8)); NONFAILING(*(uint8_t*)0x200000000313 = 0x2c); NONFAILING(memcpy((void*)0x200000000314, "debug", 5)); NONFAILING(*(uint8_t*)0x200000000319 = 0x2c); NONFAILING(memcpy((void*)0x20000000031a, "discard", 7)); NONFAILING(*(uint8_t*)0x200000000321 = 0x2c); NONFAILING(*(uint8_t*)0x200000000322 = 0); NONFAILING(memcpy( (void*)0x2000000008c0, "\x78\x9c\xec\xdc\x4d\x6c\x14\x55\x1c\x00\xf0\xff\x6c\xbf\xf9\x90\x8a\xf8" "\x01\x82\x56\xf1\x83\xa8\xb4\xb4\x7c\xc8\xc1\x8b\x46\x13\x0f\x9a\x98\xe8" "\x01\xe3\xa9\x96\x42\x90\x42\x0d\xad\x89\x90\x46\xd1\x03\x1e\x0d\x89\x77" "\xe3\xd1\xc4\xbb\x89\x27\xbd\x18\xf5\x60\x4c\xbc\xea\xdd\x90\x10\xd3\x0b" "\xe8\x69\xcc\xcc\xce\x2c\xdb\x76\xb7\x9f\x4b\x17\xdc\xdf\x2f\xd9\xed\x7b" "\x33\xb3\x7d\xef\x3f\x6f\x5e\xe7\xf5\xbd\xdd\x0d\xa0\x63\x0d\x65\x4f\x49" "\xc4\xb6\x88\xf8\x23\x22\x76\x54\xb3\x0b\x0f\x18\xaa\xfe\xb8\x39\x3f\x37" "\xf1\xcf\xfc\xdc\x44\x12\x69\xfa\xe6\xdf\x49\x7e\xdc\x8d\xf9\xb9\x89\xf2" "\xd0\xf2\x75\x5b\xab\x99\x34\x8d\xe8\xcb\x92\x7d\x0d\xca\xbd\xf2\x4e\xc4" "\xf8\xd4\xd4\xe4\x85\x22\x3f\x32\x7b\xee\xfd\x91\x99\x8b\x97\x0e\x9e\x39" "\x37\x7e\x7a\xf2\xf4\xe4\xf9\xb1\xe3\xc7\x8f\x1c\xde\xd7\x7b\x6c\xec\x68" "\xbe\x3f\x5d\x67\x7c\x95\xe2\x67\x16\xd7\x8d\x3d\x1f\x4d\xef\xdd\xfd\xea" "\xdb\x57\x5f\x9f\x38\x71\xf5\xdd\x9f\xbf\xc9\xea\xbb\xad\xd8\x5f\x1f\xc7" "\xba\xa4\x4b\x6b\x38\x54\x3d\xbb\x8b\x3d\x9a\x3d\x3d\xb9\xa1\xc2\xee\x28" "\xbf\x66\x4f\xdb\xeb\x36\x24\xdd\xcd\x0f\x1e\xde\x84\x0a\xb1\x7a\x5d\x11" "\x91\x35\x57\x4f\x9e\x4b\xa2\x2b\x06\x6a\xfb\x76\xc4\x2b\x9f\xb6\xb1\x6a" "\xc0\x6d\x96\xa6\x69\xda\xe8\xfe\x1c\x75\xf7\xed\x14\xf8\x9f\x4a\xf4\x6f" "\xe8\x50\xe5\xbd\x3e\xfb\xff\xb7\x7c\x6c\xce\xc8\xe3\xce\x70\xfd\xc5\x88" "\x38\x58\x64\xe6\xe7\x26\x6e\xd6\xe2\xef\xae\xcd\x1d\xf4\x2c\xfa\xff\xb6" "\x95\x86\x22\xe2\xc4\xe5\x7f\xbf\xcc\x1e\xd1\x8a\x79\x08\x00\x80\x15\x7c" "\x9f\x8d\x7f\x9e\x6b\x34\xfe\xab\xc4\x03\x75\xc7\xdd\x53\xac\xa1\x0c\x46" "\xc4\xbd\x11\xb1\x33\x22\xee\x8b\x88\x5d\x11\x71\x7f\x44\x7e\xec\x83\x11" "\xe7\x1e\x5a\x63\xf9\x8b\x57\x48\x96\x8e\x7f\x2a\xd7\xd6\x15\xd8\x2a\x65" "\xe3\xbf\x17\x8a\xb5\xad\x9b\x0b\xc6\x7f\xe5\xe8\x2f\x06\xbb\x8a\xdc\xf6" "\x3c\xfe\x9e\xe4\xd4\x99\xa9\xc9\x43\xc5\x39\x39\x10\x3d\x7d\x59\x7e\x74" "\x99\x32\x7e\x78\xf9\xf7\xcf\xcb\x74\xff\xa2\x7d\xf5\xe3\xbf\xec\x91\x95" "\x5f\x8e\x05\x8b\x7a\x5c\xeb\x5e\x34\x41\x77\x72\x7c\x76\x3c\x4f\xa4\x69" "\xfa\xf1\xc6\xc2\x8f\xeb\x9f\x44\xec\xe9\x6e\x14\x7f\x12\xe5\x32\x4e\x12" "\x11\xbb\x23\x62\xcf\x3a\xcb\x38\xf3\xcc\xd7\x7b\x9b\xed\x5b\x39\xfe\x65" "\x2c\xb3\xce\xb4\x5a\xe9\x57\x11\x4f\x57\xdb\xff\xf2\xc2\xf1\xff\xad\xa6" "\x4a\xea\xd7\x27\x07\x22\xa2\xb6\x3e\x39\xfa\xfc\xb1\xb1\xa3\x23\xfd\x31" "\x35\x79\x68\xa4\xbc\x2a\x96\xfa\xe5\xb7\x2b\x6f\x34\x2b\x7f\x43\xf1\xb7" "\x40\xd6\xfe\x5b\x1a\x5e\xff\xb5\x55\xe0\xc1\xa4\x3f\x62\xe6\xe2\xa5\xb3" "\xf9\x7a\xed\xcc\xda\xcb\xb8\xf2\xe7\x67\x75\x7d\x7a\xc1\xea\x72\x16\x7f" "\xe5\xdb\x88\x35\x5f\xff\xbd\xc9\x5b\x79\xba\xb7\xd8\xf6\xe1\xf8\xec\xec" "\x85\xd1\x88\xde\xe4\xb5\xa5\xdb\xc7\x6e\xbd\xb6\xcc\x97\xc7\x67\xf1\x1f" "\xd8\xdf\xb8\xff\xef\xac\xab\xf1\xc3\x11\x91\x5d\xc4\xfb\x22\xe2\x91\x62" "\x11\x37\x6b\xbb\xc7\x22\xe2\xf1\x88\xd8\xbf\x4c\xfc\x3f\xbd\xf4\xc4\x7b" "\xcd\xf6\x35\x6f\xff\x66\xb3\xf2\xad\x75\xbd\x38\x51\xcb\xb6\x7f\xd4\xb7" "\xff\xda\x13\x5d\x67\x7f\xfc\xae\x59\xf9\x43\xc5\x1a\x64\x14\xe7\xa1\x71" "\xfb\x1f\xc9\x53\x07\x8a\x2d\xb5\xbf\x7f\xcb\x58\x6d\x05\xd7\x75\xd2\x00" "\x00\x00\xe0\x2e\x53\xc9\xdf\x03\x9f\x54\x86\x6b\xe9\x4a\x65\x78\xb8\xfa" "\x1e\xfe\x5d\xb1\xa5\x32\x35\x3d\x33\xfb\xec\xa9\xe9\x0f\xce\x9f\xac\xbe" "\x57\x7e\x30\x7a\x2a\xe5\x4c\xd7\x8e\xba\xf9\xd0\xd1\x62\x6e\xb8\xcc\x8f" "\x2d\xca\x1f\x2e\xe6\x8d\xbf\xe8\x1a\xc8\xf3\xc3\x13\xd3\x53\x27\xdb\x1d" "\x3c\x74\xb8\xad\x4d\xfa\x7f\xe6\xaf\xae\x76\xd7\x0e\xb8\xed\x5a\xb0\x8e" "\x06\xdc\xa5\xf4\x7f\xe8\x5c\xfa\x3f\x74\x2e\xfd\x1f\x3a\x97\xfe\x0f\x9d" "\xab\x51\xff\xdf\xe8\x07\x0b\x80\xbb\x83\xfb\x3f\x74\xae\xbc\xff\x3f\x75" "\xb9\xdd\xd5\x00\xda\xc0\xfd\x1f\x3a\x97\xfe\x0f\x1d\xa9\xe9\x67\xe3\x2b" "\x1b\xfa\xc8\x7f\xd3\x44\xd2\xea\x5f\xd8\x30\x51\x7e\x77\xc2\x66\x94\xb5" "\x72\xa2\xfc\x2e\x8a\x4d\x2f\x7d\x60\xdd\x2f\xef\x5f\xf9\xd4\x45\xa5\xbd" "\x67\xb5\x63\x12\xdd\x4b\xda\x22\xba\x5b\x5a\x44\x5f\xc3\x5d\x6d\xfc\xa3" "\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\xd0\x42\xff\x05\x00\x00" "\xff\xff\xf9\x7a\xd2\xab", 1176)); NONFAILING(syz_mount_image(/*fs=*/0x2000000001c0, /*dir=*/0x2000000002c0, /*flags=*/0, /*opts=*/0x200000000300, /*chdir=*/0xee, /*size=*/0x498, /*img=*/0x2000000008c0)); // quotactl$Q_QUOTAON arguments: [ // cmd: quota_cmd_quota_on = 0xffffffff80000201 (8 bytes) // special: ptr[in, blockdev_filename] { // union blockdev_filename { // loop: loop_filename { // prefix: buffer: {2f 64 65 76 2f 6c 6f 6f 70} (length 0x9) // id: proc = 0x0 (1 bytes) // z: const = 0x0 (1 bytes) // } // } // } // id: quota_formats = 0x3 (8 bytes) // addr: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // ] NONFAILING(memcpy((void*)0x2000000000c0, "/dev/loop", 9)); NONFAILING(*(uint8_t*)0x2000000000c9 = 0x30); NONFAILING(*(uint8_t*)0x2000000000ca = 0); NONFAILING(memcpy((void*)0x200000000200, "./file1\000", 8)); syscall(__NR_quotactl, /*cmd=Q_QUOTAON_GRP*/ 0xffffffff80000201ul, /*special=*/0x2000000000c0ul, /*id=QFMT_OCFS2*/ 3ul, /*addr=*/0x200000000200ul); return 0; }