// https://syzkaller.appspot.com/bug?id=b30ea69cb87bce1089eefd3969b308f63c4e218c // 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[2] = {0xffffffffffffffff, 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*)0x20000080, "ext3\000", 5); memcpy((void*)0x20000440, "./file0\000", 8); memcpy((void*)0x20000740, "jqfmt=vfsold,resgid=", 20); sprintf((char*)0x20000754, "0x%016llx", (long long)0xee00); memcpy( (void*)0x20000766, "\x2c\x6e\x6f\x62\x6c\x6f\x63\x6b\x5f\x76\x61\x6c\x69\x64\x69\x74\x79\x2c" "\x6e\x6f\x6c\x6f\x61\x64\x2c\x64\x61\x74\x61\x5f\x65\x72\x72\x3d\x69\x67" "\x6e\x6f\x72\x65\x2c\x75\x73\x72\x6a\x71\x75\x6f\x74\x61\x3d\x2c\x69\x6e" "\x69\x74\x5f\x69\x74\x61\x62\x6c\x65\x3d\x30\x78\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x30\x30\x30\x30\x36\x30\x31\x2c\x6d\x61\x78\x5f\x64\x69\x72" "\x5f\x73\x69\x7a\x65\x5f\x6b\x62\x3d\x30\x78\x30\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x30\x30\x30\x30\x30\x33\x2c\x00\x00\x80\xa2\xa1\x62\x24\x2f" "\x5f\x14\xe2\x7c\xd9\x03\xe7\x52\xde\xaf\x06\x90\x45\xd4\xf4\xb0\x73\xf9" "\xcf\xa1\x8c\x6c\x20\x15\x8a\xe1\x3a\x24\xe7\x9b\x65\x4e\xe8\x58\x8b\x67" "\x7e\x3b\x0c\xe2\xca\xf6\x52\xe5\xc6\x43\x33\xf7\x47\x21\xb5\xa3\x6a\x10" "\x45\xa0\x1e\x15\xc7\xa9\x29\x14\x6b\x16\x2c\x26\xa0\xe6\x1b\x81\x39\x35" "\xe3\xce\x71\xa2\x19\x54\xd9\xdc\x4e\x39\x70\x1c\x78\xe3\x89\x27\xc9\xdb" "\x9d\x9b\xc3\xaf\x4d\x44\x7a\xa1\x98\x1b\xe8\xf7\x65\x3c\x75\x0a\x90\x3c" "\x6f\x7c\x71\xa0\x85\x66\x9f\x96\xee\xf6\x83\xe1\xd8\x6a\x96\xdd\x79\xc2" "\x21\x67\xdb\xa4\x98\x19\x72\xae\x5a\xae\x35\x5b\xe7\x8a\x01\x3f\xe2\x95" "\xc7\x82\x56\xa1\x45\xc3\xef\xe6\x94\x05\x76\xa6\x55\xda\xb6\xde\x92\xf1" "\xaa\xe8\xa9\xec\xf3\xb9\xb1\x7c\xfe\x50\x78\x24\x3c\xec\xdd\x4a\x7f\x8f" "\xaf\x2f\x8f\xb7\xb7\x27\x0f\xc9\x23\x4a\xf8\xa1\xc8\x6d\xc7\xf4\x0d\x65" "\xbf\x6d\x42\x47\xb9\x2f\x4c\x3f\xb6\xa3\x4d\xe9\x28\xce\xfa\x87\xf4\x0f" "\xc9\xb5\xfc\x3f\xf0\x51\x0d\xbe\x6c\xef\x81\x0c\xf4\x23\x0f\x3e\xee\x9e" "\x4b\x6a\x52\x76\x71\x72\x43\xeb\x92\xe3\x62\x8a\xdc\xc4\xf5\xa8\xc5\x19" "\x7c\x5e\x9c\x48\xdc\xbc\x52\xed\x01\x22\x8a\x54\x83\xe2", 392); sprintf((char*)0x200008ee, "%020llu", (long long)-1); memcpy( (void*)0x20000940, "\x78\x9c\xec\xdc\xcf\x4f\x1c\x55\x1c\x00\xf0\xef\xec\xf2\xb3\xa5\x82\xb5" "\xfe\x28\xb6\x11\xad\x46\xe2\x0f\x28\xf4\x87\x3d\x78\xd1\x68\xe2\x41\x13" "\x13\x3d\x68\x3c\x11\xc0\x06\xbb\x2d\xa6\x60\x22\x0d\x51\xf4\x80\x47\x63" "\x62\xbc\x1a\x8f\xfe\x0b\x9e\xf4\x62\x8c\x27\x13\xaf\x7a\x37\x26\x8d\x72" "\x69\xf5\x60\xd6\xcc\xee\x0c\x5d\x60\x97\x2e\xb0\x65\xdb\xee\xe7\x93\x0c" "\xbc\x37\xf3\xe0\xbd\xef\xcc\xbc\xdd\x37\xef\xc1\x06\xd0\xb1\x46\xd2\x2f" "\x49\xc4\x40\x44\xfc\x16\x11\x83\xd5\xec\xc6\x02\x23\xd5\x6f\xd7\xd7\x96" "\xa7\xff\x59\x5b\x9e\x4e\xa2\x5c\x7e\xe3\xaf\xa4\x52\xee\xda\xda\xf2\x74" "\x5e\x34\xff\xb9\x83\xd5\x4c\xb9\x9c\xe5\x7b\xeb\xd4\xbb\xfa\x4e\xc4\x54" "\xa9\x34\x7b\x39\xcb\x8f\x2f\x5e\x7c\x7f\x7c\x61\xe9\xca\xb3\x73\x17\xa7" "\xce\xcf\x9e\x9f\xbd\x34\x79\xee\xdc\xe9\x53\xc7\x7b\xce\x4e\x9e\x69\x49" "\x9c\x69\x5c\xd7\x86\x3f\x9a\x3f\x76\xf4\x95\xb7\xbf\x78\xed\xc6\xfe\x81" "\xec\x7b\x6d\x1c\xad\x32\x52\x3d\xbb\x75\x3d\x51\xf9\xda\xd7\xea\x2a\xdb" "\xe6\x50\x4d\x3a\xe9\x6a\x63\x43\xd8\x91\x62\x44\xa4\x97\xab\xbb\xd2\xff" "\x07\xa3\x18\xfd\xeb\xc7\x06\xe3\xe5\x4f\xdb\xda\x38\xe0\x96\x2a\x97\xcb" "\xe5\x7a\xef\xcf\x99\x95\x32\x70\x17\x4b\xa2\xdd\x2d\x00\xda\x23\x7f\xa3" "\x4f\x9f\x7f\xf3\x6d\x9f\x86\x1e\xb7\x85\xab\x2f\x54\x1f\x80\xd2\xb8\xaf" "\x67\x5b\xf5\x48\x57\x14\xb2\x32\xdd\x9b\x9e\x6f\x5b\x69\x24\x22\xde\x5a" "\xf9\xf7\xeb\x74\x8b\x5b\x34\x0f\x01\x00\x50\xeb\xfb\x74\xfc\xf3\x4c\xbd" "\xf1\x5f\x21\x1e\xa8\x29\x77\x4f\xb6\x86\x32\x14\x11\xf7\x46\xc4\xe1\x88" "\xb8\x2f\x22\x8e\x44\xc4\xfd\x11\x95\xb2\x0f\x46\xc4\x43\x3b\xaa\xbd\x6f" "\xcb\x0a\xc9\x7e\x8f\x7f\xd2\xf1\xdf\xf3\xd9\xda\xd6\xc6\xf1\x5f\x3e\xfa" "\x8b\xa1\x62\x96\x3b\x54\x89\xbf\x3b\x79\x77\xae\x34\x7b\x32\x3b\x27\xa3" "\xd1\xdd\x9b\xe6\x27\xb6\xa9\xe3\x87\x97\x7e\xfd\xbc\xd1\xb1\xda\xf1\x5f" "\xba\xa5\xf5\xe7\x63\xc1\xac\x1d\x7f\x76\x6d\x9a\xa0\x9b\x99\x5a\x9c\xda" "\x4b\xcc\xb5\xae\x7e\x12\x31\xdc\x55\x2f\xfe\x24\xf2\x65\x9c\x24\x22\x8e" "\x46\xc4\xf0\x2e\xeb\x98\x7b\xea\xdb\x63\x8d\x8e\xdd\x3c\xfe\x6d\xb4\x60" "\x9d\xa9\xfc\x4d\xc4\x93\xd5\xeb\xbf\x12\x9b\xe2\xcf\x25\x0d\xd7\x27\x27" "\x9e\x3b\x3b\x79\x66\xbc\x2f\x4a\xb3\x27\xc7\xf3\xbb\x62\xab\x9f\x7f\x59" "\x7d\xbd\x51\xfd\x7b\x8a\xbf\x05\xd2\xeb\x7f\x20\xbb\xff\x37\xae\x46\xae" "\xc7\x3f\x94\xf4\x45\x2c\x7c\x75\xe5\x42\x65\xbd\x76\x61\xdb\x5f\xf7\xf7" "\xc6\xa7\xca\xaa\xd5\xdf\x3f\x6b\xd8\xa7\x77\x7b\xff\xf7\x24\x6f\x56\xd2" "\x3d\xd9\xbe\x0f\xa7\x16\x17\x2f\x4f\x44\xf4\x24\xaf\x6e\xdd\x3f\x79\xe3" "\x67\xf3\x7c\x5e\x3e\x8d\x7f\xf4\x44\xfd\xfe\x7f\xb8\xe6\x4c\x3c\x1c\x11" "\xe9\x4d\x7c\x7c\xfd\x37\x0d\x54\xda\xfe\x68\x44\x3c\x16\x11\x27\xb6\x39" "\x29\x3f\xbd\xf8\xf8\x7b\x79\x7a\xf3\x8a\x6f\xe3\xf8\xb7\x99\x95\x6f\xa1" "\x34\xfe\x99\xba\xaf\x7f\x35\xd7\x3f\x22\x16\x96\xf2\xeb\xff\x48\x9e\x58" "\x6a\x36\x51\xbc\xf0\xe3\x77\x8d\xea\x6f\xee\xfa\x9f\xae\xa4\x46\xb3\x3d" "\xcd\xbc\xfe\x35\xdb\xc0\xbd\x9c\x3b\x00\x00\x00\xb8\x53\x14\x2a\x33\x19" "\x49\x61\x6c\x3d\x5d\x28\x8c\x8d\x55\xff\x86\xff\x48\x1c\x28\x94\xe6\x17" "\x16\x9f\xee\x9f\xff\xe0\xd2\x4c\xf5\x6f\xe5\x87\xa2\xbb\x90\xcf\x74\x0d" "\xd6\xcc\x87\x4e\x64\x73\xc3\x79\x7e\x72\x53\xfe\x54\x36\x6f\xfc\x65\xb1" "\xbf\x92\x1f\x9b\x9e\x2f\xcd\xb4\x3b\x78\xe8\x70\x07\x1b\xf4\xff\xd4\x1f" "\xc5\x88\xf8\x6f\xcb\x74\x2e\x70\x37\xf1\xff\x5a\xd0\xb9\xf4\x7f\xe8\x5c" "\xfa\x3f\x74\x2e\xfd\x1f\x3a\x97\xfe\x0f\x9d\xab\x5e\xff\xff\xb8\x0d\xed" "\x00\xf6\x9f\xf7\x7f\xe8\x5c\xfa\x3f\x74\x2e\xfd\x1f\x3a\x97\xfe\x0f\x1d" "\xa9\xe1\xff\xc6\x17\x1a\x1f\xda\x9f\xc4\xce\x3f\x67\x40\x62\x3f\x13\x51" "\xb8\x2d\x9a\x71\x87\x26\x0a\xd1\x74\xe1\xae\xa6\x3f\xcc\x62\x97\x89\xde" "\xba\x87\xda\xfd\xca\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" "\x1a\xff\x07\x00\x00\xff\xff\x18\xa9\xe3\xf9", 1109); syz_mount_image( /*fs=*/0x20000080, /*dir=*/0x20000440, /*flags=MS_I_VERSION|MS_SLAVE|MS_PRIVATE|MS_POSIXACL|MS_RELATIME|MS_NOSUID|0xc0400004*/ 0xc0ed0006, /*opts=*/0x20000740, /*chdir=*/0x7e, /*size=*/0x455, /*img=*/0x20000940); memcpy((void*)0x20000080, "./bus\000", 6); syscall(__NR_open, /*file=*/0x20000080ul, /*flags=O_SYNC|O_NOATIME|O_CREAT|O_RDWR|0x400000000*/ 0x400141042ul, /*mode=*/0ul); memcpy((void*)0x20000380, "/dev/loop", 9); *(uint8_t*)0x20000389 = 0x30; *(uint8_t*)0x2000038a = 0; memcpy((void*)0x20000140, "./bus\000", 6); syscall(__NR_mount, /*src=*/0x20000380ul, /*dst=*/0x20000140ul, /*type=*/0ul, /*flags=MS_BIND*/ 0x1000ul, /*data=*/0ul); memcpy((void*)0x20000100, "vfat\000", 5); memcpy((void*)0x20000080, "\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); memcpy((void*)0x20000200, "shortname=mixed", 15); *(uint8_t*)0x2000020f = 0x2c; memcpy((void*)0x20000210, "uni_xlate=1", 11); *(uint8_t*)0x2000021b = 0x2c; memcpy((void*)0x2000021c, "shortname=lower", 15); *(uint8_t*)0x2000022b = 0x2c; memcpy((void*)0x2000022c, "shortname=lower", 15); *(uint8_t*)0x2000023b = 0x2c; memcpy((void*)0x2000023c, "uni_xlate=0", 11); *(uint8_t*)0x20000247 = 0x2c; memcpy((void*)0x20000248, "nocase", 6); *(uint8_t*)0x2000024e = 0x2c; memcpy((void*)0x2000024f, "shortname=mixed", 15); *(uint8_t*)0x2000025e = 0x2c; memcpy((void*)0x2000025f, "rodir", 5); *(uint8_t*)0x20000264 = 0x2c; memcpy((void*)0x20000265, "shortname=mixed", 15); *(uint8_t*)0x20000274 = 0x2c; memcpy((void*)0x20000275, "check=strict", 12); *(uint8_t*)0x20000281 = 0x2c; memcpy((void*)0x20000282, "shortname=winnt", 15); *(uint8_t*)0x20000291 = 0x2c; memcpy((void*)0x20000292, "uni_xlate=0", 11); *(uint8_t*)0x2000029d = 0x2c; memcpy((void*)0x2000029e, "rodir", 5); *(uint8_t*)0x200002a3 = 0x2c; memcpy((void*)0x200002a4, "utf8=1", 6); *(uint8_t*)0x200002aa = 0x2c; memcpy((void*)0x200002ab, "allow_utime", 11); *(uint8_t*)0x200002b6 = 0x3d; sprintf((char*)0x200002b7, "%023llo", (long long)0xee9); *(uint8_t*)0x200002ce = 0x2c; memcpy((void*)0x200002cf, "errors=remount-ro", 17); *(uint8_t*)0x200002e0 = 0x2c; memcpy((void*)0x200002e1, "smackfsfloor", 12); *(uint8_t*)0x200002ed = 0x3d; memcpy((void*)0x200002ee, "uni_xlate=1", 11); *(uint8_t*)0x200002f9 = 0x2c; *(uint8_t*)0x200002fa = 0; memcpy( (void*)0x200003c0, "\x78\x9c\xec\xdd\xbd\x6e\x1c\x55\x14\x00\xe0\x33\xeb\x9d\xd9\x05\x8a\x75" "\x41\x85\x90\x18\x09\x0a\xaa\x28\x4e\x4b\xb3\x16\x4a\x24\x84\x2b\x22\x17" "\x40\x01\x86\x24\x12\xf2\xae\x90\x62\xc9\x12\x3f\x62\x49\x45\x4b\x43\x41" "\xc1\x13\x50\xf1\x20\x34\x88\x17\x40\xa2\x45\xa2\x23\x48\x91\x2e\x9a\xd9" "\x99\xfd\x71\x26\x1b\x2d\x61\x13\x20\xdf\xd7\xf8\xf8\xde\x73\xe6\x9e\xbb" "\x3b\xb6\xc7\x85\xaf\xdf\x7f\x71\x7a\x7a\xa3\x8c\x5b\x77\x3e\xff\x25\x86" "\xc3\x2c\x7a\xe3\x18\xc7\xdd\x2c\xf6\xa3\x17\xad\x2f\x63\xcd\xf8\xeb\x00" "\x00\xfe\xcb\xee\xa6\x14\xbf\xa7\xb9\x6d\xea\xb2\x88\x18\xee\xae\x2d\x00" "\x60\x87\xb6\xfe\xf9\xff\xc3\xce\x5b\x02\x00\x76\xec\xfa\xdb\xef\xbc\x79" "\x78\x74\x74\xf5\xad\xb2\x1c\xc6\xb5\xe9\x57\xe7\xc7\xd5\x6f\xf6\xd5\xc7" "\xf9\xfc\xe1\xad\xf8\x28\x26\x71\x33\x2e\xc7\x28\xee\x45\xd4\x0f\x0a\x79" "\xd4\x4f\x0b\x55\x78\x2d\xa5\x34\xeb\x97\x95\xfd\x78\x65\x3a\x3b\x3f\xae" "\x2a\xa7\xef\xfd\xd8\x5c\xff\xf0\xb7\x88\xba\xfe\x20\x46\xb1\x5f\x0f\x2d" "\x9e\x36\xea\xfa\x37\x8e\xae\x1e\x94\x73\x2b\xf5\xb3\xaa\x8f\x67\x9b\xf5" "\xc7\x55\xfd\x95\x18\xc5\xf3\x8b\xe2\xb5\xfa\x2b\x1d\xf5\x71\x5c\xc4\xab" "\x2f\xaf\xf4\x7f\x29\x46\xf1\xd3\x87\xf1\x71\x4c\xe2\x46\xdd\xc4\xb2\xfe" "\x8b\x83\xb2\x7c\x3d\x7d\xf3\xc7\x67\xef\x56\xed\x55\xf5\xd9\xec\xfc\x78" "\x50\xe7\x2d\xa5\xbd\xc7\xfc\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\xf0\x3f\x76\xa9\x39\x3b\x67\x10\xf5\xf9\x3d" "\xd5\x50\x73\xfe\xce\xde\xbd\xea\x93\x3c\xca\xd6\xfe\xfa\xf9\x3c\xf3\xfa" "\xac\xbd\xd0\xea\xf9\x40\x29\xa5\x59\x8a\xef\xda\xf3\x75\x2e\x97\x65\x99" "\x9a\xc4\x65\x7d\x3f\x5e\xe8\x47\xff\xc9\xec\x1a\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x5d\xce\x3e\xf9\xf4\xf4\x64\x32" "\xb9\x79\xfb\x1f\x09\xda\xd3\x00\xfa\x11\xf1\xe7\xf5\x88\xbf\x7b\x9d\xf1" "\xca\xc8\x4b\xb1\x39\x79\xd0\xac\x79\x32\x99\xf4\x9a\x70\x3d\xa7\x3f\x58" "\x19\x89\xbd\x36\x27\x8b\xd8\xd8\x46\xb5\x89\xee\xa9\x94\xad\x2e\xd1\x7b" "\xf4\xd7\xf0\x99\xfb\x7a\x6e\x82\xef\x3f\xc8\xb7\xbc\xe0\xf0\xe1\x39\x79" "\xf7\x5a\x17\x83\xfe\x23\xec\xab\xbd\xbb\x4e\x4f\xb2\xee\xd7\x70\x10\xed" "\xc8\xb0\xb9\x49\xbe\x2d\x22\x96\x39\x45\x3c\x64\x89\xf6\x5d\x2f\x1e\x94" "\x93\x62\x9b\xdb\xaf\xe8\x9c\x1a\x6d\xbd\xf7\xe2\xb9\x3a\x98\x6d\xc8\x89" "\x6c\x53\x63\xaf\xfd\x3a\xdf\x57\x33\x92\x5d\xdc\x45\x51\xbf\xaa\x9d\xe5" "\x79\x13\x44\x1e\xdd\x5f\x32\xc3\x07\xdc\xcf\xdd\xc1\xfd\xdf\x2b\x32\xa7" "\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x4e\x65" "\x8b\x3f\xfa\xed\x98\xbc\xb3\xb1\xb4\x97\x06\x3b\x6b\x0b\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\xab\xb3\xc5\xff\xff\x5f\x04\x3f" "\xe7\x11\x8b\x91\x7c\x6d\xaa\x09\x66\x4d\x71\xc7\xd4\xc5\xa0\x88\xdb\x67" "\x4f\x78\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x3c\x05\xfe\x0a\x00\x00\xff\xff\x30\x2b\x56" "\x1b", 720); syz_mount_image(/*fs=*/0x20000100, /*dir=*/0x20000080, /*flags=*/0, /*opts=*/0x20000200, /*chdir=*/6, /*size=*/0x2d0, /*img=*/0x200003c0); memcpy((void*)0x20000000, "./bus\000", 6); res = syscall(__NR_open, /*file=*/0x20000000ul, /*flags=O_SYNC|O_NOCTTY|O_NOATIME|O_RDWR|0x3c*/ 0x14113eul, /*mode=*/0ul); if (res != -1) r[0] = res; memcpy((void*)0x20000080, "memory.events\000", 14); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000080ul, /*flags=*/0x275aul, /*mode=*/0ul); if (res != -1) r[1] = res; syscall(__NR_write, /*fd=*/r[1], /*data=*/0x20000100ul, /*len=*/0xfeccul); syscall(__NR_write, /*fd=*/r[0], /*data=*/0x20000080ul, /*len=*/0x208e24bul); return 0; }