// https://syzkaller.appspot.com/bug?id=b61b7a4b10ec6ff95e96ef8f408bd5fd387ad7b6 // 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_ftruncate #define __NR_ftruncate 46 #endif #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 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"); } 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; } 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=*/(intptr_t)-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=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$hfsplus arguments: [ // fs: ptr[in, buffer] { // buffer: {68 66 73 70 6c 75 73 00} (length 0x8) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // flags: mount_flags = 0x180000c (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {6e 6c 73 3d 61 73 63 69 69 2c 67 69 64 3d} // (length 0xe) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 70 61 72 74 3d 30 78 30 30 30 30 30 30 30 30 // 30 30 30 30 30 30 62 62 2c 6e 6f 62 61 72 72 69 65 72 2c 6e 6f 62 // 61 72 72 69 65 72 2c 63 72 65 61 74 6f 72 3d 7f cf b5 b7 2c 70 61 // 72 74 3d 30 78 30 30 30 30 30 30 30 30 30 30 30 30 30 31 30 31 2c // 67 69 64 3d} (length 0x56) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 75 6d 61 73 6b 3d 30 30 30 30 30 30 30 30 30 // 30 30 30 30 30 30 30 30 30 30 30 30 30 30 2c 64 65 63 6f 6d 70 6f // 73 65 2c 66 6f 72 63 65 2c 6e 6f 64 65 63 6f 6d 70 6f 73 65 2c 62 // 61 72 72 69 65 72 2c 6e 6f 64 65 63 6f 6d 70 6f 73 65 2c 74 79 70 // 65 3d b0 29 e1 c0 2c 75 69 64 3d} (length 0x5d) // } // union ANYUNION { // ANYRESOCT: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 74 79 70 65 3d d2 10 0d 1b 2c 75 29 64 3d d4 // f8 1c 66 21 0b bc bf 82 44 0a 10 4a b9 56 f2 ba 5e 36 e4 1c cb 1b // 04 0f a8 b8 29 b0 b8 70 78 de 65 4c 66 ac 22 ae ba a2 c6 53 ef 12 // 7e 38 e0 aa 22 29 f9 cf 6a 85 03 5e b8 6c 32 a5 9f 1f 3a cd b9 8c} // (length 0x52) // } // union ANYUNION { // ANYRESDEC: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {06 00 00 bd 00} (length 0x5) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // union ANYUNION { // ANYRES8: ANYRES8 (resource) // } // } // } // chdir: int8 = 0x2 (1 bytes) // size: len = 0x6f6 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x6f6) // } // ] // returns fd_dir memcpy((void*)0x20000000, "hfsplus\000", 8); memcpy((void*)0x20000100, "./bus\000", 6); memcpy((void*)0x20000300, "nls=ascii,gid=", 14); sprintf((char*)0x2000030e, "0x%016llx", (long long)0); memcpy( (void*)0x20000320, "\x2c\x70\x61\x72\x74\x3d\x30\x78\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x30\x62\x62\x2c\x6e\x6f\x62\x61\x72\x72\x69\x65\x72\x2c\x6e" "\x6f\x62\x61\x72\x72\x69\x65\x72\x2c\x63\x72\x65\x61\x74\x6f\x72\x3d\x7f" "\xcf\xb5\xb7\x2c\x70\x61\x72\x74\x3d\x30\x78\x30\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x30\x30\x30\x31\x30\x31\x2c\x67\x69\x64\x3d", 86); sprintf((char*)0x20000376, "0x%016llx", (long long)0); memcpy((void*)0x20000388, "\x2c\x75\x6d\x61\x73\x6b\x3d\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" "\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x2c\x64\x65\x63" "\x6f\x6d\x70\x6f\x73\x65\x2c\x66\x6f\x72\x63\x65\x2c\x6e\x6f\x64\x65" "\x63\x6f\x6d\x70\x6f\x73\x65\x2c\x62\x61\x72\x72\x69\x65\x72\x2c\x6e" "\x6f\x64\x65\x63\x6f\x6d\x70\x6f\x73\x65\x2c\x74\x79\x70\x65\x3d\xb0" "\x29\xe1\xc0\x2c\x75\x69\x64\x3d", 93); sprintf((char*)0x200003e5, "%023llo", (long long)-1); memcpy((void*)0x200003fc, "\x2c\x74\x79\x70\x65\x3d\xd2\x10\x0d\x1b\x2c\x75\x29\x64\x3d\xd4\xf8" "\x1c\x66\x21\x0b\xbc\xbf\x82\x44\x0a\x10\x4a\xb9\x56\xf2\xba\x5e\x36" "\xe4\x1c\xcb\x1b\x04\x0f\xa8\xb8\x29\xb0\xb8\x70\x78\xde\x65\x4c\x66" "\xac\x22\xae\xba\xa2\xc6\x53\xef\x12\x7e\x38\xe0\xaa\x22\x29\xf9\xcf" "\x6a\x85\x03\x5e\xb8\x6c\x32\xa5\x9f\x1f\x3a\xcd\xb9\x8c", 82); sprintf((char*)0x2000044e, "%020llu", (long long)0); memcpy((void*)0x20000462, "\x06\x00\x00\xbd\x00", 5); sprintf((char*)0x20000467, "0x%016llx", (long long)-1); *(uint8_t*)0x20000479 = 0; memcpy( (void*)0x200004c0, "\x78\x9c\xec\xdd\x3b\x68\x24\xe7\x1d\x00\xf0\xff\xac\x76\x57\x2b\x05\xce" "\x3a\xfb\x1e\x4e\x30\x58\xf8\xc0\x09\x11\xb9\x93\x6e\x91\x13\xa5\xc9\x25" "\x84\xa0\xc2\x04\xe3\x14\xa9\x97\xb3\xce\x27\x6e\x4f\x67\x24\x39\xe8\x8e" "\x10\xcb\x79\xf4\x29\x5c\x84\x54\x4e\xa1\xce\xa4\x08\x4e\x7f\x90\xd4\x31" "\x0e\xc1\xad\xaa\x60\x08\xb8\x71\xa5\x4e\x61\x66\x67\xf6\xa1\x5d\xed\xae" "\x4e\x4f\x27\xbf\x9f\x98\x9d\x6f\xe6\x7b\xcc\x37\xff\x79\xed\x03\xf1\x05" "\xf0\x7f\x6b\x79\x2e\xca\x4f\x23\x89\xe5\xb9\xd7\xb7\xd2\xe5\xdd\x9d\x7a" "\x73\x62\xa7\x3e\x99\x67\x37\x23\xa2\x1a\x11\xa5\x88\x72\x3a\x4b\xd3\x6b" "\x91\xe5\xde\xc9\xa7\xf8\x7a\x44\x24\x79\xf9\xa4\xdd\xf0\x3f\x7b\xb7\xf3" "\xc1\xea\xd2\x9b\x9f\x7d\xb9\xfb\x79\x6b\xa9\x9c\x4f\x59\xf9\xa4\xa7\xde" "\x68\xd5\xfe\x55\xdb\xf9\x14\xb3\x11\x31\x91\xcf\xfb\x55\x0e\x69\xf1\xe3" "\x83\x9b\xef\x69\xef\x6e\x3a\x9f\x3c\x42\x07\xfb\x74\xf6\x30\x0d\xd8\x8d" "\x22\x70\xf1\xc7\xe3\x34\x0a\xc7\xb7\xdf\x67\xbb\x9d\xf7\xd1\xbf\xb2\xd7" "\x61\xd5\x8f\x72\xdd\x02\x17\x54\xd2\x7a\x6e\xf6\x99\x89\x98\x8e\x88\x5a" "\x44\xeb\xa9\x9f\xdf\x1d\x4a\x67\xdb\xbb\x93\x75\xac\x67\x39\x00\x00\x00" "\x9c\x97\xa9\xa3\x57\x79\x6e\x2f\xf6\x62\x2b\x2e\x9d\x46\x77\x00\x00\x00" "\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\x7f\x55\x3e\xfe\x7f\x92\x4f\xa5\x22\x3d\x1b" "\x49\x31\xfe\x7f\x35\x5f\x17\x79\xfa\x02\x1a\x3d\x10\xe2\xa7\xf9\xe0\xff" "\x4f\x4f\xbf\x33\x00\x00\x00\x00\x00\x00\x00\x70\xea\x5e\xde\x8b\xbd\xd8" "\x8a\x4b\xc5\xf2\x7e\x92\xfd\xe6\xff\x4a\xd7\x6f\xfc\x5f\x8b\x77\x63\x23" "\x56\x62\x3d\x6e\xc6\x56\x34\x62\x33\x36\x63\x3d\x16\x22\x62\xa6\xab\xa1" "\xea\x56\x63\x73\x73\x7d\x21\xab\x19\x71\x65\x48\xcd\xdb\xf1\xc9\x80\x9a" "\xb7\x0f\xef\xe3\x9d\x13\xde\x67\x00\x00\x00\x00\x00\x00\x00\xb8\xe0\x6a" "\x23\xf2\x1f\x54\xb2\xd9\x1f\xba\xff\x6f\xff\xd7\xb1\xdc\xf9\xfd\x1f\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x82\x24\x62\xa2\x35\xcb\xa6" "\x2b\x45\x7a\x26\x4a\xe5\x88\xa8\x15\xe5\xb6\x23\x3e\x89\x88\xea\xf9\xf6" "\xf6\x48\x92\x41\x2b\x9f\x9e\x7d\x3f\x00\x00\x00\xe0\x58\x6a\xbd\x8b\x49" "\x6d\x8c\x3a\xcf\xbd\x17\x7b\xb1\x15\x97\x8a\xe5\xfd\x24\xfb\xcc\x7f\x2d" "\xfb\xbc\x5c\x8b\x77\x63\x2d\x36\x63\x35\x36\xa3\x19\x2b\xf1\x56\xfe\x19" "\x3a\xfd\xd4\x5f\xda\xdd\xa9\x37\x77\x77\xea\x0f\xd3\xa9\xbf\xdd\x1f\x7e" "\x71\xa4\xae\x67\x2d\x46\xeb\xbb\x87\xc1\x5b\x8e\x88\xed\x72\x44\xdc\x8b" "\xd5\x6c\xcd\xcd\xb8\x1b\x49\xec\x67\x4a\x79\x2b\x2f\xee\xee\xd4\xd3\xf9" "\xc3\xc1\xfd\x7a\x3f\xed\x53\xf2\x83\xdc\x90\xde\x4c\x74\xa5\xb3\x2d\x5f" "\xff\x38\x4b\xff\xbe\xf7\x5b\x84\xf2\x91\x76\xf1\x19\x95\x0e\xcd\x99\xc9" "\x72\x2b\xed\x88\xcc\xe7\x7d\x4b\x6b\x5c\x2e\x22\x30\x38\x12\x3d\x47\x67" "\xd0\x69\x52\x1e\xba\xa5\x85\x28\xb5\xbf\xf9\xb9\x32\x7c\x4b\x83\x63\xfe" "\xfe\xf0\x7d\x9e\x3e\x50\x6a\xe0\x37\x37\xe7\xe2\x60\x24\x6e\x47\xa9\x7d" "\x84\xae\x0d\x88\xc4\x54\x77\xe5\x6f\xfe\xf5\xa3\x9f\xdf\x6f\xae\x3d\xb8" "\x7f\x6f\x63\xee\xe2\xec\xd2\x40\xef\x8d\x2c\x71\x30\x12\xf5\xae\x48\x5c" "\x1f\x7e\x4e\x7c\xa5\x22\x31\xda\x7c\x16\x89\xab\xed\xe5\xe5\xf8\x49\xfc" "\x2c\xe6\xe2\x8b\xc9\x37\x62\x3d\x56\xe3\x17\xd1\x88\xcd\x58\x99\x2d\xf2" "\x1b\xf9\xf9\x9c\xbe\xce\x0c\x8f\xd4\xa7\xd3\xdd\x4b\x6f\x8c\xea\x49\x35" "\xfe\x5d\xdf\xdf\x2f\xee\x5f\x83\xfa\x34\x1b\x3d\x7d\x8a\xd9\xf8\x71\x96" "\x6a\xc4\x2b\xd9\x31\xbd\x14\xab\x91\xc4\xa3\x88\x58\x89\xd7\xb2\xbf\xdb" "\xb1\xd0\xbe\x1b\x74\x8e\xf0\xd5\x31\xae\xfa\xd2\x18\x77\xda\x2e\x37\xbe" "\x95\xcd\xda\x61\xea\xbd\x76\x7a\xfd\x79\xbc\x26\x4f\x4a\x7a\xaf\xbb\x1c" "\x9d\xb8\x76\xdf\x73\x67\xb2\xbc\xee\x35\x9d\x28\x3d\x3f\x30\x4a\xc5\xb3" "\x6e\xfc\xe7\x51\x97\xf2\x37\xf2\x44\xda\xc2\x6f\x86\x3e\x1f\xce\xda\xc1" "\x48\x2c\x74\x45\xe2\x85\xc3\xce\x97\x56\x48\xff\x94\x3d\x4d\x36\x9a\x6b" "\x0f\xd6\xef\x37\xde\x19\x73\x7b\xaf\xe6\xf3\xf4\x3a\xfa\xdd\x85\x7a\x4a" "\xa4\x7b\xf3\x7c\xd4\xf2\x9d\xbb\x9c\xbd\x26\xd9\x35\x35\x9f\xe5\xbd\xd0" "\x7e\xc2\xf6\xc6\xab\x9a\xff\xe2\xd2\x52\xea\xcb\xbb\xda\xae\xd7\xba\x52" "\x7f\x1a\x8f\xe2\xad\x9e\x2b\xf5\xbb\xb1\x18\x8b\xb1\x94\x95\xbe\x96\x95" "\xae\xf4\x3d\xb1\xd2\xbc\xeb\xed\x96\x7a\xef\xe1\x69\xde\x8b\x69\x5e\xfb" "\x87\x9d\xee\xf7\x5b\x8f\xa2\xd9\x7a\x3f\x04\xc0\xc5\x36\xfd\xed\xe9\xea" "\xd4\x7f\xa6\xfe\x31\xf5\xe1\xd4\x6f\xa7\xee\x4f\xbd\x5e\xfb\xd1\xe4\xf7" "\x26\x5f\xaa\x46\xe5\xef\x95\xef\x97\xe7\x27\x5e\x2d\xbd\x94\xfc\x25\x3e" "\x8c\x5f\x75\x3e\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x6e\xe3\xf1\x93\x07\x8d" "\x66\x73\x65\x7d\x70\xa2\x34\x38\x2b\x19\x5e\xab\xd1\xdc\x2f\x06\x12\x1b" "\x52\xa6\x27\x91\xe4\x43\xe5\x8c\x51\x38\xd9\x78\xfc\x64\x7f\x64\x83\xc3" "\x13\x93\x79\xf7\x9e\xb1\xfa\x49\x26\x8a\x61\xf8\x46\x17\x9e\x1d\xda\x4e" "\xf9\x58\xdd\x48\xb6\x0f\x1e\xaf\xda\xe8\x63\x51\x8c\xf2\x34\xc6\x26\x92" "\xbe\x80\xa7\x95\x9f\x39\x74\xc5\x96\x3b\x6b\x2a\x17\xe0\x50\x1e\x4c\xcc" "\x9e\x5c\x83\xc5\x09\xdb\x95\x75\x94\xb3\xb7\xd2\x73\xd1\xf7\x64\x4d\x44" "\xc4\xa0\x5a\x23\x6e\x1c\x13\xc7\xbb\xef\x00\xe7\xef\xd6\xe6\xc3\x77\x6e" "\x6d\x3c\x7e\xf2\x9d\xd5\x87\x8d\xb7\x57\xde\x5e\x59\xab\x2c\x2e\x2e\xcd" "\x2f\x2d\xbe\x56\xbf\x75\x6f\xb5\xb9\x32\xdf\x7a\xed\xaa\x70\x26\x83\xdf" "\x02\x67\xa1\xfb\xed\x44\x5b\x35\x22\x5e\x1e\x5d\x77\xc8\x40\xad\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\xc0\x29\x3a\x8b\xff\x85\x38\xef\x7d\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\xbe\xda\x96\xe7\xa2\xfc\x34\x92\x58\x98\xbf\x39\x9f\x2e\xef\xee" "\xd4\x9b\xe9\x54\xa4\x3b\x25\xcb\x11\x51\x8a\x88\xe4\x97\x11\xc9\xdf\x22" "\xee\x44\x6b\x8a\x99\xae\xe6\x92\xc3\xb6\xf3\xc1\xea\xd2\x9b\x9f\x7d\xb9" "\xfb\x79\xa7\xad\x72\x51\xbe\x14\xb1\x7d\x68\xbd\xf1\x6c\xe7\x53\xcc\x46" "\xc4\x44\x3e\x3f\xa9\xf6\xee\x8e\x6e\xaf\xda\x49\x4e\x0e\xc8\x4e\xda\x91" "\x49\x03\x76\xa3\x08\x1c\x9c\xb7\xff\x06\x00\x00\xff\xff\xab\x16\xec" "\xf0", 1782); syz_mount_image( /*fs=*/0x20000000, /*dir=*/0x20000100, /*flags=MS_I_VERSION|MS_STRICTATIME|MS_NOEXEC|MS_NODEV*/ 0x180000c, /*opts=*/0x20000300, /*chdir=*/2, /*size=*/0x6f6, /*img=*/0x200004c0); // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {6d 65 6d 6f 72 79 2e 65 76 65 6e 74 73 2e 6c 6f 63 61 6c 00} // (length 0x14) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x20000080, "memory.events.local\000", 20); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000080ul, /*flags=*/0x275a, /*mode=*/0); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x103a42 (4 bytes) // mode: open_mode = 0x32 (2 bytes) // ] // returns fd memcpy((void*)0x20000040, "./file1\000", 8); res = syscall( __NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul, /*flags=O_TRUNC|O_SYNC|O_NONBLOCK|O_CREAT|FASYNC|O_RDWR*/ 0x103a42, /*mode=S_IWOTH|S_IWGRP|S_IRGRP*/ 0x32); if (res != -1) r[0] = res; // ftruncate arguments: [ // fd: fd (resource) // len: intptr = 0x6000000 (8 bytes) // ] syscall(__NR_ftruncate, /*fd=*/r[0], /*len=*/0x6000000ul); return 0; }