// https://syzkaller.appspot.com/bug?id=411e5e9b60179d6150b0f928c95b1ac64c2e1158 // 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 #include #include #include #include #include #include #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } //% 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; } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW; retry: while (umount2(dir, umount_flags) == 0) { } dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exit(1); } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); while (umount2(filename, umount_flags) == 0) { } struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EPERM) { int fd = open(filename, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exit(1); if (umount2(filename, umount_flags)) exit(1); } } closedir(dp); for (int i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EPERM) { int fd = open(dir, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, umount_flags)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void reset_loop() { char buf[64]; snprintf(buf, sizeof(buf), "/dev/loop%llu", procid); int loopfd = open(buf, O_RDWR); if (loopfd != -1) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); if (symlink("/dev/binderfs", "./binderfs")) { } } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 34 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: mount_flags = 0x8 (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // fs_opt_elem[ext4_options] { // elem: union ext4_options { // inode_readahead_blks: fs_opt["inode_readahead_blks", fmt[hex, // flags[ext4_inode_readahead_blks]]] { // name: buffer: {69 6e 6f 64 65 5f 72 65 61 64 61 68 65 61 64 // 5f 62 6c 6b 73} (length 0x14) eq: const = 0x3d (1 bytes) // val: ext4_inode_readahead_blks = 0x1000 (18 bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // errors_remount: buffer: {65 72 72 6f 72 73 3d 72 65 6d 6f 75 // 6e 74 2d 72 6f} (length 0x11) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x2 (1 bytes) // size: len = 0x53a (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x53a) // } // ] // returns fd_dir memcpy((void*)0x2000000004c0, "ext4\000", 5); memcpy((void*)0x200000000100, "./file1\000", 8); memcpy((void*)0x200000000280, "inode_readahead_blks", 20); *(uint8_t*)0x200000000294 = 0x3d; sprintf((char*)0x200000000295, "0x%016llx", (long long)0x1000); *(uint8_t*)0x2000000002a7 = 0x2c; memcpy((void*)0x2000000002a8, "errors=remount-ro", 17); *(uint8_t*)0x2000000002b9 = 0x2c; *(uint8_t*)0x2000000002ba = 0; memcpy( (void*)0x200000000c80, "\x78\x9c\xec\xdd\xcf\x6f\x23\x57\x1d\x00\xf0\xef\x38\xf1\xe6\x47\xb3\x4d" "\x0a\x3d\x00\x02\xba\x94\xc2\x82\x56\xeb\x24\xde\x36\xaa\x7a\x61\x7b\x01" "\xa1\xaa\x12\xa2\xe2\xc4\x61\x1b\x12\x37\x8a\x62\xaf\xa3\xd8\x2b\x9a\xb0" "\x87\xec\x91\x7b\x25\x56\xe2\x04\xfc\x07\xdc\x38\x20\xf5\xc4\x81\x1b\x37" "\x90\x38\xf4\x52\x0e\x48\x0b\xac\x40\x0d\x12\x07\xa3\x19\x4f\x12\x37\xb1" "\x13\xb7\x49\xed\x24\xfe\x7c\xa4\xc9\xcc\x7b\x33\x3b\xdf\xf7\xe2\x7d\xef" "\x79\x5e\x64\xbf\x00\x46\xd6\x8d\x88\xd8\x8d\x88\x6b\x11\xf1\x76\x44\xcc" "\xe6\xf9\x49\xbe\xc5\xdd\xf6\x96\x5e\xf7\xd1\xd3\x87\x2b\x7b\x4f\x1f\xae" "\x24\xd1\x6a\xbd\xf5\xcf\x24\x3b\x9f\xe6\x45\xc7\xbf\x49\x3d\x93\xdf\x73" "\x32\x22\x7e\xf8\xbd\x88\x9f\x24\xc7\xe3\x36\xb6\x77\x36\x96\xab\xd5\xca" "\x56\x9e\x9e\x6f\xd6\x36\xe7\x1b\xdb\x3b\xb7\xd7\x0b\x79\x4e\x79\x69\x71" "\x69\xe1\xd5\x3b\xaf\x94\xcf\xad\xae\x2f\xd4\x7e\xfb\xe4\xbb\xeb\x6f\xfc" "\xe8\xf7\xbf\xfb\xca\x87\x7f\xda\xfd\xf6\xcf\xd2\x62\xcd\xfc\xfc\x7a\x76" "\xae\xb3\x1e\x87\x8a\x67\x8e\x99\xe4\xf7\x99\xe9\xc8\x1b\x8f\x88\x37\xce" "\x7c\xe7\x8b\x63\x3c\xff\xff\xc3\xe5\x93\xb6\xb6\xcf\x45\xc4\x8b\x59\xfb" "\x9f\x8d\xb1\xec\xd5\x04\x00\xae\xb2\x56\x6b\x36\x5a\xb3\x9d\x69\x00\xe0" "\xaa\x4b\x9f\xff\x67\x22\x29\x94\xf2\xb9\x80\x99\x28\x14\x4a\xa5\xf6\x1c" "\xde\xf3\x31\x5d\xa8\xd6\x1b\xcd\x5b\xb3\xf5\x07\xf7\x57\x23\x9b\xc3\x9a" "\x8b\x62\xe1\x9d\xf5\x6a\x65\x21\x9f\x2b\x9c\x8b\x62\x92\xa6\x17\xb3\xe3" "\xc3\x74\xf9\x63\xe9\xf7\x2a\x77\x22\xe2\xb9\x88\x78\x6f\x62\x2a\x3b\x5f" "\x5a\xa9\x57\x57\x87\xf9\xc6\x07\x00\x46\xd8\x33\x47\xc6\xff\xff\x4c\xb4" "\xc7\xff\x4e\x67\xff\x2b\x18\x00\x70\xe1\x4c\x0e\xbb\x00\x00\xc0\xc0\x75" "\x8c\xff\x73\xc3\x2c\x07\x00\x30\x38\x9e\xff\x01\x60\xf4\x7c\x82\xf1\xdf" "\xa7\x03\x01\xe0\x8a\xf0\xfc\x0f\x00\xa3\xc7\xf8\x0f\x00\xa3\xe7\xd4\xf1" "\xff\xd1\x60\xca\x01\x00\x0c\xc4\x0f\xde\x7c\x33\xdd\x5a\x7b\xed\xef\xbf" "\xde\xff\xa6\xee\xdb\xab\x95\xc6\x46\xa9\xf6\x60\xa5\xb4\x52\xdf\xda\x2c" "\xad\xd5\xeb\x6b\xd5\x4a\x69\xa5\xd5\x3a\xed\x7e\xd5\x7a\x7d\x73\xf1\xe5" "\x83\x64\x63\x7b\xe7\x5e\xad\xfe\xe0\x7e\xf3\xde\x7a\x6d\x79\xad\x72\xaf" "\xe2\xbb\x04\x00\x60\xf8\x9e\x7b\xe1\xfd\xbf\xa4\x83\xfe\xee\x6b\x53\xd9" "\x16\x1d\x6b\x39\x18\xab\xe1\x6a\x2b\x0c\xbb\x00\xc0\xd0\x8c\x0d\xbb\x00" "\xc0\xd0\xf8\x3c\x0f\x8c\xae\x3e\x9e\xf1\x4d\x03\xc0\x15\xd7\x65\x89\xde" "\xb6\x7c\x82\x20\xe9\x75\xc1\x63\x8b\xbf\xc2\x65\x75\xf3\x8b\xe6\xff\x61" "\x54\x9d\x65\xfe\xdf\xdc\x01\x5c\x6e\x9f\x6e\xfe\xff\x3b\xe7\x5e\x0e\x60" "\xf0\x8c\xe1\x30\xba\x5a\xad\xc4\x9a\xff\x00\x30\x62\xcc\xf1\x03\x3d\xff" "\xfe\x9f\xeb\xf9\x15\x21\x8f\xfb\xb8\xf9\xdd\x4f\x5e\x1e\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\xb8\x0c\x66\xb2\x2d\x29\x94\xb2\xb5\xc0\x77\xd3\x9f\x85\x52\x29" "\xe2\x7a\x44\xcc\x45\x31\x79\x67\xbd\x5a\x59\x88\x88\x67\x23\xe2\xcf\x13" "\xc5\x89\x34\xbd\x38\xec\x42\x03\x00\x67\x54\xf8\x7b\x92\xaf\xff\x75\x73" "\xf6\xa5\x99\xa3\x67\xaf\x25\xff\x9d\xc8\xf6\x11\xf1\xd3\x5f\xbe\xf5\x8b" "\x77\x97\x9b\xcd\xad\xc5\x34\xff\x5f\x07\xf9\xcd\xc7\x69\xfe\x54\x73\xab" "\x7c\x6d\x18\x15\x00\x00\x3a\xed\xaf\xbb\xf9\xc1\x61\x56\x36\x7e\x97\xf3" "\x7d\xc7\x83\xfc\x47\x4f\x1f\xae\xec\x6f\x83\x2c\xe2\x93\xd7\x23\x62\x72" "\x2a\x8b\xbf\x97\x6f\xed\x33\xe3\x31\x9e\xed\x27\xa3\x18\x11\xd3\xff\x4e" "\xf2\x74\x5b\xfa\x7e\x65\xec\x1c\xe2\xef\x3e\x8a\x88\x2f\xec\xd7\x7f\x32" "\xde\xed\x88\x30\x93\xcd\x81\xb4\x57\x3e\x3d\x1a\x3f\x8d\x7d\xfd\xdc\xe3" "\x77\xfe\xfe\x8f\xc6\x2f\x7c\xac\xbe\x85\xec\x5c\xba\x2f\x66\xbf\x8b\xcf" "\xc7\x91\xc2\x01\xa7\x7a\xff\xf5\x76\x3f\x99\xb7\xbd\xb4\x89\xe7\xed\xaf" "\x10\x37\xb2\x7d\xf7\xf6\x3f\x99\xf5\x50\x67\x97\xf6\x7f\x69\x73\xdd\x3b" "\xd6\xff\x15\x0e\xfa\xbf\xb1\x63\xf1\x93\xac\xcd\xdf\x38\x48\x9f\x5c\x92" "\x27\x2f\xff\xe1\xfb\xc7\x32\x5b\xb3\xed\x73\x8f\x22\xbe\x34\xde\x2d\x7e" "\x72\x10\x3f\xe9\xde\xff\x16\x5f\xea\xb3\x8e\x1f\x7c\xf9\xab\x2f\xf6\x3a" "\xd7\xfa\x55\xc4\xcd\xae\xf5\xdf\x5f\x91\xba\x96\x75\xb3\xf3\xcd\xda\xe6" "\x7c\x63\x7b\xe7\xf6\x7a\x6d\x79\xad\xb2\x56\xb9\x5f\x2e\x2f\x2d\x2e\x2d" "\xbc\x7a\xe7\x95\xf2\x7c\x36\x47\xdd\xfe\xf9\xc7\x6e\x31\xfe\xf1\xda\xad" "\x67\x7b\xc5\x4f\xeb\x3f\xdd\x23\xfe\xe4\xc9\xf5\x8f\x6f\xf4\x59\xff\x5f" "\xff\xef\xed\x1f\x7f\xed\x84\xf8\xdf\xfa\x7a\xf7\xd7\xff\xf9\x13\xe2\xa7" "\x63\xe2\x37\xfb\x8c\xbf\x3c\x7d\xb7\xe7\xf2\xdd\x69\xfc\xd5\x1e\xf5\x3f" "\xe5\xf5\x8f\x5b\x7d\xc6\xff\xf0\x6f\x3b\xab\x7d\x5e\x0a\x00\x0c\x40\x63" "\x7b\x67\x63\xb9\x5a\xad\x6c\x9d\x72\x90\xbe\xd7\x3c\xed\x1a\x07\xfd\x1f" "\xa4\xcf\xf6\x17\xa0\x18\xd9\x41\xec\x46\x9c\xd7\x0d\xb3\x49\x89\x88\xe8" "\x7a\x4d\xfa\x8e\xfa\x62\x54\xf9\xb3\x3a\x48\x86\x16\xfd\x37\xe7\x7d\xc3" "\x61\xf7\x4c\xc0\x67\xed\xb0\xd1\xf7\xbe\xe6\xaf\x83\x2c\x10\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x70\x4c\x63\x7b\x67\x63\xa2\xfb\xa7\xb5" "\xce\xed\x60\xd8\x75\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\xe0\xea\xfa\x7f\x00\x00\x00" "\xff\xff\x56\xd5\xc6\x50", 1338); syz_mount_image(/*fs=*/0x2000000004c0, /*dir=*/0x200000000100, /*flags=MS_NOEXEC*/ 8, /*opts=*/0x200000000280, /*chdir=*/2, /*size=*/0x53a, /*img=*/0x200000000c80); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x101e42 (4 bytes) // mode: open_mode = 0x33 (2 bytes) // ] // returns fd memcpy((void*)0x200000000040, "./file1\000", 8); res = syscall( __NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000040ul, /*flags=O_TRUNC|O_SYNC|O_NONBLOCK|O_CREAT|O_APPEND|O_RDWR*/ 0x101e42, /*mode=S_IXOTH|S_IWOTH|S_IWGRP|S_IRGRP*/ 0x33); if (res != -1) r[0] = res; // ioctl$FS_IOC_SETFLAGS arguments: [ // fd: fd (resource) // cmd: const = 0x40086602 (4 bytes) // arg: ptr[in, fs_flags] { // fs_flags = 0x0 (4 bytes) // } // ] *(uint32_t*)0x2000000005c0 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40086602, /*arg=*/0x2000000005c0ul); // ioctl$EXT4_IOC_MIGRATE arguments: [ // fd: fd (resource) // cmd: const = 0x6609 (4 bytes) // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x6609, 0); // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 34 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: mount_flags = 0x0 (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // fs_opt_elem[ext4_options] { // elem: union ext4_options { // data_err_ignore: buffer: {64 61 74 61 5f 65 72 72 3d 69 67 6e // 6f 72 65} (length 0xf) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // dioread_nolock: buffer: {64 69 6f 72 65 61 64 5f 6e 6f 6c 6f // 63 6b} (length 0xe) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // debug_want_extra_isize: fs_opt["debug_want_extra_isize", // fmt[hex, int32]] { // name: buffer: {64 65 62 75 67 5f 77 61 6e 74 5f 65 78 74 72 // 61 5f 69 73 69 7a 65} (length 0x16) eq: const = 0x3d (1 // bytes) val: int32 = 0x5a (18 bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // prjquota: buffer: {70 72 6a 71 75 6f 74 61} (length 0x8) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // max_dir_size_kb: fs_opt["max_dir_size_kb", fmt[hex, int32]] { // name: buffer: {6d 61 78 5f 64 69 72 5f 73 69 7a 65 5f 6b 62} // (length 0xf) eq: const = 0x3d (1 bytes) val: int32 = 0x4 (18 // bytes) // } // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // bh: buffer: {62 68} (length 0x2) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // min_batch_time: fs_opt["min_batch_time", fmt[hex, int32]] { // name: buffer: {6d 69 6e 5f 62 61 74 63 68 5f 74 69 6d 65} // (length 0xe) eq: const = 0x3d (1 bytes) val: int32 = 0x3 (18 // bytes) // } // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0x47a (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x47a) // } // ] // returns fd_dir memcpy((void*)0x200000000180, "ext4\000", 5); memcpy((void*)0x200000000000, "./file1\000", 8); memcpy((void*)0x200000000b40, "data_err=ignore", 15); *(uint8_t*)0x200000000b4f = 0x2c; memcpy((void*)0x200000000b50, "dioread_nolock", 14); *(uint8_t*)0x200000000b5e = 0x2c; memcpy((void*)0x200000000b5f, "debug_want_extra_isize", 22); *(uint8_t*)0x200000000b75 = 0x3d; sprintf((char*)0x200000000b76, "0x%016llx", (long long)0x5a); *(uint8_t*)0x200000000b88 = 0x2c; memcpy((void*)0x200000000b89, "prjquota", 8); *(uint8_t*)0x200000000b91 = 0x2c; memcpy((void*)0x200000000b92, "max_dir_size_kb", 15); *(uint8_t*)0x200000000ba1 = 0x3d; sprintf((char*)0x200000000ba2, "0x%016llx", (long long)4); *(uint8_t*)0x200000000bb4 = 0x2c; memcpy((void*)0x200000000bb5, "bh", 2); *(uint8_t*)0x200000000bb7 = 0x2c; memcpy((void*)0x200000000bb8, "min_batch_time", 14); *(uint8_t*)0x200000000bc6 = 0x3d; sprintf((char*)0x200000000bc7, "0x%016llx", (long long)3); *(uint8_t*)0x200000000bd9 = 0x2c; *(uint8_t*)0x200000000bda = 0; memcpy( (void*)0x2000000006c0, "\x78\x9c\xec\xdb\xcb\x8f\x14\xc5\x1f\x00\xf0\x6f\xf7\x3e\x80\x1f\x8f\xe5" "\x87\xf8\x00\x51\x57\x89\xc9\x46\xe3\x2e\xbb\xa0\x72\xf0\xa2\xd1\xc4\x18" "\x8c\x26\x7a\xc0\xe3\x3a\x3b\x90\x0d\x03\x6b\xd8\xd5\x08\x12\x59\x8c\xf1" "\x64\x62\x48\xf4\x4c\x3c\x1a\xfd\x0b\xbc\x19\x13\xa3\x9e\x4c\xb8\x7a\xf2" "\x64\x48\x88\x72\x01\x3c\xad\xe9\x9e\x6e\x98\x1d\x66\x78\xb8\x33\xcc\xb2" "\xf3\xf9\x24\x3d\x53\xd5\x5d\x3d\x55\x35\xd5\x8f\xea\xaa\x99\x00\xfa\xd6" "\x68\xf6\x92\x44\x6c\x8a\x88\xdf\x23\x62\xa4\x1e\x5d\x9e\x60\xb4\xfe\x76" "\xe5\xd2\xa9\xca\xd5\x4b\xa7\x2a\x49\x2c\x2d\xbd\xf5\x57\x92\xa7\xbb\x7c" "\xe9\x54\xa5\x4c\x5a\xee\xb7\xb1\x88\x8c\xa5\x11\xe9\xa7\x49\x91\xc9\x72" "\xf3\x27\x4e\x1e\x99\xae\xd5\xaa\xc7\x8b\xf8\xc4\xc2\xd1\xf7\x26\xe6\x4f" "\x9c\x7c\xe6\x83\xa3\xd3\x87\xab\x87\xab\xc7\xa6\xf6\xef\xdf\xb7\x77\xf2" "\xf9\xe7\xa6\x9e\xed\x48\x3d\xb3\x7a\x5d\xde\xf9\xf1\xdc\xae\x1d\xaf\xbe" "\x73\xf6\xf5\xca\xc1\xb3\xef\xfe\xf2\x5d\x56\xde\x4d\xc5\xf6\xc6\x7a\x74" "\xca\x68\x56\xf1\xbf\x97\x72\xcd\xdb\x9e\xec\x74\x66\x3d\xb6\xb9\x21\x9c" "\x0c\xf6\xb0\x20\xdc\x91\x81\x88\xc8\x9a\x6b\x28\x3f\xff\x47\x62\x20\xae" "\x37\xde\x48\xbc\xf2\x49\x4f\x0b\x07\x74\x55\x76\x6f\x5a\xd7\x7e\xf3\xe2" "\x12\xb0\x86\x25\xd1\xeb\x12\x00\xbd\x51\xde\xe8\xb3\xe7\xdf\x72\xb9\x4b" "\x5d\x8f\x55\xe1\xe2\x8b\xf5\x07\xa0\xac\xde\x57\x8a\xa5\xbe\x65\x30\xd2" "\x22\xcd\x50\xd3\xf3\x6d\x27\x8d\x46\xc4\xc1\xc5\x7f\xce\x65\x4b\x74\x69" "\x1c\x02\x00\xa0\xd1\xe7\x95\xaf\x0e\x0c\x47\xc4\x47\x57\xbf\x7d\x2d\xeb" "\x7b\x8c\x44\x44\x39\x1e\xf4\x40\xfe\xfa\x47\xfe\xba\xa5\x98\x43\xd9\x1a" "\x11\xff\x8f\x88\x6d\x11\x71\x5f\x44\x6c\x8f\x88\xfb\x8b\xb4\x0f\x46\xc4" "\x43\x2b\x2c\xcf\x8d\xfd\x9f\xf4\xc2\x0a\x3f\xf2\xa6\xb2\xfe\xdf\x0b\xc5" "\xdc\xd6\xf2\xfe\x5f\xd9\xfb\x8b\xad\x03\x45\x6c\x73\x5e\xff\xa1\xe4\xd0" "\x6c\xad\xba\x27\xd6\xe5\xdf\xc9\x58\x0c\xad\xcb\xe2\x93\x37\xc9\xe3\x87" "\x97\xcf\x7f\xd1\x6e\x5b\x63\xff\x2f\x5b\xb2\xfc\xcb\xbe\x60\x51\x8e\x0b" "\x83\x4d\x03\x74\x33\xd3\x0b\xd3\x79\xa7\xb4\x03\x2e\x9e\x89\xd8\x39\xd8" "\xaa\xfe\xc9\xb5\x99\x80\x24\x22\x76\x44\xc4\xce\x3b\xfb\xe8\x2d\x65\x60" "\xf6\xa9\x6f\x76\xb5\x4b\xd4\xba\xfe\x97\xcf\xdd\x56\x0e\x1d\x98\x67\x5a" "\xfa\x3a\xab\xde\x62\x56\xff\xc5\x68\xaa\x7f\x29\x69\x9c\x9f\x9c\xbd\x61" "\x7e\x72\x62\x7d\xd4\xaa\x7b\x26\xea\x47\x45\x2b\xbf\xfe\xf6\xd9\x9b\xed" "\xf2\xbf\x75\xfb\x77\xd7\xc5\x6a\xfd\xbd\xa1\xfd\x9b\x93\x6c\x4d\x1a\xe7" "\x6b\xe7\x3b\x9b\xff\x7f\x3c\xfe\xd3\xe1\xe4\xed\x7c\x9e\x79\xb8\x58\xf7" "\xe1\xf4\xc2\xc2\xf1\xc9\x88\xe1\xe4\x40\x1e\x5f\xb6\x7e\xea\xfa\xbe\x65" "\xbc\x4c\x9f\x1d\xff\x63\xbb\x5b\x9f\xff\xdb\x8a\x7d\xb2\xfa\x3f\x1c\x11" "\xd9\x41\xfc\x48\x44\x3c\x1a\x11\x8f\x15\x65\x7f\x3c\x22\x9e\x88\x88\xdd" "\x37\xa9\xe3\xcf\x2f\xdd\xba\xfe\x91\xf6\xa8\xfd\xcf\x44\xcc\xb4\xbc\xfe" "\x5d\x3b\xfe\x9b\xda\xff\xce\x03\x03\x47\x7e\xfa\xbe\x5d\xfe\xb7\xd7\xfe" "\xfb\xf2\xd0\x58\xb1\x26\xbf\xfe\xdd\x42\xab\xe2\x64\x97\x8b\xe6\x02\xae" "\xe4\xbb\x03\x00\x00\x80\x7b\x45\x9a\xff\x06\x3e\x49\xc7\xaf\x85\xd3\x74" "\x7c\xbc\xfe\x1b\xfe\xed\xf1\xbf\xb4\x36\x37\xbf\xf0\xf4\xa1\xb9\xf7\x8f" "\xcd\xc4\xf9\x2d\xf5\xf1\xcf\xb4\x1c\xe9\x1a\x29\xc6\x43\x6b\xb3\xb5\xea" "\x64\xb2\x58\x7c\x62\x7d\x7c\x74\xaa\x18\x2b\x2e\xc7\x4b\xf7\x16\xe3\xc6" "\x5f\x0e\x6c\xc8\xe3\xe3\x95\xb9\xda\x4c\x8f\xeb\x0e\xfd\x6e\x63\x9b\xf3" "\x3f\xf3\xe7\x40\xaf\x4b\x07\x74\xd9\x86\x96\x6b\xa7\x86\xef\x7a\x41\x80" "\x1e\x68\x9e\x47\x4f\x97\x47\x4f\xbf\x11\x2e\x06\xb0\x56\xf9\xbf\x36\xf4" "\xaf\xf2\xfc\x6f\xf3\xbc\xdf\xf8\x3f\x18\x60\x8d\x71\xff\x87\xfe\xd5\xea" "\xfc\x3f\xdd\x14\x37\x17\x00\x6b\x93\xfb\x3f\xf4\x2f\xe7\x3f\xf4\xa9\xf4" "\xc7\x15\xec\xec\xa9\x00\xee\x75\xee\xff\xd0\x97\x56\xf2\xbf\xfe\x2e\x06" "\xd6\xaf\x8e\x62\xf4\x26\xb0\x5a\x1b\x25\x0f\x44\x94\x81\x74\x55\x94\x47" "\xa0\x4b\x81\x5e\x5f\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x3a\xe3\xdf\x00\x00\x00\xff\xff\x8f\x73\xe7\x6a", 1146); syz_mount_image(/*fs=*/0x200000000180, /*dir=*/0x200000000000, /*flags=*/0, /*opts=*/0x200000000b40, /*chdir=*/1, /*size=*/0x47a, /*img=*/0x2000000006c0); } 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; for (procid = 0; procid < 5; procid++) { if (fork() == 0) { use_temporary_dir(); loop(); } } sleep(1000000); return 0; }