// https://syzkaller.appspot.com/bug?id=60df08321969b6b89c4cf2ed98291e94dd456404 // 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 #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 thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; for (;;) { uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts); if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) return 1; now = current_time_ms(); if (now - start > timeout) return 0; } } 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; } 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"); } static void setup_sysctl() { int cad_pid = fork(); if (cad_pid < 0) exit(1); if (cad_pid == 0) { for (;;) sleep(100); } char tmppid[32]; snprintf(tmppid, sizeof(tmppid), "%d", cad_pid); struct { const char* name; const char* data; } files[] = { {"/sys/kernel/debug/x86/nmi_longest_ns", "10000000000"}, {"/proc/sys/kernel/hung_task_check_interval_secs", "20"}, {"/proc/sys/net/core/bpf_jit_kallsyms", "1"}, {"/proc/sys/net/core/bpf_jit_harden", "0"}, {"/proc/sys/kernel/kptr_restrict", "0"}, {"/proc/sys/kernel/softlockup_all_cpu_backtrace", "1"}, {"/proc/sys/fs/mount-max", "100"}, {"/proc/sys/vm/oom_dump_tasks", "0"}, {"/proc/sys/debug/exception-trace", "0"}, {"/proc/sys/kernel/printk", "7 4 1 3"}, {"/proc/sys/kernel/keys/gc_delay", "1"}, {"/proc/sys/vm/oom_kill_allocating_task", "1"}, {"/proc/sys/kernel/ctrl-alt-del", "0"}, {"/proc/sys/kernel/cad_pid", tmppid}, }; for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) { if (!write_file(files[i].name, files[i].data)) { } } kill(cad_pid, SIGKILL); while (waitpid(cad_pid, NULL, 0) != cad_pid) ; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 6; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 0) break; event_timedwait(&th->done, 50 + (call == 0 ? 4000 : 0) + (call == 5 ? 4000 : 0)); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { 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; } } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 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 = 0x50 (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 { // quota: buffer: {71 75 6f 74 61} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // bsddf: buffer: {62 73 64 64 66} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // nobh: buffer: {6e 6f 62 68} (length 0x4) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // grpjquota: buffer: {67 72 70 6a 71 75 6f 74 61 3d} (length // 0xa) // } // 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) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0x3eb (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x3eb) // } // ] // returns fd_dir memcpy((void*)0x200000000400, "ext4\000", 5); memcpy((void*)0x200000000440, "./file1\000", 8); memcpy((void*)0x200000000280, "quota", 5); *(uint8_t*)0x200000000285 = 0x2c; memcpy((void*)0x200000000286, "bsddf", 5); *(uint8_t*)0x20000000028b = 0x2c; memcpy((void*)0x20000000028c, "nobh", 4); *(uint8_t*)0x200000000290 = 0x2c; memcpy((void*)0x200000000291, "grpjquota=", 10); *(uint8_t*)0x20000000029b = 0x2c; memcpy((void*)0x20000000029c, "dioread_nolock", 14); *(uint8_t*)0x2000000002aa = 0x2c; *(uint8_t*)0x2000000002ab = 0; memcpy( (void*)0x200000000880, "\x78\x9c\xec\xdc\xcd\x6e\x1b\x45\x1c\x00\xf0\xff\x6e\xbe\x48\xfa\xe1" "\x20\x71\x40\x85\x43\x04\x08\x82\x80\xa4\x0e\x04\x28\x42\xa2\x70\xe5" "\xe3\x02\x3c\x80\x95\xa4\xa5\xc2\x6d\xaa\xc6\x48\xb4\xe4\x50\x10\x27" "\x4e\x1c\x10\x37\x0e\x7d\x01\x0e\x3c\x40\x55\x21\x24\x24\x5e\x81\x17" "\x40\x95\x2a\x94\xe6\x00\xb7\xa0\xb5\x77\x1d\x37\xb6\x43\x2c\x3b\x75" "\xea\xfc\x7e\xd2\xc8\x33\xeb\x71\x66\xfe\xde\xcd\x6a\x66\xbd\x3b\x01" "\x1c\x5b\x73\x11\x71\x3e\x22\xc6\x22\x62\x29\x22\x4a\xf9\xf6\x34\x4f" "\x71\xb3\x91\xb2\x7a\xf7\xb7\x36\x57\xb6\xb7\x36\x57\x92\xd8\xd9\xf9" "\xf8\xef\x24\x92\x7c\x5b\xf1\xb7\x92\xfc\xf5\x44\x5e\x98\x4f\x23\xd2" "\x6f\x23\x9e\xba\xd9\xde\xee\xc6\xf5\x1b\x9f\x57\xaa\xd5\xb5\x6b\x79" "\x79\xb1\x76\xf9\xea\xe2\xc6\xf5\x1b\xaf\x5c\xba\x5c\xb9\xb8\x76\x71" "\xed\x4a\xf9\x8d\x73\xe5\xf2\xf2\xd2\x9b\xe5\xd7\x06\x16\xeb\x8f\xcf" "\xbd\x78\x6e\xec\xbd\xf3\x67\x7e\xfa\xb3\x74\x67\x79\x72\x72\x3a\xeb" "\xef\xc9\xfc\xbd\xd6\x38\x06\x65\x2e\xe6\x9a\xdf\xc9\x5e\xcb\x83\x6e" "\x6c\xc8\x26\x87\xdd\x01\x00\x00\x0e\x24\xcd\xc7\xfe\xe3\xf5\xf1\x7f" "\x29\xc6\xea\xb9\x86\x52\x2c\x6e\x0e\xb5\x73\x00\x00\x00\xc0\x40\xec" "\xbc\x93\xbf\x02\x00\x00\x00\x23\x2c\x31\xf7\x07\x00\x00\x80\x11\x57" "\xdc\x07\x70\x7f\x6b\x73\xa5\x48\x07\xba\x71\xa0\x74\x68\xb7\x24\x3c" "\x54\xf7\xde\x8d\x88\xd9\xdd\x67\x9b\xb7\x9b\xf1\x8f\xc7\x63\x79\x9d" "\x89\x43\x7c\xbe\x75\x2e\x22\xae\x3e\x9f\x94\xb2\x14\x87\xf4\x1c\x32" "\x00\x40\xab\x3b\xd9\xf8\xe7\x6c\xa7\xf1\x5f\x1a\x4f\xb6\xd4\x9b\x8a" "\xa8\x8f\x87\xa6\x07\xdc\xfe\xdc\x9e\x72\xfb\xf8\x27\xbd\x3b\xe0\x26" "\x1f\x90\x8d\xff\xde\x8e\x88\xed\xb6\xf1\x5f\x5a\x54\x99\x1d\xcb\x4b" "\xa7\xea\x43\xc5\x89\xe4\xc2\xa5\xea\xda\xd9\x88\x38\x1d\x11\xf3\x31" "\x31\x95\x95\xcb\xfb\xb4\xf1\xfe\x3f\x3f\x7f\xd4\xed\xbd\x2c\xfe\xdf" "\x92\x53\xa7\x8b\x94\xb5\x9f\xbd\xee\xd6\x48\xef\x8e\x4f\x3d\xf8\x99" "\xd5\x4a\xad\xd2\x4f\xcc\xad\xee\x7d\x1d\x71\x66\xbc\x53\xfc\x49\x73" "\xfc\x9b\x44\xc4\x4c\x1f\x6d\x8c\x7d\x75\xeb\xad\x6e\xef\xfd\x7f\xfc" "\x87\x6b\xe7\x56\xc4\x0b\x1d\xf7\xff\xee\xca\x3d\xc9\xfe\xeb\x13\x2d" "\xd6\x8f\x87\xc5\xe2\xa8\x68\xf7\xef\x37\xbf\x7c\xd8\xad\xfd\x61\xc7" "\x9f\xed\xff\x99\xfd\xe3\x9f\x4d\x5a\xd7\x6b\xda\xe8\xbd\x8d\xdb\x9f" "\xfd\xf1\x74\x3d\xd3\x21\xaa\xd6\xf9\x4f\x2f\xc7\xff\x64\xf2\x49\x3d" "\x5f\xcc\xcb\xbe\xac\xd4\x6a\xd7\xca\x11\x93\xc9\x07\xed\xdb\x97\x76" "\x3f\x5b\x94\x8b\xfa\x59\xfc\xf3\xcf\x76\xfe\xff\x2f\xce\x7f\x49\xbe" "\xa6\xd5\xc9\xfc\x1c\xd0\xab\xef\xbe\xff\xf5\xe5\xfd\x6b\x34\xe2\xcf" "\x52\xd6\x7e\x31\x17\x7c\x18\xb2\xf8\x57\x7b\xda\xff\xbd\x67\x5e\xbf" "\xfd\xfb\xa7\xdd\xda\x6f\xdd\xff\x9d\xe3\xcf\xf6\x7f\x63\x0d\xb0\xf9" "\x7c\xcb\x41\xce\x7f\x07\xed\x60\x3f\xdf\x1d\x00\x00\x00\x3c\x2a\xd2" "\xfa\x75\x8d\x24\x5d\x68\xe6\xd3\x74\x61\xa1\x71\xbd\xe3\x89\x98\x49" "\xab\xeb\x1b\xb5\x97\x2e\xac\x7f\x71\x65\xb5\x71\xfd\x63\x36\x26\xd2" "\xe2\x4a\x57\xa9\xe5\x7a\x68\xb9\xf1\x33\x7a\xb3\xbc\xb4\xa7\xfc\x6a" "\x44\x3c\x1e\x11\x3f\x94\xa6\xeb\xe5\x85\x95\xf5\xea\xea\xb0\x83\x07" "\x00\x00\x80\x63\xe2\x44\x97\xf9\x7f\xe6\xaf\x11\xb9\xc7\x1f\x00\x00" "\x00\xc8\x7f\xa8\x07\x00\x00\x00\x46\x9b\xf9\x3f\x00\x00\x00\x8c\xb4" "\x7e\xd6\xf5\x3b\xbe\x99\xec\x9b\x3b\x02\xdd\x38\xf2\x99\x67\x8e\x46" "\x37\x86\x90\x99\x88\x23\xd1\x8d\x3e\x32\xc3\x3e\x33\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\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x3c\xda\xfe\x0b\x00\x00\xff\xff\x05\xda\xb2\xfc", 1003); syz_mount_image(/*fs=*/0x200000000400, /*dir=*/0x200000000440, /*flags=MS_SYNCHRONOUS|MS_MANDLOCK*/ 0x50, /*opts=*/0x200000000280, /*chdir=*/1, /*size=*/0x3eb, /*img=*/0x200000000880); break; case 1: // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // flags: open_flags = 0x141842 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x200000000440, "./bus\000", 6); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000440ul, /*flags=O_SYNC|O_NONBLOCK|O_NOATIME|O_CREAT|O_RDWR*/ 0x141842, /*mode=*/0); break; case 2: // 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*)0x200000000380, "/dev/loop", 9); *(uint8_t*)0x200000000389 = 0x30; *(uint8_t*)0x20000000038a = 0; memcpy((void*)0x200000000140, "./bus\000", 6); syscall(__NR_mount, /*src=*/0x200000000380ul, /*dst=*/0x200000000140ul, /*type=*/0ul, /*flags=MS_BIND*/ 0x1000ul, /*data=*/0ul); break; case 3: // open arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 62 75 73 00} (length 0x6) // } // flags: open_flags = 0x1c7102 (8 bytes) // mode: open_mode = 0x1 (8 bytes) // ] // returns fd memcpy((void*)0x200000000240, "./bus\000", 6); res = syscall(__NR_open, /*file=*/0x200000000240ul, /*flags=O_SYNC|O_NOCTTY|O_NOATIME|O_DIRECT|O_CLOEXEC|0x2002*/ 0x1c7102ul, /*mode=S_IXOTH*/ 1ul); if (res != -1) r[0] = res; break; case 4: // mmap arguments: [ // addr: VMA[0x800000] // len: len = 0x800000 (8 bytes) // prot: mmap_prot = 0x2 (8 bytes) // flags: mmap_flags = 0x28011 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x800000ul, /*prot=PROT_WRITE*/ 2ul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[0], /*offset=*/0ul); break; case 5: // 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 = 0x3004017 (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 { // orlov: buffer: {6f 72 6c 6f 76} (length 0x5) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // sysvgroups: buffer: {73 79 73 76 67 72 6f 75 70 73} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x43 (1 bytes) // size: len = 0x4ee (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x4ee) // } // ] // returns fd_dir memcpy((void*)0x2000000000c0, "ext4\000", 5); memcpy((void*)0x200000000080, "./file1\000", 8); memcpy((void*)0x200000000240, "orlov", 5); *(uint8_t*)0x200000000245 = 0x2c; memcpy((void*)0x200000000246, "sysvgroups", 10); *(uint8_t*)0x200000000250 = 0x2c; *(uint8_t*)0x200000000251 = 0; memcpy( (void*)0x2000000002c0, "\x78\x9c\xec\xdd\x41\x6f\x23\x57\x1d\x00\xf0\xff\x4c\xec\xdd\x64\x9b" "\xd6\x29\xe5\xd0\x56\xa2\x54\x6d\x51\xb6\x82\xb5\x93\x86\xb6\x11\x87" "\xb6\x48\x08\x4e\x95\x80\x72\x0f\x21\x71\xa2\x28\x4e\x1c\x25\x4e\xbb" "\x89\x2a\x94\x8a\x0f\x80\x84\x10\x20\x71\xe2\xd4\x0b\x12\x1f\x00\x09" "\xed\x47\x40\x48\x2b\xc1\x1d\xc1\x0a\x84\x60\x17\x0e\x1c\x00\x23\x8f" "\xc7\x21\x9b\xb5\x37\xde\xc5\xf1\x40\xf2\xfb\x49\x93\x79\x6f\xde\xcc" "\xfc\xff\xcf\x92\xc7\x1e\xcf\xcb\x4c\x00\x97\xd6\x8b\x11\xf1\x4e\x44" "\x4c\x44\xc4\xab\x11\x51\xc9\x97\xa7\xf9\xb4\xd4\xa9\x1c\x75\xd7\xbb" "\x77\xf7\xc3\x95\xce\x94\x44\xbb\xfd\xde\x9f\x93\x48\xf2\x65\xbd\x7d" "\x25\xf9\xfc\x89\xee\x26\x31\x19\x11\x5f\xff\x4a\xc4\xb7\x92\x7e\x91" "\x0f\x37\x97\x1b\x8d\xfa\x6e\x5e\xab\xb5\xb6\x76\x6a\x7b\x07\x87\x37" "\x36\xb6\x96\xd7\xeb\xeb\xf5\xed\x85\x85\xf9\x37\x16\xdf\x5c\x7c\x7d" "\x71\x6e\xf8\xce\xa4\x83\x9b\x66\x22\xe2\xad\x2f\xdd\xf9\xc1\x77\x3f" "\xfe\xf2\x5b\xbf\xf8\xdc\x07\xbf\x5d\xfa\xe3\xf5\x6f\x77\xd2\x9a\xce" "\xdb\x4f\xf6\x63\x94\xba\x5d\x2f\x67\xaf\x45\x4f\x29\x22\x76\xcf\x23" "\x58\x41\x4a\x59\x0f\x01\x00\xf8\x7f\xf0\x4c\x44\x7c\x22\x22\x5e\xca" "\xbe\xff\x57\x62\x22\xfb\x36\x77\xa5\xe8\xb4\x00\x00\x00\x80\x11\x6a" "\xbf\x3d\x1d\xff\x48\x22\xda\x43\x7a\x29\x86\x5f\x17\x00\x00\x00\xf8" "\xdf\x90\x66\x63\x60\x93\xb4\x9a\x0f\x9f\x9d\x8e\x34\xad\x56\xbb\x63" "\x78\x3f\x19\xd7\xd2\x46\x73\xaf\xf5\xd9\xb5\xe6\xfe\xf6\x6a\xb7\x7d" "\x26\xca\xe9\xda\x46\xa3\x3e\x97\x8f\x15\x9e\x89\x72\xd2\xa9\xcf\xe7" "\x63\x6c\x7b\xf5\xd7\x4e\xd5\x17\x22\xe2\xe9\x88\xf8\x7e\x65\x2a\xab" "\x57\x57\x9a\x8d\xd5\xa2\x7f\xfc\x00\x00\x00\x80\x4b\xe2\x89\x53\xe7" "\xff\x7f\xab\x74\xcf\xff\x3f\xbe\xff\x1f\x3a\x77\x0a\x4b\x10\x00\x00" "\x00\x18\x8d\x99\xa2\x13\x00\x00\x00\x00\xce\x9d\xf3\x7f\x00\x00\x00" "\xb8\xf8\x9c\xff\x03\x00\x00\xc0\x85\xf6\xd5\x77\xdf\xed\x4c\xed\xde" "\xf3\xaf\x57\xdf\x3f\xd8\xdf\x6c\xbe\x7f\x63\xb5\xbe\xb7\x59\xdd\xda" "\x5f\xa9\xae\x34\x77\x77\xaa\xeb\xcd\xe6\x7a\x76\xcf\xbe\xad\xb3\xf6" "\xd7\x68\x36\x77\x3e\x1f\xdb\xfb\x37\x6b\xad\xfa\x5e\xab\xb6\x77\x70" "\xb8\xb4\xd5\xdc\xdf\x6e\x2d\x6d\xdc\xf7\x08\x6c\x00\x00\x00\x60\x8c" "\x9e\xfe\xf4\xad\xdf\x24\x11\x71\xf4\x85\xa9\x6c\xea\x78\xae\xe8\xa4" "\x80\xb1\x48\x1f\x65\xe5\xdf\x9f\x5f\x1e\xc0\xf8\x4d\x14\x9d\x00\x50" "\x98\x52\xd1\x09\x00\x85\x29\x9f\xd1\x3e\x35\xa6\x3c\x80\xe2\x24\x67" "\xb4\x3f\x35\xa8\xe1\x97\xa3\xcf\x05\x00\x00\x38\x1f\xb3\xcf\x3d\x78" "\xfd\xbf\x52\x74\x52\xc0\x58\x3c\xd2\xf5\x7f\x00\xe0\x42\x70\xfd\x1f" "\x2e\xaf\xb2\x11\x80\x70\xe9\x3d\x75\xc6\x71\x60\xe0\xcd\x3b\x1e\xb8" "\xfe\xff\xf6\x80\x15\xdb\xed\xc7\x48\x0b\x00\x00\x18\xa1\xe9\x6c\x4a" "\xd2\x6a\x7e\x2d\x70\x3a\xd2\xb4\x5a\x8d\x78\x32\x7b\x2c\x40\x39\x59" "\xdb\x68\xd4\xe7\xf2\xf1\xbf\xbf\xae\x94\xaf\x76\xea\xf3\xd9\x96\xc9" "\x99\x63\x86\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x80\xae\x76\x3b\x89\x36\x00\x00\x00\x70\xa1\x45" "\xa4\x7f\x48\xb2\xbb\xf9\x47\xcc\x56\x5e\x99\x3e\xfd\xfb\xc0\x95\xe4" "\xef\x95\x6c\x1e\x11\x1f\xfc\xf8\xbd\x1f\xde\x5c\x6e\xb5\x76\xe7\x3b" "\xcb\xff\x72\xbc\xbc\xf5\xa3\x7c\xf9\x6b\x45\xfc\x82\x01\x00\x00\x00" "\x97\xc4\x9d\xe1\x9f\xc4\xd7\x3b\x4f\xef\x9d\xc7\x03\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0" "\x28\xdd\xbb\xfb\xe1\x4a\x6f\x1a\x67\xdc\x3f\x7d\x31\x22\x66\xfa\xc5" "\x2f\xc5\x64\x36\x9f\x8c\x72\x44\x5c\xfb\x6b\x12\xa5\x13\xdb\x25\x11" "\x31\x31\x82\xf8\x47\x1f\x45\xc4\xb3\xfd\xe2\x27\x9d\xb4\x62\x26\xcf" "\xa2\x5f\xfc\xa9\xb1\xc7\xbf\x7a\xbc\x5d\x3a\x82\xd8\x70\xd9\xdd\xea" "\x1c\x7f\xde\xe9\xf7\xfe\x4b\xe3\xc5\x6c\xde\xff\xfd\x5f\xca\xa7\xff" "\xd6\xe0\xe3\x5f\x7a\x7c\xfc\x9b\x18\x70\xfc\x79\x72\xc8\x18\xcf\xdf" "\xfe\x59\x6d\x60\xfc\x8f\x22\x9e\x2f\xf5\x3f\xfe\xf4\xe2\x27\x59\xb4" "\x07\xe3\xbf\x3c\x64\xfc\x6f\x7e\xe3\xf0\xf0\x44\xf5\xea\xc9\xb6\xf6" "\x4f\x22\x66\xfb\x7e\xfe\x24\xf7\xc5\xaa\xb5\xb6\x76\x6a\x7b\x07\x87" "\x37\x36\xb6\x96\xd7\xeb\xeb\xf5\xed\x85\x85\xf9\x37\x16\xdf\x5c\x7c" "\x7d\x71\xae\xb6\xb6\xd1\xa8\xe7\x7f\xfb\xc6\xff\xde\xa7\x7e\xfe\xaf" "\x87\xf5\xff\xda\x80\xf8\x33\xc7\xfd\xef\xff\xfa\xbf\x32\x64\xff\xff" "\x79\xfb\xe6\xdd\x67\xba\xc5\x72\xbf\xf8\xd7\x5f\xee\xff\xf9\xfb\xec" "\x80\xf8\x69\xfe\xd9\xf7\x99\xbc\xdc\x69\x9f\xed\x95\x8f\xba\xe5\x93" "\x5e\xf8\xe9\xaf\x5e\x78\x58\xff\x57\x07\xf4\x7f\xf2\x8c\xfe\x5f\x1f" "\xb2\xff\xaf\x7e\xed\x3b\xbf\x1b\x72\x55\x00\x60\x0c\xf6\x0e\x0e\x37" "\x97\x1b\x8d\xfa\xae\x82\x42\x01\x85\x2b\x71\x2e\x7b\x2e\x15\xdd\xaf" "\x02\x0b\x9d\xb7\xf5\x08\xf6\x53\xf4\x91\x09\x00\x00\x18\xb5\xff\x7c" "\xe9\x7f\x8c\x8d\x47\x71\x01\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x18\xcb\xfd\xff\x4e\xc7\x3c\x2a\xa6\xab\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xf5\xef\x00\x00\x00\xff\xff" "\xe6\x6b\xce\xbc", 1262); syz_mount_image( /*fs=*/0x2000000000c0, /*dir=*/0x200000000080, /*flags=MS_LAZYTIME|MS_REC|MS_SYNCHRONOUS|MS_STRICTATIME|MS_RDONLY|0x6*/ 0x3004017, /*opts=*/0x200000000240, /*chdir=*/0x43, /*size=*/0x4ee, /*img=*/0x2000000002c0); break; } } 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); setup_sysctl(); const char* reason; (void)reason; loop(); return 0; }