// https://syzkaller.appspot.com/bug?id=21ef538681b8b738fa9cac48142096df938b61f7 // 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"); } 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; } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*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=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$udf arguments: [ // fs: ptr[in, buffer] { // buffer: {75 64 66 00} (length 0x4) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: mount_flags = 0x4000 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // } // } // chdir: int8 = 0x2 (1 bytes) // size: len = 0xc39 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xc39) // } // ] // returns fd_dir memcpy((void*)0x200000000080, "udf\000", 4); memcpy((void*)0x200000000000, "./file1\000", 8); memcpy( (void*)0x200000001040, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x7d\x07\xf0\xdf\x1b\xed\x8a\x2b\xb9\xad" "\x98\xd8\x51\x9c\x34\x2e\x36\x6d\x91\xca\x8a\xe5\xea\x5f\x4c\xc5\x2a\xdc" "\x55\x4d\xb3\x0d\x20\xcb\x42\x28\xe6\x16\x80\x2b\x91\x52\x17\xa6\x48\x82" "\xa4\x1a\xd9\x48\x0b\xa6\x97\x1e\x7a\x08\x50\x14\x3d\xe4\x44\xa0\x35\x0a" "\xa4\x68\x60\x34\x45\xd0\x5b\x99\xd6\x05\x92\x8b\x0f\x45\x4e\x3d\x11\x2d" "\x6c\x04\x45\x0f\x6c\x11\x20\xa7\x80\xc5\xcc\xbe\x15\x97\x34\x69\xd1\x12" "\x29\x51\xd6\xe7\x63\x53\xdf\xdd\xd9\xf7\x66\xde\x9b\xb7\x9e\x91\x05\xbd" "\x79\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\xfc\xde" "\x2b\x17\x4e\x9e\x4a\x0f\xbb\x15\x00\xc0\x83\x74\x69\xf4\xab\x27\x4f\xbb" "\xff\x03\xc0\x63\xe5\x8a\xff\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x80\xfd\x2e\x45\x11\x4f\x46\x8a\xd9\x4b\xab\x69\xbc\x7a\xdf\xd5\xb8" "\xd8\xa9\xdf\xba\x3d\x36\x3c\xb2\x75\xb5\x43\xa9\xaa\x79\xa0\x2a\x5f\xfe" "\x34\x4e\x9d\x3e\x73\xf6\x4b\x2f\x0c\x9d\xeb\xe5\xc5\xce\xf4\x87\xd4\xdf" "\x6d\x9f\x8d\xd7\x46\xaf\x5c\x68\xbe\x3c\x73\x73\x76\x6e\x72\x7e\x7e\x72" "\xa2\x39\x36\xdd\xb9\x36\x33\x31\xb9\xe3\x3d\x6c\x55\xbf\x1e\x3b\xaf\xbf" "\xd9\xf1\xea\x04\x34\x6f\xbe\x7e\x6b\xe2\xfa\xf5\xf9\xe6\xe9\xe7\xcf\x6c" "\xf8\xf8\xf6\xe0\xfb\x03\x4f\x1c\x1d\x3c\x3f\xf4\xec\x89\x67\x7a\x65\xc7" "\x86\x47\x46\x46\xd7\x8b\x34\xfa\xcb\xd7\xee\xb9\x21\x5d\xdb\xcd\xf0\x38" "\x18\x45\x9c\x88\x14\xcf\x7d\xef\xa7\xa9\x1d\x11\x45\x6c\x73\x2e\x3e\xc2" "\xb9\x6c\x3c\xd8\xb1\xdf\xec\x50\xd5\x89\xe3\x55\x27\xc6\x86\x47\xaa\x8e" "\x4c\x75\xda\xd3\x0b\xe5\x87\x97\x7b\x27\xa2\x88\x68\xf6\x55\x6a\xf5\xce" "\xd1\xd6\x63\x11\xb5\xfa\x03\xed\xc3\xf6\x5a\x11\x8b\x65\xf3\xcb\x06\x1f" "\x2f\xbb\x37\x3a\xdb\x9e\x6b\x5f\x9d\x9a\x6c\x5e\x6e\xcf\x2d\x74\x16\x3a" "\x33\xd3\x97\x53\xb7\xb5\x65\x7f\x9a\x51\xc4\xb9\x14\xb1\x14\x11\x2b\x03" "\xe5\xd6\x7f\xde\xb0\xbb\x7a\x14\x51\x8b\x14\xdf\x39\xb2\x9a\xae\x46\xc4" "\x81\xde\x79\xf8\x62\x35\x31\x78\xfb\x76\x14\x7b\xdc\xcf\xbb\x28\xdb\xd9" "\xac\x47\x2c\x15\x8f\xc0\x98\xed\x63\x03\x51\xc4\xab\x91\xe2\x67\xef\x1c" "\x8b\x6b\xf9\x3a\x53\x5d\x6b\xbe\x10\xf1\x6a\x99\x3f\x88\x78\xab\xcc\x97" "\x22\x52\xf9\xc5\x38\x1b\xf1\xde\xc0\xc3\x6e\x35\xbb\xa5\x16\x45\xfc\x79" "\x39\xfe\xe7\x57\xd3\x44\x75\x3d\xe8\x5d\x57\x2e\x7e\xad\xf9\x95\xe9\xeb" "\x33\x7d\x65\x7b\xd7\x95\x8f\x78\x7f\xf8\xc0\x95\xe2\x21\xdd\x1f\x0e\x6d" "\xca\x07\x63\x9f\x5f\x9b\x1a\x51\x44\xbb\xba\xe2\xaf\xa6\x7b\xff\xcd\x0e" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xed\x50\x14\xf1" "\x99\x48\xf1\xca\xbf\xff\x51\x35\xaf\x38\xaa\x79\xe9\x47\xce\x0f\xfd\xfe" "\xe0\x2f\xf7\xcf\x19\x7f\xfa\x2e\xfb\x29\xcb\x3e\x1f\x11\x8b\xc5\xce\xe6" "\xe4\x1e\xcc\x13\x03\x2f\xa7\xcb\x29\x3d\xe4\xb9\xc4\x8f\xb3\x46\x14\xf1" "\xc7\x79\xfe\xdf\xb7\x1e\x76\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x1e\x6b\x45\xfc\x24\x52\xbc\xf8\xee\xb1\xb4\x14\xfd" "\x6b\x8a\x77\xa6\x6f\x34\xaf\xb4\xaf\x4e\x75\x57\x85\xed\xad\xfd\xdb\x5b" "\x33\x7d\x6d\x6d\x6d\xad\x99\xba\xd9\xca\x39\x9e\x73\x31\xe7\x52\xce\xe5" "\x9c\x2b\x39\xa3\xc8\xf5\x73\xb6\x72\x8e\xe7\x5c\xcc\xb9\x94\x73\x39\xe7" "\x4a\xce\x38\x90\xeb\xe7\x6c\xe5\x1c\xcf\xb9\x98\x73\x29\xe7\x72\xce\x95" "\x9c\x51\xcb\xf5\x73\xb6\x72\x8e\xe7\x5c\xcc\xb9\x94\x73\x39\xe7\x4a\xce" "\xd8\x27\x6b\xf7\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\x7c\x9c\x14" "\x51\xc4\x2f\x22\xc5\xb7\xbf\xb1\x9a\x22\x45\x44\x2b\x62\x3c\xba\xb9\x3c" "\xf0\xb0\x5b\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x94\x06\x52\x11\xdf\x8f\x14\xcd\x3f\x68\xdd\xd9\x56" "\x8b\x88\x54\xfd\xdb\x75\xac\xfc\xe5\x6c\xb4\x0e\x96\xf9\xc9\x68\x0d\x95" "\xf9\x52\xb4\x2e\xe4\x6c\x57\x59\x6b\x7d\xeb\x21\xb4\x9f\xfb\x53\x4f\x45" "\xfc\x38\x52\x0c\x34\xde\xbe\x33\xe0\x79\xfc\xeb\xdd\x77\x77\xbe\x06\xf1" "\xd6\x37\xd7\xdf\x7d\xb6\xd6\xcd\x03\xbd\x0f\x07\xdf\x1f\x78\xe2\xe8\x91" "\xf3\x43\x23\xbf\xf6\xf4\x76\xaf\xd3\x56\x0d\x38\x7e\xb1\x33\x7d\xeb\x76" "\x73\x6c\x78\x64\x64\xb4\x6f\x73\x2d\x1f\xfd\x93\x7d\xdb\x06\xf3\x71\x8b" "\xdd\xe9\x3a\x11\x31\xff\xc6\x9b\xaf\xb7\xa7\xa6\x26\xe7\xee\xfd\x45\xf9" "\x15\xb8\x8f\xea\x8f\xd0\x8b\x54\x7b\x5c\x7a\xea\x45\xf5\x22\x6a\xfb\xa2" "\x19\x0f\xa7\xef\x3c\x06\xca\xfb\xff\x7b\x91\xe2\xb7\xdf\xfd\x8f\xde\x0d" "\xbf\x7b\xff\x6f\xc4\x2f\x75\xdf\xdd\xb9\xc3\xc7\xcf\xff\x64\xfd\xfe\xff" "\xe2\xe6\x1d\xed\xf0\xfe\x5f\xdb\x5c\x2f\xdf\xff\xcb\x7b\xfa\x56\xf7\xff" "\x27\xfb\xb6\xbd\x98\x7f\x37\x52\xaf\x45\x34\x16\x6e\xce\xd6\x8f\x46\x34" "\xe6\xdf\x78\xf3\x44\xe7\x66\xfb\xc6\xe4\x8d\xc9\xe9\xb3\x27\x4f\x7e\x79" "\x68\xe8\xcb\x67\x4e\xd6\x0f\x46\x34\xae\x77\xa6\x26\xfb\x5e\xed\xca\xe9" "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x70\x52\x11\xbf" "\x1b\x29\xda\x3f\x5e\x4d\xcd\x88\xb8\x5d\xcd\xd7\x1a\x3c\x3f\xf4\xec\x89" "\x67\x0e\xc4\x81\x6a\xbe\xd5\x86\x79\xdb\xaf\x8d\x5e\xb9\xd0\x7c\x79\xe6" "\xe6\xec\xdc\xe4\xfc\xfc\xe4\x44\x73\x6c\xba\x73\x6d\x66\x62\x72\xa7\x87" "\x6b\x54\xd3\xbd\xc6\x86\x47\xf6\xa4\x33\x77\x75\x68\x8f\xdb\x7f\xa8\xf1" "\xf2\xcc\xec\x1b\x73\x9d\x1b\x7f\xb8\xb0\xe5\xe7\x87\x1b\x17\xae\xce\x2f" "\xcc\xb5\xaf\x6d\xfd\x71\x1c\x8a\x22\xa2\xd5\xbf\xe5\x78\xd5\xe0\xb1\xe1" "\x91\xaa\xd1\x53\x9d\xf6\x74\x55\xf5\xf2\x96\x93\xe9\x3f\xba\x7a\x2a\xe2" "\x3f\x23\xc5\xb5\xb3\xcd\xf4\xf9\xbc\x2d\xcf\xff\xdf\x3c\xc3\x7f\xc3\xfc" "\xff\xc5\xcd\x3b\xda\xa3\xf9\xff\x9f\xe8\xdb\x56\x1e\x33\xa5\x22\x7e\x1e" "\x29\x7e\xeb\x2f\x9e\x8e\xcf\x57\xed\x3c\x1c\x1f\x38\x67\xb9\xdc\xdf\x44" "\x8a\xe3\xe7\x3e\x97\xcb\xc5\xc1\xb2\x5c\xaf\x0d\xdd\xe7\x0a\x74\x67\x06" "\x96\x65\xff\x37\x52\xfc\xc3\x2f\x36\x96\xed\xcd\x87\x7c\x72\xbd\xec\xa9" "\x1d\x9f\xd8\x47\x44\x39\xfe\x47\x22\xc5\xf7\xff\xec\xbb\xf1\xeb\x79\xdb" "\xc6\xe7\x3f\x6c\x3d\xfe\x87\x37\xef\x68\x8f\xc6\xff\xa9\xbe\x6d\x87\x37" "\x3c\xaf\xe0\xbe\xbb\x4e\x1e\xff\x13\x91\xe2\xa5\x27\xdf\x8e\xdf\xc8\xdb" "\x3e\xec\xf9\x1f\xbd\x67\x6f\x1c\xcb\x85\xef\x3c\x9f\x63\x8f\xc6\xff\x53" "\x7d\xdb\x06\xf3\x71\x7f\x73\x77\xba\x0e\x00\x00\x00\x00\x00\x00\x00\x00" "\xf0\x48\xab\xa7\x22\xfe\x36\x52\xfc\x70\xa4\x96\x5e\xc8\xdb\x76\xf2\xf7" "\xff\x26\x36\xef\x68\x8f\xfe\xfe\xd7\xa7\xfb\xb6\x4d\xec\xce\x7a\x45\x77" "\x7d\x71\xdf\x27\x15\x00\x00\x00\x00\xf6\x89\x7a\x2a\xe2\x27\x91\xe2\xc6" "\xc2\xdb\x77\xe6\x50\x6f\x9c\xff\xdd\x37\xff\xf3\x77\xd6\xe7\x7f\x0e\xa7" "\x4d\x9f\x56\x7f\xce\xf7\x2b\xd5\x73\x03\x76\xf3\xcf\xff\xfa\x0d\xe6\xe3" "\x8e\xdf\x7f\xb7\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x60\x5f\x49\xa9\x88\x17\xf2\x7a\xea\xe3\xd5\x7c\xfe\x89\x6d\xd7\x53" "\x5f\x8e\x14\xaf\xfc\xf7\x73\xb9\x5c\x3a\x5a\x96\xeb\xad\x03\x3f\x58\xfd" "\xda\xb8\x34\x33\x7d\xe2\xc2\xd4\xd4\xcc\xb5\xf6\x42\xfb\xea\xd4\x64\x73" "\x74\xb6\x7d\x6d\xb2\xac\xfb\x54\xa4\x58\xfd\xeb\xcf\xe5\xba\x45\xb5\xbe" "\x7a\x6f\xbd\xf9\xee\x1a\xef\xeb\x6b\xb1\xcf\x45\x8a\x91\xbf\xeb\x95\xed" "\xae\xc5\xde\x5b\x9b\xfc\xa9\xf5\xb2\xa7\xca\xb2\x9f\x88\x14\xff\xf5\xf7" "\x1b\xcb\xf6\xd6\xb1\xfe\xd4\x7a\xd9\xd3\x65\xd9\xbf\x8a\x14\x5f\xff\xa7" "\xad\xcb\x1e\x5d\x2f\x7b\xa6\x2c\xfb\xdd\x48\xf1\xa3\xaf\x37\x7b\x65\x0f" "\x97\x65\x7b\xcf\x47\xfd\xf4\x7a\xd9\xe7\xaf\xcd\x14\x7b\x30\x2a\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x6e\xea\xa9\x88" "\x3f\x8d\x14\xff\x73\x73\xe9\xce\x5c\xfe\xbc\xfe\x7f\xbd\xef\x6d\xe5\xad" "\x6f\xf6\xad\xf7\xbf\xc9\xed\x6a\x9d\xff\xc1\x6a\xfd\xff\xed\x5e\xdf\xcb" "\xfa\xff\xd5\x73\x05\x16\xb7\x3b\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x3c\xa5\x28\xe2\xcd\x48\x31\x7b\x69" "\x35\x2d\x0f\x94\xef\xbb\x1a\x17\x3b\xd3\xb7\x6e\x8f\x0d\x8f\x6c\x5d\xed" "\x50\xaa\x6a\x1e\xa8\xca\x97\x3f\x8d\x53\xa7\xcf\x9c\xfd\xd2\x0b\x43\xe7" "\x7a\xf9\xe1\xf5\x77\xdb\x67\xe2\xb5\xd1\x2b\x17\x9a\x2f\xcf\xdc\x9c\x9d" "\x9b\x9c\x9f\x9f\x9c\x68\x8e\x4d\x77\xae\xcd\x4c\x4c\xee\x78\x0f\xf7\x5b" "\x7f\xb3\xe3\xd5\x09\x68\xde\x7c\xfd\xd6\xc4\xf5\xeb\xf3\xcd\xd3\xcf\x9f" "\xd9\xf0\xf1\xed\xc1\xf7\x07\x9e\x38\x3a\x78\x7e\xe8\xd9\x13\xcf\xf4\xca" "\x8e\x0d\x8f\x8c\x8c\xf6\x95\xa9\xd5\xef\xf9\xe8\x1f\x90\xb6\xd9\x7e\x30" "\x8a\xf8\xcb\x48\xf1\xdc\xf7\x7e\x9a\x7e\x38\x10\x51\xc4\xfd\x9f\x8b\xbb" "\x7c\x77\xf6\xda\xa1\xaa\x13\xc7\xab\x4e\x8c\x0d\x8f\x54\x1d\x99\xea\xb4" "\xa7\x17\xca\x0f\x2f\xf7\x4e\x44\x11\xd1\xec\xab\xd4\xea\x9d\xa3\x07\x30" "\x16\xf7\xa5\x15\xb1\x58\x36\xbf\x6c\xf0\xf1\xb2\x7b\xa3\xb3\xed\xb9\xf6" "\xd5\xa9\xc9\xe6\xe5\xf6\xdc\x42\x67\xa1\x33\x33\x7d\x39\x75\x5b\x5b\xf6" "\xa7\x19\x45\x9c\x4b\x11\x4b\x11\xb1\x32\xf0\xc1\xdd\xd5\xa3\x88\xd7\x23" "\xc5\x77\x8e\xac\xa6\x7f\x19\x88\x38\xd0\x3b\x0f\x5f\xbc\x34\xfa\xd5\x93" "\xa7\xb7\x6f\x47\xb1\x87\x7d\xdc\x81\xb2\x9d\xcd\x7a\xc4\x52\xf1\x08\x8c" "\xd9\x3e\x36\x10\x45\xfc\x63\xa4\xf8\xd9\x3b\xc7\xe2\x5f\x07\x22\x6a\xd1" "\xfd\x89\x2f\x44\xbc\x5a\xe6\x0f\x22\xde\x8a\xee\x78\xa7\xf2\x8b\x71\x36" "\xe2\xbd\x2d\xbe\x47\x3c\x9a\x6a\x51\xc4\xff\x95\xe3\x7f\x7e\x35\xbd\x33" "\x50\x5e\x0f\x7a\xd7\x95\x8b\x5f\x6b\x7e\x65\xfa\xfa\x4c\x5f\xd9\xde\x75" "\xe5\x91\xbf\x3f\x3c\x48\xfb\xfc\xda\xd4\x88\x22\x7e\x54\x5d\xf1\x57\xd3" "\xbf\xf9\xef\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x1f" "\x29\xe2\x57\x23\xc5\x8b\xef\x1e\x4b\xd5\xfc\xe0\x3b\x73\x8a\x3b\xd3\x37" "\x9a\x57\xda\x57\xa7\xba\xd3\xfa\x7a\x73\xff\x7a\x73\xa6\xd7\xd6\xd6\xd6" "\x9a\xa9\x9b\xad\x9c\xe3\x39\x17\x73\x2e\xe5\x5c\xce\xb9\x92\x33\x8a\x5c" "\x3f\x67\xab\xcc\xc6\xda\xda\x78\x7e\xbf\x98\x73\x29\xe7\x72\xce\x95\x9c" "\x71\x20\xd7\xcf\xd9\xca\x39\x9e\x73\x31\xe7\x52\xce\xe5\x9c\x2b\x39\xa3" "\x96\xeb\xe7\x6c\xe5\x1c\xcf\xb9\x98\x73\x29\xe7\x72\xce\x95\x9c\xb1\x4f" "\xe6\xee\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f" "\x2f\x45\xf5\x4f\x8a\x6f\x7f\x63\x35\xad\x0d\x74\xd7\x97\x1e\x8f\x6e\x2e" "\x5b\x0f\xf4\x63\xef\xff\x03\x00\x00\xff\xff\x48\x02\xf8\x9c", 3129); syz_mount_image(/*fs=*/0x200000000080, /*dir=*/0x200000000000, /*flags=MS_REC*/ 0x4000, /*opts=*/0x200000000e00, /*chdir=*/2, /*size=*/0xc39, /*img=*/0x200000001040); // setrlimit arguments: [ // res: rlimit_type = 0x1 (8 bytes) // rlim: ptr[in, rlimit] { // rlimit { // soft: intptr = 0xffffffffffffffff (8 bytes) // hard: intptr = 0xffffffffffffffff (8 bytes) // } // } // ] *(uint64_t*)0x200000000140 = -1; *(uint64_t*)0x200000000148 = -1; syscall(__NR_setrlimit, /*res=RLIMIT_FSIZE*/ 1ul, /*rlim=*/0x200000000140ul); // truncate arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // len: intptr = 0x2400000f000 (8 bytes) // ] memcpy((void*)0x200000000c00, "./file1\000", 8); syscall(__NR_truncate, /*file=*/0x200000000c00ul, /*len=*/0x2400000f000ul); return 0; }