// https://syzkaller.appspot.com/bug?id=8213f8695d54a1cea6add76c0909ea2db226d486 // 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 #ifndef __NR_bpf #define __NR_bpf 321 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif #ifndef __NR_pidfd_open #define __NR_pidfd_open 434 #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 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"); } #define KMEMLEAK_FILE "/sys/kernel/debug/kmemleak" static const char* setup_leak() { if (!write_file(KMEMLEAK_FILE, "scan=off")) { if (errno == EBUSY) return "KMEMLEAK disabled: increase CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE" " or unset CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF"; return "failed to write(kmemleak, \"scan=off\")"; } if (!write_file(KMEMLEAK_FILE, "scan")) return "failed to write(kmemleak, \"scan\")"; sleep(5); if (!write_file(KMEMLEAK_FILE, "scan")) return "failed to write(kmemleak, \"scan\")"; if (!write_file(KMEMLEAK_FILE, "clear")) return "failed to write(kmemleak, \"clear\")"; return NULL; } static void check_leaks(void) { int fd = open(KMEMLEAK_FILE, O_RDWR); if (fd == -1) exit(1); uint64_t start = current_time_ms(); if (write(fd, "scan", 4) != 4) exit(1); sleep(1); while (current_time_ms() - start < 4 * 1000) sleep(1); if (write(fd, "scan", 4) != 4) exit(1); static char buf[128 << 10]; ssize_t n = read(fd, buf, sizeof(buf) - 1); if (n < 0) exit(1); int nleaks = 0; if (n != 0) { sleep(1); if (write(fd, "scan", 4) != 4) exit(1); if (lseek(fd, 0, SEEK_SET) < 0) exit(1); n = read(fd, buf, sizeof(buf) - 1); if (n < 0) exit(1); buf[n] = 0; char* pos = buf; char* end = buf + n; while (pos < end) { char* next = strstr(pos + 1, "unreferenced object"); if (!next) next = end; char prev = *next; *next = 0; fprintf(stderr, "BUG: memory leak\n%s\n", pos); *next = prev; pos = next; nleaks++; } } if (write(fd, "clear", 5) != 5) exit(1); close(fd); if (nleaks) exit(1); } #define USLEEP_FORKED_CHILD (3 * 50 * 1000) static long handle_clone_ret(long ret) { if (ret != 0) { return ret; } usleep(USLEEP_FORKED_CHILD); syscall(__NR_exit, 0); while (1) { } } static long syz_clone(volatile long flags, volatile long stack, volatile long stack_len, volatile long ptid, volatile long ctid, volatile long tls) { long sp = (stack + stack_len) & ~15; long ret = (long)syscall(__NR_clone, flags & ~CLONE_VM, sp, ptid, ctid, tls); return handle_clone_ret(ret); } static long syz_pidfd_open(volatile long pid, volatile long flags) { if (pid == 1) { pid = 0; } return syscall(__NR_pidfd_open, pid, flags); } 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; } check_leaks(); } } uint64_t r[5] = {0xffffffffffffffff, 0x0, 0xffffffffffffffff, 0x0, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // mkdir arguments: [ // path: nil // mode: open_mode = 0x0 (8 bytes) // ] syscall(__NR_mkdir, /*path=*/0ul, /*mode=*/0ul); // mkdir arguments: [ // path: nil // mode: open_mode = 0x0 (8 bytes) // ] syscall(__NR_mkdir, /*path=*/0ul, /*mode=*/0ul); // bpf$PROG_LOAD arguments: [ // cmd: const = 0x5 (8 bytes) // arg: nil // size: len = 0x4c (8 bytes) // ] // returns fd_bpf_prog syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0ul, /*size=*/0x4cul); // prlimit64 arguments: [ // pid: pid (resource) // res: rlimit_type = 0xe (8 bytes) // new: nil // old: nil // ] syscall(__NR_prlimit64, /*pid=*/0, /*res=RLIMIT_RTPRIO*/ 0xeul, /*new=*/0ul, /*old=*/0ul); // syz_mount_image$hfsplus arguments: [ // fs: ptr[in, buffer] { // buffer: {68 66 73 70 6c 75 73 00} (length 0x8) // } // dir: ptr[in, buffer] { // buffer: {13 13 77 c5 fc 35 d4 14 54 d5 d4 1d 29 ad 1a 60 29 59 81 46 // e6 be 16 6e 41 ad 0d bd 40 54 03 3c 9f 33 bb da 82 24 a2 f3 d7 72 e7 // 63 6e 48 b3 3c bf 70 83 72 e8 f1 b9 93 3e c5 12 77 43 be 22 06 20 9e // f0 2d f9 cb f2 f6 e8 80 d3 38 2f 00} (length 0x4e) // } // flags: mount_flags = 0x3200004 (8 bytes) // opts: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {63 72 65 61 74 6f 72 3d a8 fa 40 b3 2c 64 65 63 // 6f 6d 70 6f 73 65 2c 63 72 65 61 74 6f 72 3d bd 1c 66 f5 2c 6e 6c // 73 3d 63 70 38 36 39 2c 67 69 64 3d} (length 0x32) // } // union ANYUNION { // ANYRESHEX: ANYRES64 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {2c 66 6f 72 63 65 2c 00 f2 d2 d7 83 dc a3 21 ca // 06 6f 37 90 66 a9 25 98 37 6c 0a 6f b6 eb b1 86 b9 be 7a 1d 0d eb // d4 c2 ce 34 08 de d0 3a 80 e9 83 9d 59 c9 e7 ee 79 8f 53 e0 38 71 // 68 29 5d f8 51 a2 41 c8 ce 5a 70 94 00 2f c5 5c 1a 66 f9 e6 09 ea // 24 09 39 3a eb 7f 89 02 fc fb 60 db 30 dd e5 0a c8 f6 77 ad 02 2a // b2 0f cf 35 64 4f 00 90 f1 86 1c af 53 46 52 a2 39 e6 35 33 b1 a1 // d4 25 1a f7 5b b0 ab 1e 3b ff cf 11 8f 46 4e 5f 29 6a 5e 48 8b c8 // 04 01 9a bd cd 6d ee d7 0d 74 ab 43 9f f1 b9 83 9c 7a 86 66 ae fe // 53 35 65 f6 c6 14 6c fd 6e e4 73 47 c7 dd 23 0d 2b fd dd 5b 17 10 // 26 82 33 67 db 78 21 b2 c9 b9 36 b8 3c d7 7a 93 74 bf ba 82 53 0c // 6b 32 67 13 0c} (length 0xdb) // } // } // } // chdir: int8 = 0x3 (1 bytes) // size: len = 0x6b4 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x6b4) // } // ] // returns fd_dir memcpy((void*)0x2000000000c0, "hfsplus\000", 8); memcpy((void*)0x200000000980, "\023\023w\305\3745\324\024T\325\324\035)\255\032`)" "Y\201F\346\276\026nA\255\r\275@T\003<\2373\273\332\202$" "\242\363\327r\347cnH\263<\277p\203r\350\361\271\223>" "\305\022wC\276\"\006 \236\360-\371\313\362\366\350\200\3238/\000", 78); memcpy((void*)0x200000000a80, "\x63\x72\x65\x61\x74\x6f\x72\x3d\xa8\xfa\x40\xb3\x2c\x64\x65\x63\x6f" "\x6d\x70\x6f\x73\x65\x2c\x63\x72\x65\x61\x74\x6f\x72\x3d\xbd\x1c\x66" "\xf5\x2c\x6e\x6c\x73\x3d\x63\x70\x38\x36\x39\x2c\x67\x69\x64\x3d", 50); sprintf((char*)0x200000000ab2, "0x%016llx", (long long)0); memcpy((void*)0x200000000ac4, "\x2c\x66\x6f\x72\x63\x65\x2c\x00\xf2\xd2\xd7\x83\xdc\xa3\x21\xca\x06" "\x6f\x37\x90\x66\xa9\x25\x98\x37\x6c\x0a\x6f\xb6\xeb\xb1\x86\xb9\xbe" "\x7a\x1d\x0d\xeb\xd4\xc2\xce\x34\x08\xde\xd0\x3a\x80\xe9\x83\x9d\x59" "\xc9\xe7\xee\x79\x8f\x53\xe0\x38\x71\x68\x29\x5d\xf8\x51\xa2\x41\xc8" "\xce\x5a\x70\x94\x00\x2f\xc5\x5c\x1a\x66\xf9\xe6\x09\xea\x24\x09\x39" "\x3a\xeb\x7f\x89\x02\xfc\xfb\x60\xdb\x30\xdd\xe5\x0a\xc8\xf6\x77\xad" "\x02\x2a\xb2\x0f\xcf\x35\x64\x4f\x00\x90\xf1\x86\x1c\xaf\x53\x46\x52" "\xa2\x39\xe6\x35\x33\xb1\xa1\xd4\x25\x1a\xf7\x5b\xb0\xab\x1e\x3b\xff" "\xcf\x11\x8f\x46\x4e\x5f\x29\x6a\x5e\x48\x8b\xc8\x04\x01\x9a\xbd\xcd" "\x6d\xee\xd7\x0d\x74\xab\x43\x9f\xf1\xb9\x83\x9c\x7a\x86\x66\xae\xfe" "\x53\x35\x65\xf6\xc6\x14\x6c\xfd\x6e\xe4\x73\x47\xc7\xdd\x23\x0d\x2b" "\xfd\xdd\x5b\x17\x10\x26\x82\x33\x67\xdb\x78\x21\xb2\xc9\xb9\x36\xb8" "\x3c\xd7\x7a\x93\x74\xbf\xba\x82\x53\x0c\x6b\x32\x67\x13\x0c", 219); memcpy( (void*)0x200000000180, "\x78\x9c\xec\xdd\x4f\x6c\x1c\x57\x1d\x07\xf0\xef\x6c\x9c\x75\x36\x48\xa9" "\xfb\x2f\x0d\x08\xa9\x56\x23\x55\xd0\x88\xc4\xce\xaa\x24\x48\x48\x0d\x08" "\xa1\x1c\x22\x14\xc1\xa5\x57\x2b\x71\x1a\x2b\x9b\xb4\x72\x5c\x94\x56\x88" "\x6c\x80\x82\xc4\x89\x13\xea\x81\x43\x51\x15\x0e\x3d\x21\x84\x90\xca\x09" "\x51\xce\x48\x48\x5c\x38\xe5\x1e\xa9\x37\x0e\x39\x00\x46\x33\x3b\xbb\x5e" "\xdb\x1b\xc7\xdb\xd8\x5e\xb7\xfd\x7c\xa4\xf1\x7b\xb3\x6f\xde\x7b\xbf\xf9" "\x65\xfe\x78\x67\x63\x6d\x80\xcf\xad\xf3\xaf\xe6\x60\x37\x45\xce\x9f\xb8" "\x70\xab\x5c\xbf\x77\xb7\xdd\xb9\x77\xb7\x7d\xbd\x5f\x4f\x32\x9d\xa4\x91" "\x4c\xf5\x8a\x14\xad\xa4\xf8\x28\x39\x97\xde\x92\x2f\x96\x2f\xd6\xc3\x15" "\x0f\x9b\xe7\xe5\xfb\x1f\x16\x53\xef\x7e\xd0\xee\xad\x95\x63\xbd\x7f\xb0" "\xde\xbe\xb1\x55\xbf\x4d\x46\x6e\xd9\x4d\x0e\x0d\x56\x0e\x24\x99\xed\x55" "\xff\xb3\xed\x61\x37\x8d\x57\x2d\xd5\x38\x97\xd6\xc6\x7b\xb8\xe9\xad\x1a" "\x8b\x41\xdc\x65\xc2\x8e\xf7\x13\x07\x93\xb6\xba\x49\x77\xad\xb1\xf1\xc8" "\xee\xdb\x3f\x6f\x81\x7d\xeb\x76\xef\xbe\xb9\xc9\x4c\x72\x38\xbd\xbb\x6b" "\x75\x8b\xab\xaf\x0e\x8f\xbe\x32\x4c\xde\x96\xd7\xa6\xee\xde\xc5\x01\x00" "\x00\x00\xbb\x65\xe4\x7b\xf9\x61\x4f\x3c\xc8\x83\xdc\xca\x91\xbd\x09\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\x3e\x1b\x8a\xde\x77\x06\x16\xf5\xd2" "\xe8\xd7\x67\x53\xf4\xbf\xff\xbf\x39\xf4\x9d\xfa\xcd\x09\x87\xfb\x98\xde" "\xb9\x52\x15\xdf\x7f\x62\xd2\x81\x00\x00\x00\x00\x00\x00\x00\xc0\x63\x79" "\xfe\x41\x1e\xe4\x56\x8e\xf4\xd7\x57\x8b\xea\x33\xff\x17\xaa\x95\x67\xaa" "\x9f\x5f\xc8\x9b\xb9\x99\xc5\x2c\xe7\x64\x6e\x65\x21\x2b\x59\xc9\x72\xe6" "\x93\xcc\x0c\x0d\xd4\xbc\xb5\xb0\xb2\xb2\x3c\xbf\xb9\xe7\xaf\x53\xf6\x5c" "\x5d\x5d\xbd\x5d\xf7\x3c\x3d\xb2\xe7\xe9\xf5\x71\x75\x37\x06\x3a\xea\x7f" "\x1a\x6c\xda\x08\x00\x00\x00\x00\x00\x00\x00\x3e\xb7\x7e\x92\xf3\x6b\x9f" "\xff\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\xc0\x7e\x50\x24\x07\x7a" "\x45\xb5\x3c\xd3\xaf\xcf\xa4\x31\x95\xe4\x50\x92\x66\x31\x3b\xd8\xbc\x39" "\xd1\x60\x77\xc0\x5f\x26\x1d\x00\x00\x00\x00\xec\xbe\x56\x5d\x1e\x29\xfe" "\xd7\xab\xac\x16\xd5\x7b\xfe\xa3\xd5\xfb\xfe\x43\x79\x33\x37\xb2\x92\xa5" "\xac\xa4\x93\xc5\x5c\xae\x9e\x05\xf4\xde\xf5\x37\xfe\xd1\x6d\x77\xee\xdd" "\x6d\x5f\x2f\x97\xcd\x03\x7f\xeb\xe3\xb1\xe2\xa8\x46\x4c\xef\xd9\xc3\xe8" "\x99\xe7\xaa\x2d\x9e\x1d\xf4\x38\x9f\xef\xe6\x07\x39\x91\xd9\x5c\xcc\x72" "\x96\xf2\xc3\x2c\x64\x25\x8b\x99\xcd\x77\xaa\xda\x42\x8a\xcc\xd4\x4f\x2f" "\x66\xee\xdd\x6d\xa5\x1f\xeb\xe6\x78\xcf\xad\x5b\xbb\xb8\x31\xb6\xe7\x87" "\xea\x65\x7c\xc7\xaa\x48\x5a\xb9\x92\xa5\x2a\xb6\x93\xb9\xd4\xec\x87\xde" "\xa8\xb7\x3b\x36\x34\xdb\x9f\x9a\xc9\x86\x19\xef\x94\xd9\x29\x5e\xa9\x6d" "\x33\x47\x97\xeb\xb2\xdc\xa3\x5f\xd5\xe5\x8e\x3b\xf0\x49\x3a\xcd\x54\x7b" "\x7e\x70\x90\x91\xb9\x3a\xf7\x65\x36\x9e\x1c\xce\xfb\xe6\xdc\x8f\x79\x9c" "\x6c\x9c\x69\x3e\x8d\xc1\x33\xa8\x67\xd6\x66\x29\x57\x37\xce\x74\xe7\xe3" "\xe6\xf8\x39\x3f\x5c\x97\x65\xae\x7f\xbe\x5b\x39\xef\x19\xf3\x51\xda\xfa" "\x4c\x74\x7f\x59\xae\xf5\x8f\xbe\xa3\x5b\xe7\x3c\xf9\xea\x3f\xff\x7a\xf1" "\x6a\xe3\xc6\xb5\xab\x57\x6e\x9e\xd8\xc5\x5d\xda\x1b\x1b\x8f\x89\xf6\x50" "\x26\x9e\xdb\x56\x26\x3a\x65\x26\xba\x8f\x91\x89\x43\x8f\x13\xff\xce\x69" "\xd6\xd9\xe8\x9d\xc4\xe3\x5d\x2d\x5f\xa8\xfa\x1e\xc9\x52\xbe\x97\xd7\x73" "\x39\x8b\x39\x93\xb9\xcc\xe7\x6c\xe6\xf2\x8d\x9c\x4e\x3b\xa7\x87\xf2\xfa" "\xec\xd6\x79\xad\xae\x6f\x8d\xf1\xce\xb5\xe3\x5f\xa9\x2b\xe5\x3d\xe9\x17" "\x43\xf7\xa6\x3d\x33\xfd\xb0\x86\x32\xaf\x4f\x0e\xe5\x75\xf8\x4a\x37\x53" "\xb5\x0d\xbf\xb2\x96\xa5\xa7\xb6\x91\xa5\xa2\x99\xd1\x59\xfa\xd7\xc8\x50" "\xa6\xbe\x54\x57\xca\x39\x7e\x3a\x74\xc7\x99\xbc\x8d\x99\x98\x1f\xca\xc4" "\xd3\x5b\x67\xe2\xb7\xff\x5d\x4d\x72\xb3\x73\xe3\xda\xf2\xd5\x85\x37\xb6" "\x39\xdf\x8b\x75\x59\x9e\xb6\xef\xac\xbf\x36\xbf\xbf\x23\x3b\x34\xbe\x7a" "\x77\xcb\xe3\xe5\xa9\xf2\x1f\x2b\xbd\xdb\xc6\xf0\xd1\x51\xb6\x3d\xdd\x6f" "\xdb\x90\xaf\x66\xfd\x89\xcb\x54\x3d\xd8\xba\xb6\x66\xaa\xf3\xb9\xd7\xf6" "\xa8\x33\xb5\x1c\xe9\xe8\x9d\x51\x23\xf5\xda\x9e\x1b\x39\x4b\xbb\x6a\x3b" "\x36\xd4\xb6\xee\xb7\x9c\xbc\x9e\xce\xe0\xb7\x10\x00\xf6\xb1\xc3\x2f\x1d" "\x6e\xb6\xee\xb7\xfe\xde\x7a\xaf\xf5\xb3\xd6\xd5\xd6\x85\x43\xdf\x9e\x3e" "\x3b\xfd\xe5\x66\x0e\xfe\x6d\xea\xcf\x07\x7e\xdf\xf8\x5d\xe3\x9b\xc5\x4b" "\x79\x2f\x3f\xce\x91\x49\x47\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x05\x37\xdf\x7a" "\xfb\xda\x42\xa7\xb3\xb8\xbc\x0f\x2b\x69\xec\xf0\x80\x77\x46\x36\xf5\x53" "\xd1\x7b\xa5\xb9\x3f\xf6\xfd\xd3\x5a\x99\xde\xea\x88\xfa\x43\x92\x2d\xba" "\x37\x27\x11\x73\x2b\xc9\xbe\x48\x5d\xa6\xf6\x60\xae\xe9\x8c\x68\xba\x30" "\x78\xa5\x95\x34\x06\xf1\x24\xb9\xb6\x4f\xbe\xe0\x0e\xd8\x0d\xa7\x56\xae" "\xbf\x71\xea\xe6\x5b\x6f\x7f\x6d\xe9\xfa\xc2\x6b\x8b\xaf\x2d\xde\x38\x7d" "\xf6\xcc\x2b\x67\xda\x5f\x9f\xbf\x7d\xea\xca\x52\x67\x71\xae\xf7\x73\xd2" "\x51\x02\xbb\x61\xed\xd7\x80\x49\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x6c\xd7\x58\x7f\x45\xd0\xcc\x27\xfa\xdb\x83\x11\xd3\x16\xdd\x09\xec" "\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xf0\xe9\x74\xfe\xd5\x1c\xec\xa6\xc8\xfc\xdc\xc9\xb9\x72" "\xfd\xde\xdd\x76\xa7\x5c\xfa\xf5\xb5\x2d\xa7\x92\x34\x92\x14\x3f\x4a\x8a" "\x8f\x92\x73\xe9\x2d\x99\x19\x1a\xae\x78\xd8\x3c\x2f\xdf\xff\xf0\x37\x2f" "\xbe\xfb\x41\x7b\x6d\xac\xa9\xfe\xf6\x8d\x0d\xfd\xfe\xf8\xef\xd5\xd5\x31" "\xf7\xa2\x5b\x2f\x99\x4d\x72\xa0\x2e\x1f\x6d\x7a\x5b\xe3\x5d\xaa\xca\xe6" "\xa0\x61\x7c\xc5\x60\x0f\xcb\x84\x1d\xef\x27\x0e\x26\xed\xff\x01\x00\x00" "\xff\xff\x47\x83\x07\xa2", 1716); syz_mount_image( /*fs=*/0x2000000000c0, /*dir=*/0x200000000980, /*flags=MS_LAZYTIME|MS_STRICTATIME|MS_RELATIME|MS_NODEV*/ 0x3200004, /*opts=*/0x200000000a80, /*chdir=*/3, /*size=*/0x6b4, /*img=*/0x200000000180); // ioctl$DRM_IOCTL_PRIME_HANDLE_TO_FD arguments: [ // fd: fd_dri (resource) // cmd: const = 0xc00c642d (4 bytes) // arg: nil // ] syscall(__NR_ioctl, /*fd=*/(intptr_t)-1, /*cmd=*/0xc00c642d, /*arg=*/0ul); // socket$caif_seqpacket arguments: [ // domain: const = 0x25 (8 bytes) // type: const = 0x5 (8 bytes) // proto: int32 = 0x4 (4 bytes) // ] // returns sock_caif res = syscall(__NR_socket, /*domain=*/0x25ul, /*type=*/5ul, /*proto=*/4); if (res != -1) r[0] = res; // setsockopt$CAIFSO_LINK_SELECT arguments: [ // fd: sock_caif (resource) // level: const = 0x116 (4 bytes) // opt: const = 0x7f (4 bytes) // arg: nil // arglen: len = 0x0 (8 bytes) // ] syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0x116, /*opt=*/0x7f, /*arg=*/0ul, /*arglen=*/0ul); // madvise arguments: [ // addr: VMA[0x4000] // len: len = 0x86ac726dff2f4713 (8 bytes) // advice: madvise_flags = 0xa (8 bytes) // ] syscall(__NR_madvise, /*addr=*/0x200000bdc000ul, /*len=*/0x86ac726dff2f4713ul, /*advice=MADV_DONTFORK*/ 0xaul); // getpid arguments: [ // ] // returns pid res = syscall(__NR_getpid); if (res != -1) r[1] = res; // syz_pidfd_open arguments: [ // pid: pid (resource) // flags: const = 0x0 (8 bytes) // ] // returns fd_pidfd res = -1; res = syz_pidfd_open(/*pid=*/r[1], /*flags=*/0); if (res != -1) r[2] = res; // prlimit64 arguments: [ // pid: pid (resource) // res: rlimit_type = 0xe (8 bytes) // new: nil // old: nil // ] syscall(__NR_prlimit64, /*pid=*/0, /*res=RLIMIT_RTPRIO*/ 0xeul, /*new=*/0ul, /*old=*/0ul); // sched_setscheduler arguments: [ // pid: pid (resource) // policy: sched_policy = 0x2 (8 bytes) // prio: ptr[in, int32] { // int32 = 0x8 (4 bytes) // } // ] *(uint32_t*)0x200000000080 = 8; syscall(__NR_sched_setscheduler, /*pid=*/0, /*policy=SCHED_RR*/ 2ul, /*prio=*/0x200000000080ul); // getpid arguments: [ // ] // returns pid res = syscall(__NR_getpid); if (res != -1) r[3] = res; // sched_setaffinity arguments: [ // pid: pid (resource) // cpusetsize: len = 0x0 (8 bytes) // mask: nil // ] syscall(__NR_sched_setaffinity, /*pid=*/0, /*cpusetsize=*/0ul, /*mask=*/0ul); // sched_setscheduler arguments: [ // pid: pid (resource) // policy: sched_policy = 0x2 (8 bytes) // prio: nil // ] syscall(__NR_sched_setscheduler, /*pid=*/r[3], /*policy=SCHED_RR*/ 2ul, /*prio=*/0ul); // mmap arguments: [ // addr: VMA[0xb36000] // len: len = 0xb36000 (8 bytes) // prot: mmap_prot = 0xb635773f06ebbeee (8 bytes) // flags: mmap_flags = 0x8031 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0xb36000ul, /*prot=PROT_GROWSUP|PROT_SEM|PROT_WRITE|PROT_EXEC|0xb635773f04ebbee0*/ 0xb635773f06ebbeeeul, /*flags=MAP_POPULATE|MAP_FIXED|MAP_ANONYMOUS|MAP_SHARED*/ 0x8031ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); // socketpair$unix arguments: [ // domain: const = 0x1 (8 bytes) // type: unix_socket_type = 0x2 (8 bytes) // proto: const = 0x0 (4 bytes) // fds: nil // ] syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0, /*fds=*/0ul); // connect$unix arguments: [ // fd: sock_unix (resource) // addr: nil // addrlen: len = 0x0 (8 bytes) // ] syscall(__NR_connect, /*fd=*/(intptr_t)-1, /*addr=*/0ul, /*addrlen=*/0ul); // sendmmsg$unix arguments: [ // fd: sock_unix (resource) // mmsg: nil // vlen: len = 0x0 (8 bytes) // f: send_flags = 0x0 (8 bytes) // ] syscall(__NR_sendmmsg, /*fd=*/(intptr_t)-1, /*mmsg=*/0ul, /*vlen=*/0ul, /*f=*/0ul); // recvmmsg arguments: [ // fd: sock (resource) // mmsg: nil // vlen: len = 0x0 (8 bytes) // f: recv_flags = 0x2 (8 bytes) // timeout: nil // ] syscall(__NR_recvmmsg, /*fd=*/(intptr_t)-1, /*mmsg=*/0ul, /*vlen=*/0ul, /*f=MSG_PEEK*/ 2ul, /*timeout=*/0ul); // openat$ubi_ctrl arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: nil // flags: open_flags = 0x8400 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0ul, /*flags=O_LARGEFILE|O_APPEND*/ 0x8400, /*mode=*/0); if (res != -1) r[4] = res; // ioctl$vim2m_VIDIOC_EXPBUF arguments: [ // fd: fd_vim2m (resource) // cmd: const = 0xc0405668 (4 bytes) // arg: nil // ] syscall(__NR_ioctl, /*fd=*/(intptr_t)-1, /*cmd=*/0xc0405668, /*arg=*/0ul); // ioctl$FS_IOC_SETFLAGS arguments: [ // fd: fd (resource) // cmd: const = 0x40186f40 (4 bytes) // arg: nil // ] syscall(__NR_ioctl, /*fd=*/r[4], /*cmd=*/0x40186f40, /*arg=*/0ul); // setns arguments: [ // fd: fd_namespace (resource) // type: ns_type = 0x24020000 (8 bytes) // ] syscall(__NR_setns, /*fd=*/r[2], /*type=CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS*/ 0x24020000ul); // syz_clone arguments: [ // flags: clone_flags = 0x120e1100 (8 bytes) // stack: nil // stack_len: bytesize = 0x0 (8 bytes) // parentid: nil // childtid: nil // tls: nil // ] // returns pid syz_clone( /*flags=CLONE_PIDFD|CLONE_NEWUSER|CLONE_NEWCGROUP|CLONE_SETTLS|CLONE_SYSVSEM|0x20100*/ 0x120e1100, /*stack=*/0, /*stack_len=*/0, /*parentid=*/0, /*childtid=*/0, /*tls=*/0); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; if ((reason = setup_leak())) printf("the reproducer may not work as expected: leak checking setup " "failed: %s\n", reason); loop(); return 0; }