// https://syzkaller.appspot.com/bug?id=ff9fe3de46d66c92f26a627abe9e85d0518c9890 // 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 #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif static unsigned long long procid; //% 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"); } 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; } uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); intptr_t res = 0; memcpy((void*)0x20000600, "hfsplus\000", 8); memcpy((void*)0x20000180, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 251); memcpy( (void*)0x20000f80, "\x78\x9c\xec\xdd\xcd\x6f\x1c\x67\x1d\x07\xf0\xef\x6c\x36\x4e\x36\x94\xd4" "\x4d\x93\x36\xa0\x4a\xb5\x1a\x09\x10\x16\x89\x5f\xe4\x82\xb9\x10\x10\x42" "\x3e\x54\xa8\x2a\x07\xce\x56\xe2\x34\x56\x36\x69\xb1\x5d\xe4\x56\x88\x9a" "\xf7\x6b\x0f\xfd\x03\xca\xc1\x37\x4e\x48\xdc\x23\x95\x0b\x17\xb8\xf5\xea" "\x63\x25\x24\x2e\xbd\x60\x4e\x8b\x66\x76\x76\xbd\xf1\x5b\xed\x36\xf1\xae" "\xdb\xcf\x27\x9a\x7d\x9e\x67\x9f\x99\x67\x7e\xcf\x6f\x66\x76\x76\xd7\x8a" "\x36\xc0\x97\xd6\xc2\x64\x9a\x0f\x53\x64\x61\xf2\x95\xf5\xb2\xbd\xb5\x39" "\xdb\xde\xda\x9c\xbd\xdf\xab\x27\x39\x97\x64\x23\x69\x26\x69\x24\x29\xfe" "\xdb\xe9\x74\x3e\x4c\x6e\x26\x45\x7f\x98\x62\x57\xb9\xc7\xfb\xcb\xf3\xaf" "\x7d\xf4\xc9\xd6\xc7\xdd\x56\xb3\x5e\xaa\xf5\x1b\x87\x6d\x77\x34\x1b\xf5" "\x92\x89\x24\x67\xea\xf2\x71\x8d\x77\xeb\x73\x8f\x57\xf4\x67\x78\x33\xc9" "\xb5\xba\x84\xa1\x3b\x9b\xa4\xf3\x88\x5f\xfc\xe3\xa9\x7e\xcf\x80\xd6\x7e" "\x5b\x9f\x3f\x91\x18\x81\x27\xab\xe8\xde\x37\xf7\x18\x4f\x2e\xd4\x17\x7a" "\xf9\x3e\xa0\x7b\x57\xec\xde\xb3\x4f\xb5\x8d\x61\x07\x00\x00\x00\x00\x27" "\xe0\xe9\xed\x6c\x67\xbd\xb8\x38\xec\x38\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\xe0\xb4\xd8\xd8\xf9\xfd\xff\xa2\x5e\x1a\xbd\xfa\x44\x8a\xde\xef\xff" "\x8f\xd5\xcf\xa5\xae\x8f\x96\x17\x8f\xb7\xfa\xc3\x27\x15\x07\x00\x00\x00" "\x00\x00\x00\x00\x9c\xa0\x17\xb7\xb3\x9d\xf5\x5c\xec\xb5\x3b\x45\xf5\x37" "\xff\x97\xaa\xc6\xe5\xea\xf1\x2b\x79\x2b\xab\x59\xca\x4a\xae\x67\x3d\x8b" "\x59\xcb\x5a\x56\x32\x9d\x64\x7c\x60\xa0\xb1\xf5\xc5\xb5\xb5\x95\xe9\x23" "\x6c\x39\xb3\xef\x96\x33\x9f\x12\xe8\xb9\xba\x6c\x3d\x9e\x79\x03\x00\x00" "\x00\x00\x00\x00\xc0\x17\xcc\x6f\xb3\xb0\xf3\xf7\x7f\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x18\x05\x45\x72\xa6\x5b\x54\xcb\xe5\x5e\x7d\x3c" "\x8d\x66\x92\xf3\x49\xc6\xca\xf5\x36\x92\x7f\xf5\xea\xa7\xd9\xc3\x61\x07" "\x00\x00\x00\x00\x27\xe0\xe9\xed\x6c\x67\x3d\x17\x7b\xed\x4e\x51\x7d\xe6" "\x7f\xae\xfa\xdc\x7f\x3e\x6f\xe5\x41\xd6\xb2\x9c\xb5\xb4\xb3\x94\xdb\xd5" "\x77\x01\xdd\x4f\xfd\x8d\xad\xcd\xd9\xf6\xd6\xe6\xec\xfd\x72\xd9\x3b\xee" "\x0f\xff\x73\xac\x30\xaa\x11\xd3\xfd\xee\x61\xff\x3d\x5f\xad\xd6\x68\xe5" "\x4e\x96\xab\x67\xae\xe7\x56\xde\x48\x3b\xb7\xd3\xa8\xb6\x2c\x5d\xad\xe3" "\xe9\x8d\xba\x2b\xae\xdf\x94\x31\x15\x3f\xa8\x1d\x31\xb2\xdb\x75\x59\xce" "\xfc\xbd\xba\xdc\xe3\xdd\x63\x4d\xf6\x20\xc7\xfc\x32\x65\xbc\xca\xc8\xd9" "\x7e\x46\xa6\xea\xd8\xca\x6c\x3c\xd3\x3b\x32\xfb\x1f\xa1\x63\x1e\x9d\xdd" "\x7b\x9a\x4e\xa3\x1f\xec\xe5\x5d\x7b\xda\x35\x89\xcf\x94\xf3\x0b\x75\x59" "\xce\xe7\x8f\x07\xe5\x7c\x28\x76\x67\x62\x66\xe0\xec\x7b\xee\xf0\x9c\x27" "\xdf\xfc\xdb\x5f\x7e\x7e\xb7\xfd\xe0\xde\xdd\x3b\xab\x93\xa3\x33\xa5\xa3" "\x39\x53\x97\x9d\xea\xb1\xb5\x37\x13\xb3\x03\x99\x78\xfe\x8b\x9c\x89\x3d" "\xa6\xaa\x4c\x5c\xe9\xb7\x17\xf2\x93\xfc\x2c\x93\x99\xc8\xab\x59\xc9\x72" "\x7e\x99\xc5\xac\x65\x29\x13\xf9\x71\x55\x5b\xac\xcf\xe7\x62\xe0\x92\x3f" "\x20\x53\x37\x1f\x69\xbd\xfa\x69\x91\x8c\xd5\x67\x68\xf7\x60\x1d\x2f\xa6" "\x97\xaa\x6d\x2f\x66\x39\x3f\xcd\x1b\xb9\x9d\xa5\xbc\x5c\xfd\x9b\xc9\x74" "\xbe\x9b\xb9\xcc\x65\x7e\xe0\x08\x5f\x39\xfc\x08\x57\x57\x7d\xe3\x80\xab" "\xbe\xf3\xd5\x7d\x83\xbf\xf6\xad\xba\xd2\x4a\xf2\xa7\xba\x1c\x0d\x65\x5e" "\x9f\x19\xc8\xeb\xe0\x6b\xee\x78\xd5\x37\xf8\xcc\x4e\x96\x2e\x1d\x21\x4b" "\xc7\x7c\x6d\x6c\x7e\xbd\xae\x94\xfb\xf8\x5d\x5d\x8e\x86\xdd\x99\x98\x1e" "\xc8\xc4\xb3\x87\x67\xe2\xcf\xd5\xcb\xca\x6a\xfb\xc1\xbd\x95\xbb\x8b\x6f" "\x1e\x6d\x77\x97\xde\xab\x2b\xe5\x75\xf4\x87\x91\xba\x4b\x94\xe7\xcb\xa5" "\xf2\x60\x55\xad\x47\xcf\x8e\xb2\xef\xd9\x7d\xfb\xa6\xab\xbe\xcb\xfd\xbe" "\xc6\x9e\xbe\x2b\xfd\xbe\xee\x95\xba\x71\xe0\x95\x3a\x56\xbf\x87\xdb\x3b" "\xd2\x4c\xd5\xf7\xfc\xbe\x7d\xb3\x55\xdf\xd5\x81\xbe\xfd\xde\x6f\x01\x30" "\xf2\x2e\x7c\xfb\xc2\x58\xeb\xdf\xad\x7f\xb6\x3e\x68\xfd\xbe\x75\xb7\xf5" "\xca\xf9\x1f\x9d\xfb\xde\xb9\x17\xc6\x72\xf6\xef\x67\xbf\xdf\x9c\x3a\xf3" "\x8d\xc6\x0b\xc5\x5f\xf3\x41\x7e\xbd\xf3\xf9\x1f\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8" "\xec\x56\xdf\x7e\xe7\xde\x62\xbb\xbd\xb4\xb2\xab\xd2\xe9\x74\xde\x3d\xa0" "\xeb\x34\x57\x7a\x3f\x67\x76\x82\x3b\xfd\xda\x53\xc9\x48\xcc\x7d\xa8\x95" "\xff\x75\x3a\x9d\xfa\x99\x62\x14\xe2\x39\xbc\xd2\xa9\x8d\x4a\x3c\xc3\xa8" "\x0c\xf9\x85\x09\x78\xe2\x6e\xac\xdd\x7f\xf3\xc6\xea\xdb\xef\x7c\x67\xf9" "\xfe\xe2\xeb\x4b\xaf\x2f\x3d\x98\x9f\x9b\x9b\x9f\x9a\x9f\x7b\x79\xf6\xc6" "\x9d\xe5\xf6\xd2\x54\xf7\x71\xd8\x51\x02\x4f\xc2\xce\x4d\x7f\xd8\x91\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x75\x12\xff\x9d\x60\xd8\x73\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\x4e\xb7\x85\xc9\x34\x1f\xa6\xc8\xf4\xd4\xf5\xa9\xb2\xbd\xb5" "\x39\xdb\x2e\x97\x5e\x7d\x67\xcd\x66\x92\x46\x92\xe2\x57\x49\xf1\x61\x72" "\x33\xdd\x25\xe3\x03\xc3\x15\x07\xed\xe7\xfd\xe5\xf9\xd7\x3e\xfa\x64\xeb" "\xe3\x9d\xb1\x9a\xbd\xf5\x1b\x87\x6d\x77\x34\x1b\xf5\x92\x89\x24\x67\xea" "\xf2\x71\x8d\x77\xeb\x73\x8f\x57\xf4\x67\x58\x26\xec\x5a\x2f\x71\x30\x6c" "\xff\x0f\x00\x00\xff\xff\x26\x08\x0e\xdb", 1594); syz_mount_image(/*fs=*/0x20000600, /*dir=*/0x20000180, /*flags=MS_POSIXACL|MS_SYNCHRONOUS|MS_NOATIME*/ 0x10410, /*opts=*/0x20000440, /*chdir=*/1, /*size=*/0x63a, /*img=*/0x20000f80); memcpy((void*)0x20000080, "./bus\000", 6); syscall(__NR_open, /*file=*/0x20000080ul, /*flags=O_SYNC|O_DIRECT|O_CREAT|O_CLOEXEC|FASYNC|0x2*/ 0x187042ul, /*mode=*/0ul); memcpy((void*)0x20000240, "memory.stat\000", 12); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000240ul, /*flags=*/0x275aul, /*mode=*/0ul); memcpy((void*)0x20000280, "cgroup.controllers\000", 19); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000280ul, /*flags=*/0x275aul, /*mode=*/0ul); memcpy((void*)0x20000300, ".\000", 2); res = syscall(__NR_open, /*file=*/0x20000300ul, /*flags=*/0ul, /*mode=*/0ul); if (res != -1) r[0] = res; memcpy((void*)0x20000340, "\023\023w\305\3745\324\024T\325\324\035)\255\032`)" "Y\201F\346\276\026nA\255\r\275@T\003<\2373\273\332\202$" "\242\363\327r\347cnH\263<\277p\203r\350\361\271\223>" "\305\022wC\276\"\006 \236\360-\371\313\362\366\350\200\3238/\000", 78); syscall(__NR_mkdirat, /*fd=*/r[0], /*path=*/0x20000340ul, /*mode=*/0ul); memcpy((void*)0x20000140, "./file1\000", 8); syscall(__NR_truncate, /*file=*/0x20000140ul, /*len=*/0ul); memcpy( (void*)0x20000440, "\023\023w\305\3745\324\024T\325\324\035)\255\032`)" "Y\201F\346\276\026nA\255\r\275@T\003<\2373\273\332\202$" "\242\363\327r\347cnH\263<\277p\203r\350\361\271\223>" "\305\022wC\276\"\006 \236\360-\371\313\362\366\350\200\3238//file0\000", 84); syscall(__NR_mkdirat, /*fd=*/r[0], /*path=*/0x20000440ul, /*mode=*/0ul); memcpy((void*)0x200010c0, "blkio.bfq.io_service_time_recursive\000", 36); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200010c0ul, /*flags=*/0x275aul, /*mode=*/0ul); memcpy((void*)0x20000000, "./bus\000", 6); memcpy((void*)0x20000400, "./" "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000", 251); syscall(__NR_rename, /*old=*/0x20000000ul, /*new=*/0x20000400ul); return 0; }