// https://syzkaller.appspot.com/bug?id=dd363e7f1b3b438453a11b28953ffe739a190a4c // 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_pwrite64 #define __NR_pwrite64 68 #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$hfs arguments: [ // fs: ptr[in, buffer] { // buffer: {68 66 73 00} (length 0x4) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x0 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {71 75 69 65 74 2c 63 6f 64 65 70 61 67 65 3d 69 // 73 6f 38 38 35 39 2d 31 35 2c 70 61 72 74 3d 30 78 30 30 30 30 30 // 30 30 00 00 00 00 00 00 00 00 66 2c 00 a2 00 00 00 07 00 00 00 00 // ed e9 de bf 53 0c 3c c4 d0 4b 54 89 19 ac a0 c2 93 7d 4d a1 fc 31 // dc 42 fc 2e 3e} (length 0x57) // } // union ANYUNION { // ANYBLOB: buffer: {23 34 11 29 bf b4 fc c3 88 a8 0c 49 b4 f4 d9 62 // 54 cb 93 56 75 97 76 b0 3b 58 10 50 24 0d 2d 9a 5c f3 44 0e 76 c8 // 86 f1 e5 c8 60 65 6a 36 48 10 12 23 fc 28 8f c5 27 4f 0e 60 9c fe // d0 fc 73 8d 84 eb 54 47 91 dd 1c b9 59 42 1d b9 fb cb 63 4d f8 76 // aa 21 33 fd 62 e2 45 fb 6b 1e ad 07 ca 04 77 2d 78 56 4a f8 f4 20 // 15 e5 be 55 7a b3 bd 60 82 47 68 69 10 05 cb d3 d2 95 40 26 93 d9 // 34 22 65 95 de eb a1 ff 74 8b 7d de 9c 61 77 49 aa 38 09 6e f6 67 // 70 0a 6b 36 68 cb 72 96 b0 24 fb cf 9f 74 e5 0b f0 f8 34 15 9f 51 // 73 7b aa c1 84 f9 4d d1 3a 97 93 b7 69 46 20 8f 29 06 37 d8 de f9 // 4e 5f 56 f1 18 1d a3 ee d5 00 44 0f} (length 0xcc) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {45 00 a9 c2 fb b2 3c 14 93 5e 1d cc 6d 11 c2 4c // a3 ff 81 cc c7 d4 56 f8 65 b1 5c 0d b9 a1 85 67 9f 26 6e 7b 27 61 // a1 e9 ff 25 cf d2 f5 bd 23 52 8b 43 27 ab 23 fd 41 e3 c1 e4 96 e2 // cf 4c b0 d2 36 34 cb 20 4c 27 f5 bb b3 75 10 31 04 b0 1d ca 3f 21 // 2f a6 ac 51 c2 88 7d a2 47 61 46 9a c2 a3 3f be e7 2d 22 37 65 74 // b7 81 53 7d 01 05 8b e2 1d 7c 92 c4 94 84 ac 09 fd a3 57 17 1e fa // 3a 61 c7 f9 fa 31 1e ac 1e 39 3b 07 a4 d9 22 04 54 ee ba c1 4a e3 // a3 19 d0 06 75 51 33 5d b1 44 33 26 26 03 2a 9d 9f 11 d4 55 bc 5f // 40 8b 6f a6 4f 16 f9 24 42 74 ab fb 3c 4e 4b 0f 9d d1 f0 39 ab 08 // 56 84 a7 11 65 91 7b 54 be 56 f9 73 48 df f0 62 20 d2 e6 2c 4d 91 // 58 41 c0 cc da 63 c1 04 8e 10 fb 6c 6c bd f9 96 72 bb 90 bf 3d 1c // 5e 33 3e 43 bb da} (length 0xf2) // } // union ANYUNION { // ANYRES16: ANYRES16 (resource) // } // } // } // chdir: int8 = 0x11 (1 bytes) // size: len = 0x2e1 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x2e1) // } // ] // returns fd_dir memcpy((void*)0x200001c0, "hfs\000", 4); memcpy((void*)0x20000100, "./file0\000", 8); memcpy( (void*)0x20001e40, "\x71\x75\x69\x65\x74\x2c\x63\x6f\x64\x65\x70\x61\x67\x65\x3d\x69\x73\x6f" "\x38\x38\x35\x39\x2d\x31\x35\x2c\x70\x61\x72\x74\x3d\x30\x78\x30\x30\x30" "\x30\x30\x30\x30\x00\x00\x00\x00\x00\x00\x00\x00\x66\x2c\x00\xa2\x00\x00" "\x00\x07\x00\x00\x00\x00\xed\xe9\xde\xbf\x53\x0c\x3c\xc4\xd0\x4b\x54\x89" "\x19\xac\xa0\xc2\x93\x7d\x4d\xa1\xfc\x31\xdc\x42\xfc\x2e\x3e", 87); memcpy((void*)0x20001e97, "\x23\x34\x11\x29\xbf\xb4\xfc\xc3\x88\xa8\x0c\x49\xb4\xf4\xd9\x62\x54" "\xcb\x93\x56\x75\x97\x76\xb0\x3b\x58\x10\x50\x24\x0d\x2d\x9a\x5c\xf3" "\x44\x0e\x76\xc8\x86\xf1\xe5\xc8\x60\x65\x6a\x36\x48\x10\x12\x23\xfc" "\x28\x8f\xc5\x27\x4f\x0e\x60\x9c\xfe\xd0\xfc\x73\x8d\x84\xeb\x54\x47" "\x91\xdd\x1c\xb9\x59\x42\x1d\xb9\xfb\xcb\x63\x4d\xf8\x76\xaa\x21\x33" "\xfd\x62\xe2\x45\xfb\x6b\x1e\xad\x07\xca\x04\x77\x2d\x78\x56\x4a\xf8" "\xf4\x20\x15\xe5\xbe\x55\x7a\xb3\xbd\x60\x82\x47\x68\x69\x10\x05\xcb" "\xd3\xd2\x95\x40\x26\x93\xd9\x34\x22\x65\x95\xde\xeb\xa1\xff\x74\x8b" "\x7d\xde\x9c\x61\x77\x49\xaa\x38\x09\x6e\xf6\x67\x70\x0a\x6b\x36\x68" "\xcb\x72\x96\xb0\x24\xfb\xcf\x9f\x74\xe5\x0b\xf0\xf8\x34\x15\x9f\x51" "\x73\x7b\xaa\xc1\x84\xf9\x4d\xd1\x3a\x97\x93\xb7\x69\x46\x20\x8f\x29" "\x06\x37\xd8\xde\xf9\x4e\x5f\x56\xf1\x18\x1d\xa3\xee\xd5\x00\x44\x0f", 204); *(uint32_t*)0x20001f63 = 0; memcpy( (void*)0x20001f67, "\x45\x00\xa9\xc2\xfb\xb2\x3c\x14\x93\x5e\x1d\xcc\x6d\x11\xc2\x4c\xa3\xff" "\x81\xcc\xc7\xd4\x56\xf8\x65\xb1\x5c\x0d\xb9\xa1\x85\x67\x9f\x26\x6e\x7b" "\x27\x61\xa1\xe9\xff\x25\xcf\xd2\xf5\xbd\x23\x52\x8b\x43\x27\xab\x23\xfd" "\x41\xe3\xc1\xe4\x96\xe2\xcf\x4c\xb0\xd2\x36\x34\xcb\x20\x4c\x27\xf5\xbb" "\xb3\x75\x10\x31\x04\xb0\x1d\xca\x3f\x21\x2f\xa6\xac\x51\xc2\x88\x7d\xa2" "\x47\x61\x46\x9a\xc2\xa3\x3f\xbe\xe7\x2d\x22\x37\x65\x74\xb7\x81\x53\x7d" "\x01\x05\x8b\xe2\x1d\x7c\x92\xc4\x94\x84\xac\x09\xfd\xa3\x57\x17\x1e\xfa" "\x3a\x61\xc7\xf9\xfa\x31\x1e\xac\x1e\x39\x3b\x07\xa4\xd9\x22\x04\x54\xee" "\xba\xc1\x4a\xe3\xa3\x19\xd0\x06\x75\x51\x33\x5d\xb1\x44\x33\x26\x26\x03" "\x2a\x9d\x9f\x11\xd4\x55\xbc\x5f\x40\x8b\x6f\xa6\x4f\x16\xf9\x24\x42\x74" "\xab\xfb\x3c\x4e\x4b\x0f\x9d\xd1\xf0\x39\xab\x08\x56\x84\xa7\x11\x65\x91" "\x7b\x54\xbe\x56\xf9\x73\x48\xdf\xf0\x62\x20\xd2\xe6\x2c\x4d\x91\x58\x41" "\xc0\xcc\xda\x63\xc1\x04\x8e\x10\xfb\x6c\x6c\xbd\xf9\x96\x72\xbb\x90\xbf" "\x3d\x1c\x5e\x33\x3e\x43\xbb\xda", 242); *(uint16_t*)0x20002059 = -1; memcpy( (void*)0x200006c0, "\x78\x9c\xec\xdd\xcb\x6a\x14\x4b\x1c\xc7\xf1\x5f\xf5\x4c\x92\xc9\xc9\x90" "\xd3\xb9\x1c\x0e\x9c\x65\x8e\x01\xdd\x48\x8c\x1b\x71\x33\x41\xe6\x21\xc4" "\x85\xa8\x99\x11\x82\x43\x44\x13\x41\xdd\x18\xc5\x85\x88\xe8\xde\xbd\xaf" "\xe0\x2b\x08\x6e\x14\x5f\x40\x57\xae\x7c\x80\x11\x84\x96\xaa\xae\xb9\xa6" "\xa7\x3b\x19\x26\xdd\x19\xfc\x7e\xc0\xd0\xd3\x5d\xd5\xf5\xaf\xf4\xa5\xea" "\x3f\x60\x4a\x00\xfe\x58\x57\xea\x5f\xdf\x5d\xfc\x6e\xff\x19\xa9\xa4\x92" "\xf4\xf2\xb2\x14\x48\x7a\x21\x95\x25\xfd\xa3\x7f\x2b\x0f\x76\xf7\x77\xf6" "\x5b\xcd\x46\xca\x79\xda\x91\xa3\x8a\x64\x14\xd7\x34\x87\x0a\x6d\xef\x36" "\x93\xea\x56\xe4\x6b\x78\xa1\xfd\x54\x56\xb5\x7f\x1f\x4e\x46\x14\x45\x5b" "\xdf\x24\xed\x15\x1d\x08\x0a\xe5\x9e\xfe\x04\x81\x34\xe7\x9f\x4e\x77\xbc" "\x92\x7b\x64\xe9\x9e\x8e\x59\xef\x60\xc2\x71\x4c\x1b\xd3\x56\x5b\x0f\xb5" "\x58\x74\x1c\x00\x80\x62\xf9\xf1\x3f\xf0\xe3\x7c\xd5\xcf\xdf\x83\x40\x5a" "\xf7\xc3\xfe\xa9\x1c\xff\xc7\xd5\x2e\x3a\x80\x13\x17\xa5\x1e\xed\x1b\xff" "\x5d\x96\x15\x19\x7b\x7d\xff\x76\x87\x7a\xf9\x9e\x4b\xe1\xec\xf1\xa0\x93" "\x25\x1e\xa5\xe5\x99\xa1\xcf\xb3\x8a\xef\xac\x81\x09\xa6\xc9\xca\x2a\x5d" "\x2c\xc1\xfc\xed\x9d\x56\xf3\xfc\xf6\xdd\x56\x23\xd0\x33\xd5\xbc\xbe\x62" "\xab\xee\x67\x23\xbe\x75\x3b\x32\xa2\x5d\x4b\xc8\x4d\x53\x1c\xa1\xef\x26" "\x79\x46\xb9\xe0\xfa\x30\x63\xfb\xb0\x39\x22\xfe\x95\x31\x5b\x1c\x9b\xf9" "\x68\x3e\x9b\xeb\x26\xd4\x5b\x35\xba\xf3\xbf\x72\x64\xec\x65\x72\x57\x2a" "\x1c\xba\x52\x71\xfc\x1b\xa3\xcf\xe8\x7a\x19\xda\x52\xf2\xaf\x8d\x5a\xad" "\x16\x0c\x14\x59\x72\x8d\xfc\xe7\x5b\xf0\x32\x7a\x59\x49\xce\x48\xd4\xb9" "\xa3\x96\x34\xf8\x05\x41\x98\x15\xa7\xab\xb5\x3c\x54\x2b\xee\xdd\x85\x8c" "\x5a\x2b\x71\xad\xad\xf9\x81\x5a\x9b\x9d\x4f\x23\x6a\xad\x0e\xb4\x65\x7b" "\xd3\xbd\x9b\x47\xb7\x77\xd2\xcc\x6b\x73\xd5\xac\xe9\x87\xde\xab\xde\x37" "\xff\x0f\x6c\x7c\xeb\x4a\x7d\x32\x7b\x4f\x8d\x59\x8f\x87\x02\xf7\x1b\x8f" "\xfb\x33\x9b\xdc\x5c\xd9\x9d\x33\x3c\x34\x72\x1c\xe8\x5a\x75\x70\x4f\xf7" "\xb7\x38\x37\x2a\xf4\x9f\xe9\xef\x34\x0c\x79\x92\x72\xec\x95\x6e\xe9\x92" "\x16\xf7\x1e\x3d\xbe\x53\x6a\xb5\x9a\xf7\xed\xc6\xcd\x84\x8d\x7b\xd5\xee" "\x9e\x99\xe7\x52\x62\x99\x02\x36\x02\xf5\xf6\xe8\xa0\x77\x68\x4e\xf1\x17" "\x91\x87\x6a\x75\x06\xa5\x3c\x43\x3d\x37\xd1\x13\xda\xf7\x47\x66\x61\xfb" "\x94\xe5\xd2\xc1\x53\x73\x27\x14\xb1\x51\xff\x74\xdc\x1b\x69\xf6\x58\x4d" "\xd8\x37\x60\xd1\x3d\xcd\xe9\x1d\x85\x42\xf5\x2e\x7a\x66\xd1\x0f\xb9\x04" "\x84\xbc\xb9\x79\x57\x9c\xff\xf5\xe5\x2b\x1b\x6e\xb2\x67\x7f\x84\x29\xf3" "\xf4\xcc\x09\x99\x3f\x63\x64\xe7\xd8\xdd\x0c\xa8\x32\x50\x7f\xd9\x6d\xfd" "\x75\xac\x0c\x6e\x61\x74\x06\x77\xd4\x9c\xeb\xff\xb3\xd2\x99\xee\xae\x5f" "\x51\x46\x8b\xa1\x8f\x73\x3a\x44\x69\x53\x3f\xcb\xd4\xf5\x45\x37\xf8\xfe" "\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\xda\xe4" "\xf1\xdf\x09\x8a\xee\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xd3\xae\xbb\xfe\xaf\x3a\xeb\xff\xca\xaf\xff\x5b\x49" "\x5f\xff\x77\xf8\x2f\x7f\x97\xe2\x15\x5e\x26\xb2\xfe\xef\x9b\x5d\xb9\xf5" "\x7f\x87\x17\x92\x02\x30\x51\xbf\x03\x00\x00\xff\xff\x10\x53\x88\x98", 737); syz_mount_image(/*fs=*/0x200001c0, /*dir=*/0x20000100, /*flags=*/0, /*opts=*/0x20001e40, /*chdir=*/0x11, /*size=*/0x2e1, /*img=*/0x200006c0); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x42 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x20000040, "./file1\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul, /*flags=O_CREAT|O_RDWR*/ 0x42, /*mode=*/0); if (res != -1) r[0] = res; // pwrite64 arguments: [ // fd: fd (resource) // buf: ptr[in, buffer] { // buffer: {32} (length 0x1) // } // count: len = 0x1 (8 bytes) // pos: intptr = 0x8000c61 (8 bytes) // ] memset((void*)0x20000140, 50, 1); syscall(__NR_pwrite64, /*fd=*/r[0], /*buf=*/0x20000140ul, /*count=*/1ul, /*pos=*/0x8000c61ul); return 0; }