// https://syzkaller.appspot.com/bug?id=af320a5a97570a0040c32e06da9727aff0d8fd36 // 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 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_write #define __NR_write 64 #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, 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 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, loopfd = -1, 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) { memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; 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) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } errno = err; return res; } uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x20000600, "hfsplus\000", 8); memcpy((void*)0x20000040, "./bus\000", 6); memcpy( (void*)0x20000640, "\x78\x9c\xec\xdd\xcd\x6f\x1c\x67\x1d\x07\xf0\xef\x6c\xd6\x4e\x36\x48\xa9" "\xdb\x26\x34\x42\x95\xb0\x1a\xa9\x20\x2c\x12\xdb\x2b\x17\xc2\x85\x80\x10" "\xf2\xa1\x42\x15\x1c\x38\x5b\xc9\xa6\xb1\xb2\x71\x2b\x7b\x8b\xdc\x0a\xa1" "\xf0\x7e\xe5\xc0\x1f\x50\x0e\xbe\x71\x42\xe2\x1e\x51\xce\xf4\xc6\xd5\xc7" "\x4a\x48\x5c\x7a\xf2\x2d\x68\x66\x67\xed\x75\xbc\x71\x9c\x37\xef\x1a\x7f" "\x3e\xd1\xb3\xcf\xf3\xcc\xb3\xf3\xcc\x6f\x7e\x3b\x33\xbb\xb3\x56\xb4\x01" "\x4e\xad\xe5\xb9\x34\x1f\xa4\xc8\xf2\xdc\xbb\x9b\x65\x7f\x7b\xab\xdd\xdd" "\xde\x6a\x9f\xad\x87\xbb\x49\xca\x76\x23\x69\xf6\xab\x14\x6b\x49\xf1\x59" "\x72\x23\xfd\x92\xa9\xa1\xe9\x8a\x91\x1b\x19\x2c\xfd\x72\xfb\x8b\x7e\xa3" "\x59\x97\x6a\xa4\xf9\xfc\x7b\x71\xbf\x2e\x99\x4d\x72\xa6\xae\x0f\x9a\x7a" "\xa6\xf9\x6e\x3e\x76\xbe\xa3\x2a\x76\x73\x50\x26\xec\x4a\x59\xdf\x7f\xae" "\x09\xe1\xc5\x78\x78\xc0\x53\x1d\x99\xa3\xcf\x77\xe0\x44\x29\xfa\xef\x9b" "\x07\xcc\x24\xe7\x93\x9c\xab\x3f\x07\xa4\xbe\x3a\x34\x8e\x37\xba\x17\xcf" "\xfb\x2f\x00\x00\x00\xa7\xc1\x2b\x3b\xd9\xc9\x66\x2e\x8c\x3b\x0e\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x38\x49\xea\xdf\xff\x2f\xea\xd2\x18\xb4\x67" "\x53\x0c\x7e\xff\x7f\xba\x5e\x96\xba\x7d\xa2\x3d\x18\x77\x00\x00\x00\x00" "\x00\x00\x00\x00\xf0\x02\x7c\x7d\x27\x3b\xd9\xcc\x85\x41\xff\x61\x51\xfd" "\xcd\xff\xad\xaa\x73\xb1\x7a\xfc\x4a\x3e\xca\x46\x3a\x59\xcf\xd5\x6c\x66" "\x25\xbd\xf4\xb2\x9e\x85\x24\x33\x43\x13\x4d\x6f\xae\xf4\x7a\xeb\x0b\x47" "\x58\x73\x71\xe4\x9a\x8b\xc7\xb3\xbf\x00\x00\x00\x00\x00\x00\x00\xf0\x7f" "\xea\x37\x59\xde\xfb\xfb\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x4c\x82\x22\x39\xd3\xaf\xaa\x72\x71\xd0\x9e\x49\xa3\x99\xe4\x5c\x92\xe9" "\xf2\x79\xf7\x93\xcf\x07\xed\x93\xec\xc1\xb8\x03\x00\x00\x00\x80\x63\xf0" "\xca\x4e\x76\xb2\x99\x0b\x83\xfe\xc3\xa2\xba\xe7\xff\x6a\x75\xdf\x7f\x2e" "\x1f\x65\x2d\xbd\xac\xa6\x97\x6e\x3a\xb9\x55\x7d\x17\xd0\xbf\xeb\x6f\x6c" "\x6f\xb5\xbb\xdb\x5b\xed\x7b\x65\x39\x38\xef\x0f\xfe\xfb\x54\x61\x54\x33" "\xa6\xff\xdd\xc3\xe8\x2d\x5f\xae\x9e\xd1\xca\xed\xac\x56\x4b\xae\xe6\x66" "\x3e\x48\x37\xb7\xd2\xa8\xd6\x2c\x5d\x1e\xc4\x33\x3a\xae\x5f\x97\x31\x15" "\xdf\xaf\x1d\x31\xb2\x5b\x75\x5d\xee\xf9\x9f\xea\x7a\x32\xcc\x54\x19\x99" "\xda\xcd\xc8\x7c\x1d\x5b\x99\x8d\x57\x0f\xcf\xc4\x53\xbe\x3a\x8f\x6e\x69" "\x21\x8d\xdd\x6f\x7e\x2e\xbe\x84\x9c\x9f\xaf\xeb\x72\x7f\xfe\x30\xd1\x39" "\x5f\xac\x8f\xbe\xcf\xcb\x73\xe6\xf0\x4c\x24\xdf\xf8\xfb\x5f\x7f\x7e\xa7" "\xbb\x76\xf7\xce\xed\x8d\xb9\xc9\xd9\xa5\x67\xf4\x68\x26\xda\x43\xe7\xe1" "\x1b\xa7\x2a\x13\xf3\x55\x26\x2e\xed\xf6\x97\xd3\xac\x5b\xef\x65\x3d\xab" "\xf9\x45\x56\xd2\x4b\x27\xb3\xf9\x51\xd5\x5a\xa9\x8f\xe7\xf2\x71\xe6\xf0" "\x4c\xdd\xd8\xd7\x7b\xef\x49\x91\x4c\xd7\xaf\x4b\xff\x2a\xba\x3f\xa6\x1f" "\xe7\x67\x99\xcb\xec\x63\x63\x7a\xab\x5a\xf7\x42\x56\xf3\x93\x7c\x90\x5b" "\xe9\xe4\x9d\xea\xdf\x62\x16\xf2\x9d\x2c\x65\x29\xd7\x87\x5e\xe1\x4b\x47" "\x38\xeb\x1b\x4f\x77\xd6\x5f\xf9\x66\xdd\x68\x25\xf9\x63\x5d\xef\xf7\x8f" "\xa3\xcd\xf4\xc2\x95\x79\x7d\x75\x28\xaf\xc3\xd7\xdc\x99\x6a\x6c\x78\xc9" "\x5e\x96\x5e\x7b\x7c\x96\x8a\x67\xbc\x36\x36\xbf\x56\x37\xca\x6d\xfc\xb6" "\xae\x27\xc3\xa3\x99\x58\x18\xca\xc4\xeb\x87\x1f\x2f\x7f\x79\x58\x3e\x6e" "\x74\xd7\xee\xae\xdf\x59\xf9\xf0\x88\xdb\x7b\xbb\xae\xcb\x54\xfe\x7e\xa2" "\xde\x25\xca\xe3\xe5\xb5\xf2\xc5\xaa\x7a\xfb\x8f\x8e\x72\xec\xf5\x91\x63" "\x0b\xd5\xd8\xc5\xdd\xb1\xc6\x81\xb1\x4b\xbb\x63\x4f\x3a\x53\xa7\xeb\xcf" "\x70\x07\x67\x5a\xac\xc6\xde\x18\x39\xd6\xae\xc6\x2e\x0f\x8d\x8d\xfa\xbc" "\x05\xc0\xc4\x3b\xff\xad\xf3\xd3\xad\xff\xb4\xfe\xd5\xfa\xb4\xf5\xbb\xd6" "\x9d\xd6\xbb\xe7\x7e\x78\xf6\xbb\x67\xdf\x9c\xce\xd4\x3f\xa7\xbe\xd7\x9c" "\x3f\xf3\x76\xe3\xcd\xe2\x6f\xf9\x34\xbf\xda\xbb\xff\x07\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x9e\xdd\xc6\xc7\x9f\xdc\x5d\xe9\x76\x3b\xeb\x63\x6e\x14\xf5\x0f\xf9" "\x4c\x4a\x3c\x1a\x1a\xa7\xbb\x31\xee\x2b\x13\xf0\xb2\x5d\xeb\xdd\xfb\xf0" "\xda\xc6\xc7\x9f\x7c\x7b\xf5\xde\xca\xfb\x9d\xf7\x3b\x6b\x53\x4b\x4b\xd7" "\xe7\xaf\x2f\xbd\xd3\xbe\x76\x7b\xb5\xdb\x99\xef\x3f\x8e\x3b\x4a\xe0\x65" "\xd8\x7b\xd3\x1f\x77\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x51\x1d" "\xc7\x7f\x27\x18\xf7\x3e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\xdb\xf2\x5c\x9a\x0f\x52\x64" "\x61\xfe\xea\x7c\xd9\xdf\xde\x6a\x77\xcb\x32\x68\xef\x3d\xb3\x99\xa4\x91" "\xa4\xf8\x65\x52\x7c\x96\xdc\x48\xbf\x64\x66\x68\xba\xe2\x71\xdb\xf9\xf3" "\xea\xf5\x9f\xfe\xfb\xcb\xed\x2f\xf6\xe6\x6a\x0e\x9e\xdf\x38\x6c\xbd\x91" "\xa6\x1e\x5d\x70\xbf\x2e\x99\x4d\x72\xa6\xae\x9f\xc3\xbe\xf9\x6e\x3e\xf7" "\x7c\xc5\xee\x1e\x96\x09\xbb\x32\x48\x1c\x8c\xdb\xff\x02\x00\x00\xff\xff" "\x56\xb1\x08\xba", 1516); syz_mount_image(0x20000600, 0x20000040, 0x2a00018, 0x20000c40, 3, 0x5ec, 0x20000640); memcpy((void*)0x20000340, "./file1\000", 8); res = syscall(__NR_openat, 0xffffff9c, 0x20000340ul, 0x16b142ul, 0ul); if (res != -1) r[0] = res; *(uint8_t*)0x20000d00 = 0x7f; *(uint8_t*)0x20000d01 = 0x45; *(uint8_t*)0x20000d02 = 0x4c; *(uint8_t*)0x20000d03 = 0x46; *(uint8_t*)0x20000d04 = 0; *(uint8_t*)0x20000d05 = 0; *(uint8_t*)0x20000d06 = 0; *(uint8_t*)0x20000d07 = 0; *(uint64_t*)0x20000d08 = 0; *(uint16_t*)0x20000d10 = 0; *(uint16_t*)0x20000d12 = 0; *(uint32_t*)0x20000d14 = 0; *(uint64_t*)0x20000d18 = 0; *(uint64_t*)0x20000d20 = 0x40; *(uint64_t*)0x20000d28 = 0; *(uint32_t*)0x20000d30 = 0; *(uint16_t*)0x20000d34 = 0; *(uint16_t*)0x20000d36 = 0x38; *(uint16_t*)0x20000d38 = 0; *(uint16_t*)0x20000d3a = 0; *(uint16_t*)0x20000d3c = 0; *(uint16_t*)0x20000d3e = 0; *(uint32_t*)0x20000d40 = 0; *(uint32_t*)0x20000d44 = 0; *(uint64_t*)0x20000d48 = 0; *(uint64_t*)0x20000d50 = 0; *(uint64_t*)0x20000d58 = 0; *(uint64_t*)0x20000d60 = 0; *(uint64_t*)0x20000d68 = 0; *(uint64_t*)0x20000d70 = 0; memset((void*)0x20000d78, 0, 256); memset((void*)0x20000e78, 0, 256); memset((void*)0x20000f78, 0, 256); memset((void*)0x20001078, 0, 256); syscall(__NR_write, r[0], 0x20000d00ul, 0x478ul); return 0; }