// https://syzkaller.appspot.com/bug?id=d8701c8074b85f645cf0751b313a2c865fd84d86 // 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; } uint64_t r[1] = {0xffffffffffffffff}; 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; intptr_t res = 0; 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 30 00} (length 0x8) // } // flags: mount_flags = 0x800000 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {6c 61 73 74 62 6c 6f 63 6b 3d 30 30 30 30 30 30 // 30 30 30 30 30 30 30 30 30 30 30 32 32 36 2c 61 64 69 6e 69 63 62 // 2c 67 69 64 3d 66 6f 72 67 65 74 2c 6e 6f 73 74 72 69 63 74 2c 75 // 6e 68 69 64 65 2c 75 69 64 3d} (length 0x46) // } // union ANYUNION { // ANYRESDEC: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 73 68 6f 72 74 61 64 2c 75 69 64 3d 69 67 6e // 6f 72 65 2c 73 68 6f 72 74 61 64 2c 76 6f 6c 75 6d 65 3d 30 30 30 // 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 36 2c 00 18 29 93 // 59 12 dd b1 9b 61 7d b5 23 a6 bb 7c 0d 78 22 85 ef 95 2b 92 82 ba // 93 ba 5e f9 35 3d ee e8 66 19 9e 1a 1a 16 f9 b8 98 0a a1 13 04 cc // 96 67 f1 26 de 9a 57 5a 9c b3 c2 91 69 cb 6e 8b d4 82 0f 0d 38 82 // 91 4f 9f 4d d2 ac 97 c7 c5 18 16 76 dc 89 c5 fd 4f 9c 45 5f cd bd // 2e ef 48 ad b3 3c dc 1f 9e 9a 7f 3a 2b cb 07 fb 13 cf fd 27 2a a7 // 90 76 e8 03 9f 7a b3 10 e7 6e 74 00 00 00 00 00 00 00 00 00 00 00} // (length 0xc0) // } // union ANYUNION { // ANYRES64: ANYRES64 (resource) // } // } // } // chdir: int8 = 0x4 (1 bytes) // size: len = 0xc24 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xc24) // } // ] // returns fd_dir memcpy((void*)0x200000000c40, "udf\000", 4); memcpy((void*)0x200000000c80, "./file0\000", 8); memcpy( (void*)0x2000000000c0, "lastblock=00000000000000000226,adinicb,gid=forget,nostrict,unhide,uid=", 70); sprintf((char*)0x200000000106, "%020llu", (long long)0); memcpy( (void*)0x20000000011a, "\x2c\x73\x68\x6f\x72\x74\x61\x64\x2c\x75\x69\x64\x3d\x69\x67\x6e\x6f\x72" "\x65\x2c\x73\x68\x6f\x72\x74\x61\x64\x2c\x76\x6f\x6c\x75\x6d\x65\x3d\x30" "\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" "\x36\x2c\x00\x18\x29\x93\x59\x12\xdd\xb1\x9b\x61\x7d\xb5\x23\xa6\xbb\x7c" "\x0d\x78\x22\x85\xef\x95\x2b\x92\x82\xba\x93\xba\x5e\xf9\x35\x3d\xee\xe8" "\x66\x19\x9e\x1a\x1a\x16\xf9\xb8\x98\x0a\xa1\x13\x04\xcc\x96\x67\xf1\x26" "\xde\x9a\x57\x5a\x9c\xb3\xc2\x91\x69\xcb\x6e\x8b\xd4\x82\x0f\x0d\x38\x82" "\x91\x4f\x9f\x4d\xd2\xac\x97\xc7\xc5\x18\x16\x76\xdc\x89\xc5\xfd\x4f\x9c" "\x45\x5f\xcd\xbd\x2e\xef\x48\xad\xb3\x3c\xdc\x1f\x9e\x9a\x7f\x3a\x2b\xcb" "\x07\xfb\x13\xcf\xfd\x27\x2a\xa7\x90\x76\xe8\x03\x9f\x7a\xb3\x10\xe7\x6e" "\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 192); *(uint64_t*)0x2000000001da = -1; memcpy( (void*)0x200000000d00, "\x78\x9c\xec\xdd\x5f\x68\x5c\xe9\x79\x07\xe0\xf7\x9b\x23\xad\x25\x6f\xd3" "\xcc\x6e\x36\xce\x1f\xe7\x62\x60\x03\xd9\x7a\xb3\x8b\x64\x79\xd7\x2a\xde" "\x80\x1c\x2b\x22\x0b\xc6\x6b\x56\x56\x2e\x16\x0a\x1a\x5b\xb2\x3b\xac\x34" "\x92\x25\xb9\x78\x43\x09\x2e\x24\x94\x90\xb6\xb8\xe4\x22\x97\x35\x6c\x02" "\xbd\xab\xaf\x5a\x08\x0d\xb8\x57\xdb\x12\x02\xa2\x57\xa5\x17\xc5\x6d\x37" "\x66\x7b\x37\x09\xa4\x2d\xbd\x58\x95\x33\xf3\x8d\x34\xd2\xda\x96\xb2\xb6" "\x25\x79\xfd\x3c\xc6\xfe\x9d\x39\xf3\x9e\x99\xef\xcc\xea\xd5\x9c\x33\x7b" "\xce\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\xbe" "\xfe\x8d\x93\x43\xc3\x69\xaf\x47\x01\x00\xec\xa6\x33\x93\x6f\x0e\x8d\x78" "\xff\x07\x80\x27\xca\x39\xfb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x2f\x45\x11\xdf" "\x8d\x14\xef\xfe\xa0\x95\xa6\xdb\xb7\x3b\x06\x4e\x37\x9a\x57\xae\x4e\x8d" "\x4f\xdc\x7d\xb1\xc1\x14\x29\x2a\x51\xb4\xeb\xcb\xbf\x03\xc3\x47\x47\x8e" "\xbd\xf2\xea\xf1\xd1\x6e\xde\x7f\xf9\x87\xed\x0b\xf1\xc6\xe4\xb9\x93\xb5" "\x53\x0b\xf3\x8b\x4b\xb3\xcb\xcb\xb3\x33\xb5\xa9\x66\xe3\xc2\xc2\xcc\xec" "\x8e\x1f\xe1\x41\x97\xdf\xea\x48\xfb\x05\xa8\xcd\xbf\x7d\x65\xe6\xe2\xc5" "\xe5\xda\xd1\x97\x47\x36\xdd\x7d\xb5\x7a\xe7\xc0\xd3\x87\xaa\x27\x46\x0f" "\x8f\xbc\xd5\xad\x9d\x1a\x9f\x98\x98\xec\xa9\xe9\xeb\xff\xd8\xcf\xfe\x11" "\xe9\xe1\x3d\x14\x9f\x20\x4f\x45\x11\xdf\x8c\x14\xef\xbd\xf4\x41\xaa\x47" "\x44\x25\x1e\xbc\x17\xb6\xf9\xdd\xf1\xa8\x0d\x46\x5f\xd9\x7f\xed\x95\x98" "\x1a\x9f\x68\xaf\xc8\x5c\xa3\xde\x5c\x29\xef\x4c\x95\x5c\xd5\x17\x51\xed" "\x59\x68\xac\xdb\x23\xbb\xd0\x8b\x0f\x64\x2c\xe2\x5a\xf9\xdf\xa9\x1c\xf0" "\x91\x72\xf5\x26\x17\xeb\x4b\xf5\xf3\x73\xb3\xb5\xb3\xf5\xa5\x95\xc6\x4a" "\x63\xa1\x99\x2a\x9d\xd1\x96\xeb\x53\x8d\x4a\x8c\xa6\x88\xc5\x88\x68\x15" "\x7b\x3d\x78\xf6\x9b\xfe\x28\xe2\x58\xa4\xb8\xf3\xeb\x56\x3a\x1f\x11\x45" "\xb7\x0f\x5e\x3c\x33\xf9\xe6\xd0\xc8\xf6\x0f\xd0\xb7\x0b\x83\xbc\xc7\xd3" "\x56\x8b\x88\xd5\x78\x0c\x7a\x16\xf6\xa9\x03\x51\xc4\x5f\x46\x8a\x1f\x4e" "\x0f\xc5\x85\xdc\x57\xed\xb6\x79\x3f\xe2\x2b\x65\xbe\x16\x71\xb9\xcc\x5b" "\x29\xae\xe7\xdb\xa9\xfc\x05\x31\x1a\xf1\x2b\xef\x27\xf0\x58\xeb\x8b\x22" "\x7e\x11\x29\x16\x52\x2b\xcd\x74\x7b\xbf\xbd\x5d\x79\xfa\x5b\xb5\xd7\x9b" "\x17\x17\x7a\x6a\xbb\xdb\x95\x8f\xfd\xfe\xc1\x6e\xb2\x6d\xc2\x3e\x36\x10" "\x45\x9c\x6f\x6f\xf1\xb7\xd2\xc7\xff\xb0\x0b\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xd8\x1d\x45\xfc\x34\x52\xdc\x9c\x7f\x21\x2d\x46\xef\x39\xa5" "\x8d\xe6\xa5\xda\xb9\xfa\xf9\xb9\xce\x51\xc1\xdd\x63\xff\x6b\x79\xa9\xb5" "\xb5\xb5\xb5\x6a\xea\x64\x2d\xe7\x50\xce\xb1\x9c\x67\x73\x4e\xe7\x5c\xcc" "\x79\x2d\xe7\xf5\x9c\x37\x72\xde\xcc\x79\x2b\xe7\x6a\xce\xdb\x39\x5b\x39" "\xa3\x92\x9f\x3f\x67\x2d\xe7\x50\xce\xb1\x9c\x67\x73\x4e\xe7\x5c\xcc\x79" "\x2d\xe7\xf5\x9c\x37\x72\xde\xcc\x79\x2b\xe7\x6a\xce\xdb\x39\x5b\x39\xc3" "\x79\x4f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c" "\x64\x83\x51\xc4\x44\xa4\xb8\xf1\xee\x1f\xb5\xaf\x2b\x1d\xed\xeb\xd2\x7f" "\xfa\xc4\xe8\x99\xf1\xe7\x7a\xaf\x19\xff\xb9\x6d\x1e\xa7\xac\x7d\x39\x22" "\x7e\x1a\x3b\xbb\x26\x6f\x7f\xbe\xd6\x78\xaa\x94\x7f\x1e\xfe\x7a\x01\xdb" "\x1b\x88\x22\xbe\x93\xaf\xff\xf7\x27\x7b\x3d\x18\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x5f\xa8\x44\x11\xdf\x8d" "\x14\x3f\xfa\x4d\x2b\x45\x8a\x88\xb1\x88\xe9\xe8\xe4\xed\x62\xaf\x47\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\xa7\x22\xc5\x7f\x7d\x63\xa0\x7d\x7b\x35\x22\xbe\x18" "\x11\x1f\xae\x95\x7f\x22\xfe\x77\x6d\xab\xbd\x1e\x31\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x02\xa5\x22\x2e\x47\x8a\x1f" "\xbf\xd7\x4a\xd5\x88\xb8\x5a\xbd\x73\xe0\xe9\x43\xd5\x13\xa3\x87\x47\xde" "\x2a\xa2\x88\x54\x96\xf4\xd6\xbf\x31\x79\xee\x64\xed\xd4\xc2\xfc\xe2\xd2" "\xec\xf2\xf2\xec\x4c\x6d\xaa\xd9\xb8\xb0\x30\x33\xbb\xd3\xa7\x1b\x38\xdd" "\x68\x5e\xb9\x3a\x35\x3e\xf1\x48\x56\x66\x5b\x83\x8f\x78\xfc\x83\x03\xa7" "\x16\x16\xdf\x59\x6a\x5c\xfa\xc3\x95\xbb\xde\x7f\x70\xe0\xe4\xf9\xe5\x95" "\xa5\xfa\x85\xbb\xdf\x1d\x83\xd1\x17\x31\xd4\x3b\xe7\x48\x7b\xc0\x53\xe3" "\x13\xed\x41\xcf\x35\xea\xcd\xf6\xa2\xa9\x72\x8f\x01\xf6\x45\xd4\x76\xba" "\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x1b" "\x07\x53\x11\xe3\x91\xe2\xf9\x9f\x1d\x4b\xdd\xf3\xc6\xfb\x3a\xe7\xfc\x7f" "\xaa\x73\xab\x58\xaf\xfd\xc9\x1f\x6f\x7c\x17\xc0\xdc\x96\xec\xea\xfd\xfe" "\x80\x9d\x4c\xa7\x9d\x0e\xf4\x48\xfb\xc4\xfb\xda\xd4\xf8\xc4\xc4\x64\xcf" "\xec\xbe\xfe\x8f\x96\x96\x63\x4a\xa9\x88\xcf\x46\x8a\xc3\x7f\xff\xf9\xf6" "\xf9\xf0\x29\x0e\xde\xf5\xdc\xf8\xb2\xee\xcf\x22\xc5\xe8\xff\x1d\xcb\x75" "\xd5\xc3\x65\xdd\xd8\xa6\xaa\x81\x23\x53\xe3\x13\xb5\x33\x0b\xcd\x97\x4e" "\xce\xcd\x2d\x5c\xa8\xaf\xd4\xcf\xcf\xcd\xd6\x26\x17\xeb\x17\x76\xfc\xc5" "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x1f" "\x07\x53\x11\x7f\x1e\x29\x8e\xbd\xbe\x9a\xba\xd7\x9d\xcf\xe7\xff\xf7\x75" "\x6e\xf5\x9c\xff\xff\x5a\x44\xf7\xb2\xf3\x03\x69\x73\xae\x6b\x9f\xdb\xff" "\xbb\xed\x73\xfb\x3b\xd3\x9f\x3e\x31\xfa\xfa\xd1\xe7\xef\x35\xff\x51\x9c" "\xff\x5f\x8e\x29\xa5\x22\x3e\x8c\x14\xcf\xfc\xd5\xe7\xdb\xd7\xd3\xef\x9e" "\xff\x3f\xb4\xa5\xb6\xac\xfb\x71\xa4\xf8\xc5\xf7\xbe\x94\xeb\x2a\x4f\x95" "\x75\xc3\xdd\xd5\xe9\x3c\xe2\xc5\xc6\xdc\xec\x50\x59\xfb\x62\xa4\xf8\xfe" "\xd9\x6e\x6d\xb4\x6b\x5f\xcd\xb5\x9f\xd9\xa8\x1d\x2e\x6b\xff\x21\x52\x3c" "\xfb\x07\x9b\x6b\x8f\xe7\xda\xe7\x36\x6a\x8f\x96\xb5\x77\x22\xc5\xc4\x99" "\xbb\xd7\x7e\x76\xa3\x76\xa4\xac\x1d\x8c\x14\x5f\xfd\xd3\x5a\xb7\xf6\x60" "\x59\xfb\xf5\x5c\x7b\x68\xa3\xf6\xe5\x0b\x0b\x73\x33\x3b\x7d\x79\x79\x32" "\x95\xfd\xff\x6f\x91\xe2\xcb\xc3\xdf\x4c\xdd\x9f\xf9\x7b\xf6\x7f\xcf\xf7" "\x7f\x5c\xdb\x92\xeb\x3e\xd2\xf3\xf7\x9f\x7e\x58\xfd\x5f\xed\x99\x77\x2d" "\xf7\xf5\x5a\xee\xff\xe1\x6d\xfa\xff\x72\xa4\xf8\x8b\xeb\x5f\xca\x75\x9d" "\xde\x3b\x9a\xef\x7f\xa6\xfd\xef\x46\xff\x7f\x3f\x52\xfc\xde\xa7\x36\xd7" "\xbe\x92\x6b\x9f\xdd\xa8\x1d\xde\xe9\x6a\xc1\x5e\x2a\xfb\xff\x9f\x22\xc5" "\xea\xed\x7f\x59\xff\x99\xcf\xfd\x9f\x3b\x6b\xa3\x43\x7b\xfb\xff\x8b\x7d" "\x9b\xb3\xbb\x5d\xb0\x57\xfd\xff\x4c\xcf\xbc\x6a\x1e\xd7\xc8\x6f\xf9\x5a" "\xc0\x93\x66\xf9\x9d\x6f\xbf\x5d\x9f\x9b\x9b\x5d\x32\x61\xc2\x84\x89\xf5" "\x89\xbd\xfe\xcd\x04\x3c\x6a\xe5\xf6\xff\x7f\x47\x8a\xaf\x5d\x2e\x52\x77" "\x3f\x36\x6f\xff\xff\x4e\xe7\xd6\xc6\xfe\xff\xff\x7c\x67\x63\xfb\xff\xc4" "\x96\x5c\xb7\x47\xdb\xff\xcf\xf6\xcc\x3b\x91\xf7\x5a\xfa\xfb\x22\x06\x56" "\xe6\x17\xfb\x3f\x17\x31\xb0\xfc\xce\xb7\x5f\x6a\xcc\xd7\x2f\xcd\x5e\x9a" "\x6d\x8e\x8c\x8c\x1e\xff\xfd\x63\xc3\x47\x8f\x0f\xf7\x3f\xd5\xdd\xb9\xdf" "\x98\xda\xf1\x6b\x07\x8f\xbb\xb2\xff\xdf\x8e\x14\x3f\xf9\x9b\x7f\x5e\xff" "\x1c\x7b\xf3\xfe\xff\xdd\x3f\xff\x3b\xb8\x25\xd7\xed\x51\xff\x7f\xa6\x77" "\x9d\x36\xed\xd7\xec\xf8\xa5\x80\x27\x4e\xd9\xff\x7f\x1d\x29\xfe\xf5\xc6" "\x07\xeb\xff\xbf\xe9\x7e\x9f\xff\x75\x3f\xe7\x7b\xe1\xf9\xcd\x39\xd8\x2d" "\xda\xa3\xfe\x7f\xae\x67\x5e\x2d\xff\x33\xda\x33\xef\x85\x22\xe2\xe4\x4e" "\x9f\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x13\x07\x53\x11\x3f\x8b\x14" "\x7f\xdb\xfa\xc7\xf5\x6b\xde\x6f\x3e\xfe\x27\xbe\xdc\xad\xed\x3d\xfe\xef" "\x5e\xf6\xc3\xf5\xff\x01\x80\xfb\x2b\xdf\xff\x27\x23\xc5\xcf\x0f\x7e\x35" "\x75\xbf\x43\x66\x27\xc7\xff\xcf\x6c\xc9\x75\x7b\x74\xfc\xef\xa1\x9e\x79" "\x33\xbb\x74\x5e\xf3\x8e\x5f\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xf8\x98\x52\x14\x71\x20\x52\xbc\xfb\x83\x56\xba\x5d\x94" "\xb7\x3b\x06\x4e\x37\x9a\x57\xae\x4e\x8d\x4f\xdc\x7d\xb1\xc1\x14\x29\x2a" "\x51\xb4\xeb\xcb\xbf\x03\xc3\x47\x47\x8e\xbd\xf2\xea\xf1\xd1\x6e\xde\x7f" "\xf9\x87\xed\x0b\xf1\xc6\xe4\xb9\x93\xb5\x53\x0b\xf3\x8b\x4b\xb3\xcb\xcb" "\xb3\x33\xb5\xa9\x66\xe3\xc2\xc2\xcc\xec\x8e\x1f\xe1\x41\x97\xdf\xea\x48" "\xfb\x05\xa8\xcd\xbf\x7d\x65\xe6\xe2\xc5\xe5\xda\xd1\x97\x47\x36\xdd\x7d" "\xb5\x7a\xe7\xc0\xd3\x87\xaa\x27\x46\x0f\x8f\xbc\xd5\xad\x9d\x1a\x9f\x98" "\x98\xec\xa9\xe9\xeb\xff\xd8\xcf\xfe\x11\xe9\xe1\x3d\x14\x9f\x20\x4f\x45" "\x11\x3f\x8f\x14\xef\xbd\xf4\x41\xfa\xf7\x22\xa2\x12\x0f\xde\x0b\xdb\xfc" "\xee\x78\xd4\x06\xa3\xaf\xec\xbf\xf6\x4a\x4c\x8d\x4f\xb4\x57\x64\xae\x51" "\x6f\xae\x94\x77\xa6\x4a\xae\xea\x8b\xa8\xf6\x2c\x34\xd6\xed\x91\x5d\xe8" "\xc5\x07\x32\x16\x71\x2d\x22\x2a\xe5\x80\x8f\x94\xab\x37\xb9\x58\x5f\xaa" "\x9f\x9f\x9b\xad\x9d\xad\x2f\xad\x34\x56\x1a\x0b\xcd\x54\xe9\x8c\xb6\x5c" "\x9f\x6a\x54\x62\x34\x45\x2c\x46\x44\xab\xd8\xeb\xc1\xb3\xdf\xf4\x47\x11" "\x7f\x17\x29\xee\xfc\xba\x95\xfe\xa3\x88\x28\xba\x7d\xf0\xe2\x99\xc9\x37" "\x87\x46\xb6\x7f\x80\xbe\x5d\x18\xe4\x3d\x9e\xb6\x5a\x44\xac\xc6\x63\xd0" "\xb3\xb0\x4f\x1d\x88\x22\x9e\x8b\x14\x3f\x9c\x1e\x8a\xff\x2c\x3a\x7d\xd5" "\x6e\x9b\xf7\x23\xbe\x52\xe6\x6b\x11\x97\xcb\xbc\x95\xe2\x7a\xbe\x9d\xca" "\x5f\x10\xa3\x11\xbf\xf2\x7e\x02\x8f\xb5\xbe\x28\xe2\x6c\xa4\x58\x48\xad" "\xf4\x7e\x91\x7b\xbf\xbd\x5d\x79\xfa\x5b\xb5\xd7\x9b\x17\x17\x7a\x6a\xbb" "\xdb\x95\x8f\xfd\xfe\xc1\x6e\xb2\x6d\xc2\x3e\x36\x10\x45\xfc\xb2\xbd\xc5" "\xdf\x4a\xbf\xf4\x7e\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x5c" "\x11\x5f\x8b\x14\x37\xe7\x5f\x48\xed\xf3\x43\xd7\xcf\x29\x6d\x34\x2f\xd5" "\xce\xd5\xcf\xcf\x75\x0e\xeb\xef\x1e\xfb\x5f\xcb\x4b\xad\xad\xad\xad\x55" "\x53\x27\x6b\x39\x87\x72\x8e\xe5\x3c\x9b\x73\x3a\xe7\x62\xce\x6b\x39\xaf" "\xe7\xbc\x91\xf3\x66\xce\x5b\x39\x57\x73\xde\xce\xd9\xca\x19\x95\xfc\xfc" "\x39\x6b\x39\x87\x72\x8e\xe5\x3c\x9b\x73\x3a\xe7\x62\xce\x6b\x39\xaf\xe7" "\xbc\x91\xf3\x66\xce\x5b\x39\x57\x73\xde\xce\xd9\xca\x19\x8e\x93\x06\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x11\xa9\x44\x11\xdf" "\x8b\x14\x3f\xfa\x4d\x2b\xad\x15\x9d\xeb\xcb\x4e\x47\x27\x6f\x3b\xcf\x15" "\x3e\xd1\xfe\x3f\x00\x00\xff\xff\x66\x16\x47\x06", 3108); syz_mount_image(/*fs=*/0x200000000c40, /*dir=*/0x200000000c80, /*flags=MS_I_VERSION*/ 0x800000, /*opts=*/0x2000000000c0, /*chdir=*/4, /*size=*/0xc24, /*img=*/0x200000000d00); // creat arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // mode: open_mode = 0x4 (8 bytes) // ] // returns fd memcpy((void*)0x200000000040, "./bus\000", 6); syscall(__NR_creat, /*file=*/0x200000000040ul, /*mode=S_IROTH*/ 4ul); // 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 = 0x400000f000 (8 bytes) // ] memcpy((void*)0x200000000080, "./file1\000", 8); syscall(__NR_truncate, /*file=*/0x200000000080ul, /*len=*/0x400000f000ul); // mount arguments: [ // src: ptr[in, blockdev_filename] { // union blockdev_filename { // loop: loop_filename { // prefix: buffer: {2f 64 65 76 2f 6c 6f 6f 70} (length 0x9) // id: proc = 0x0 (1 bytes) // z: const = 0x0 (1 bytes) // } // } // } // dst: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // type: nil // flags: mount_flags = 0x1000 (8 bytes) // data: nil // ] memcpy((void*)0x200000000180, "/dev/loop", 9); *(uint8_t*)0x200000000189 = 0x30; *(uint8_t*)0x20000000018a = 0; memcpy((void*)0x200000000140, "./bus\000", 6); syscall(__NR_mount, /*src=*/0x200000000180ul, /*dst=*/0x200000000140ul, /*type=*/0ul, /*flags=MS_BIND*/ 0x1000ul, /*data=*/0ul); // open arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // flags: open_flags = 0x141c7d (8 bytes) // mode: open_mode = 0x62 (8 bytes) // ] // returns fd memcpy((void*)0x200000000000, "./bus\000", 6); res = syscall( __NR_open, /*file=*/0x200000000000ul, /*flags=O_SYNC|O_NONBLOCK|O_NOATIME|O_CREAT|O_APPEND|0x3d*/ 0x141c7dul, /*mode=S_IWOTH|S_IRGRP|S_IXUSR*/ 0x62ul); if (res != -1) r[0] = res; // ioctl$LOOP_SET_BLOCK_SIZE arguments: [ // fd: fd_loop (resource) // cmd: const = 0x4c09 (4 bytes) // arg: intptr = 0x1000 (8 bytes) // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x4c09, /*arg=*/0x1000ul); // truncate arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // len: intptr = 0x404000f000 (8 bytes) // ] memcpy((void*)0x200000000080, "./file1\000", 8); syscall(__NR_truncate, /*file=*/0x200000000080ul, /*len=*/0x404000f000ul); return 0; }