// https://syzkaller.appspot.com/bug?id=42ba0c369bbd49713e8808008c57f1fa8d9dbf10 // 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_bpf #define __NR_bpf 321 #endif #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 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"); } 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 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 < 14; 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); event_timedwait(&th->done, 50 + (call == 6 ? 4000 : 0) + (call == 12 ? 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++) { 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[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: syscall(__NR_sendmsg, /*fd=*/-1, /*msg=*/0ul, /*f=*/0ul); break; case 1: *(uint32_t*)0x4000000000c0 = 0x11; *(uint32_t*)0x4000000000c4 = 0xb; *(uint64_t*)0x4000000000c8 = 0; *(uint64_t*)0x4000000000d0 = 0x400000000040; memcpy((void*)0x400000000040, "GPL\000", 4); *(uint32_t*)0x4000000000d8 = 0; *(uint32_t*)0x4000000000dc = 0; *(uint64_t*)0x4000000000e0 = 0; *(uint32_t*)0x4000000000e8 = 0; *(uint32_t*)0x4000000000ec = 0; memset((void*)0x4000000000f0, 0, 16); *(uint32_t*)0x400000000100 = 0; *(uint32_t*)0x400000000104 = 0; *(uint32_t*)0x400000000108 = -1; *(uint32_t*)0x40000000010c = 0; *(uint64_t*)0x400000000110 = 0; *(uint32_t*)0x400000000118 = 0; *(uint32_t*)0x40000000011c = 0; *(uint64_t*)0x400000000120 = 0; *(uint32_t*)0x400000000128 = 0; *(uint32_t*)0x40000000012c = 0; *(uint32_t*)0x400000000130 = 0; *(uint32_t*)0x400000000134 = 0; *(uint64_t*)0x400000000138 = 0; *(uint64_t*)0x400000000140 = 0; *(uint32_t*)0x400000000148 = 0; *(uint32_t*)0x40000000014c = 0; *(uint32_t*)0x400000000150 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x4000000000c0ul, /*size=*/0x94ul); break; case 2: syscall(__NR_sched_setscheduler, /*pid=*/0, /*policy=SCHED_RR*/ 2ul, /*prio=*/0ul); break; case 3: syscall( __NR_mmap, /*addr=*/0x400000000000ul, /*len=*/0xb36000ul, /*prot=PROT_GROWSUP|PROT_SEM|PROT_WRITE|PROT_EXEC|0xb635773f04ebbee0*/ 0xb635773f06ebbeeeul, /*flags=MAP_POPULATE|MAP_FIXED|MAP_ANONYMOUS|MAP_SHARED*/ 0x8031ul, /*fd=*/-1, /*offset=*/0ul); break; case 4: res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0, /*fds=*/0x400000000200ul); if (res != -1) r[0] = *(uint32_t*)0x400000000204; break; case 5: syscall(__NR_sendmmsg, /*fd=*/r[0], /*mmsg=*/0x400000000000ul, /*vlen=*/0x651ul, /*f=*/0ul); break; case 6: memcpy((void*)0x400000000500, "ext4\000", 5); memcpy((void*)0x400000000480, "./file0\000", 8); memcpy((void*)0x4000000004c0, "bsddf", 5); *(uint8_t*)0x4000000004c5 = 0x2c; *(uint8_t*)0x4000000004c6 = 0; memcpy( (void*)0x400000001040, "\x78\x9c\xec\xdd\x4f\x6c\x14\x55\x1c\x07\xf0\xef\x6e\xbb\x25\x01\xb4" "\x60\xfc\x83\xf8\xaf\x82\x4a\x11\xa5\xb6\x35\x41\x12\x4c\x24\xca\x49" "\x2e\x06\x13\xcf\x0d\x2d\x84\x58\xa8\xa1\x35\x11\x42\x8c\x26\x1e\xbc" "\x79\x31\xf1\xec\x41\xb9\x79\xe4\xe0\xc9\x78\xc0\xa3\x26\x78\xf1\xa6" "\x9e\x8c\x91\x18\x22\xf1\xa4\xd6\xcc\x76\x97\x2e\x65\xb7\x74\x43\xdb" "\xa9\xee\xe7\x93\xcc\xee\x9b\x9d\xd7\x7d\xbf\x99\xd7\xdf\xcc\xee\xeb" "\xcb\x34\x40\xcf\x1a\x2a\x1e\x2a\xc9\xd6\x24\xdf\x27\x19\x5c\x58\xbd" "\xb9\xc2\xd0\xc2\xd3\xf5\x6b\x17\x8e\xff\x79\xed\xc2\xf1\x4a\xe6\xe7" "\x8f\xfd\x5e\xa9\xd7\xfb\xe3\xda\x85\xe3\xcd\xaa\xcd\x9f\xdb\x52\x3c" "\x54\x93\xe1\x6a\x52\xfd\xa0\x92\x87\xda\xb4\x3b\x7b\xee\xfc\x9b\x13" "\xd3\xd3\x53\x67\x1b\xeb\x23\x73\xa7\xdf\x1a\x99\x3d\x77\xfe\xd9\x53" "\xa7\x27\x4e\x4e\x9d\x9c\x3a\x33\x7a\xe0\xe0\x0b\xe3\xa3\x07\xc6\xc6" "\xc7\x57\x6d\x5f\x5f\xbd\xf8\xee\xb1\x2d\xaf\xbd\x74\xe4\xa3\xc9\x2b" "\xbf\xcd\x5c\xfc\xe9\xcb\x22\xde\xad\x8d\x6d\xad\xfb\xb1\x5a\x86\x32" "\x74\xf3\xb1\x6c\xf1\xd4\x6a\x37\x56\xb2\xfb\x5a\xca\x95\xfe\x12\x03" "\xa1\x2b\x7d\x49\x8a\xee\xaa\xd5\xf3\x7f\x30\x7d\x59\xec\xbc\xc1\x7c" "\xf3\x63\xa9\xc1\x01\x6b\x6a\xbe\xb0\xa9\xe3\xe6\xf7\xe6\x81\xff\xb1" "\x4a\xca\x8e\x00\x28\x47\xf3\x42\x5f\x7c\xff\x6d\x2e\xeb\xf5\xd9\x83" "\xf2\x5d\x3d\xbc\xf0\x05\xb0\xe8\xf7\xeb\x8d\x65\x61\x4b\x7f\xaa\x8d" "\x3a\xb5\x25\xdf\xef\x57\xd3\x50\x92\x43\x97\x8e\x7c\x51\x2c\x59\xa3" "\x71\x18\x00\x00\x00\x80\x5e\xf6\xd5\xe1\x24\xcf\xb4\x1b\xff\xab\xe6" "\xfe\x96\x7a\x45\xf9\x81\x24\x3b\x92\x3c\x98\x64\x67\x52\x9f\xd7\xf3" "\x70\x92\x47\x92\x3c\x9a\xe4\xb1\xe6\x7c\xa2\x2e\x2c\xad\xbf\x74\xfc" "\xa7\xd2\x69\x02\x0d\xab\xe2\xea\xe1\xe4\x50\x63\x6e\xd7\xcd\xe3\x7f" "\xcd\xd1\xbf\x6c\xeb\x6b\xac\xdd\x55\xac\xa4\x56\x39\x71\x6a\x7a\xea" "\xb9\x24\x77\x27\x19\x4e\x6d\x53\xb1\x3e\xba\x4c\x1b\x97\xbf\xfd\xe7" "\xbb\x4e\xdb\x5a\xc7\xff\x8a\xa5\x68\xbf\x39\x16\xd8\x88\xe3\xd7\xfe" "\x25\x7f\x9f\x9e\x9c\x98\x9b\xb8\x93\x7d\x66\xd1\xd5\xf7\x93\x9d\xfd" "\xed\xfa\xbf\x72\x63\x26\x50\x91\x82\x8f\x27\xd9\xd5\xcd\x1b\xd7\x16" "\x8b\x3f\xef\xda\x7b\xb2\x53\xb5\xdb\xf7\x3f\x6b\x69\xfe\xd3\x64\x4f" "\xdb\xfc\x6f\x9c\x78\xaf\x1c\xac\x3f\x2d\x33\x3f\x73\xa4\x7e\x3e\x18" "\x69\x9e\x15\x6e\xf5\xe1\xe8\xd8\x2b\x9d\xda\xd7\xff\xe5\x2a\xf2\x7f" "\xf3\x72\xfd\x9f\x6c\xab\xb4\xce\xd7\x9d\xed\xbe\x8d\xcb\x3b\x2e\xbd" "\xd8\x69\x5b\xf7\xe7\xff\x1f\x3e\x2b\xce\xff\x03\x95\xd7\xeb\x01\x0e" "\x34\x5e\x7d\x67\x62\x6e\xee\xec\x68\x32\x50\x39\x7a\xeb\xeb\x63\xdd" "\xc7\xfc\xdf\xd6\xf9\x43\x53\xf3\x78\x34\x8f\x57\xd1\xff\xc3\xbb\xdb" "\x5f\xff\xef\x69\x79\xb7\xdd\x49\x9e\x48\xf2\x64\x63\xee\xf2\x9e\xfa" "\xb5\x3f\xd9\x9b\xe4\xe9\x24\xfb\x96\x89\xe6\xef\x97\x0f\xbc\xd1\x69" "\x9b\xfc\x2f\x57\xd1\xff\x93\x6d\xf3\xff\xc6\xd4\x80\x25\xf9\xdf\x7d" "\xe1\xd0\xf6\x4f\x8e\x76\x6a\x7f\x65\xf9\xff\x7c\xfd\x17\x7a\xb8\xf1" "\x8a\xcf\x7f\xb7\xb7\xd2\x0e\x2a\x3b\x4e\x00\x00\x00\x00\x00\x00\x00" "\x56\x47\xb5\x7e\x0f\xbc\x4a\x75\xff\x8d\x72\xb5\xba\x7f\xff\xc2\x3d" "\xfc\xee\xcd\xe6\xea\xf4\xcc\xec\xdc\xbe\x13\x33\x6f\x9f\x99\x5c\xb8" "\x57\xde\xb6\xd4\xaa\xcd\x99\x5e\x83\x2d\xf3\x41\x47\xeb\xe5\xc5\xf5" "\xb1\x25\xeb\xe3\x49\xb6\x27\xf9\xb8\xef\xaf\xc6\x9d\x07\x66\xa6\x27" "\xcb\xde\x79\xe8\x71\x5b\x3a\xe4\x7f\xe1\x97\xbe\xb2\xa3\x03\xd6\x9c" "\xfb\xb5\x42\xef\x5a\x41\xfe\xd7\xd6\x23\x0e\x60\xfd\xb9\xfe\x43\xef" "\x92\xff\xd0\xbb\xe4\x3f\xf4\x2e\xf9\x0f\xbd\x4b\xfe\x43\xef\x92\xff" "\xd0\xbb\x56\x9e\xff\x03\x6b\x1a\x07\xb0\xfe\x5c\xff\xa1\x27\xdd\xc9" "\x7d\xfd\x36\x5a\xa1\x3f\x1b\x22\x8c\xb6\x85\xe6\xfc\xa9\x92\xc2\x68" "\xfe\x4b\xfe\x0d\x72\x34\x36\x66\xe1\xf3\xaf\x93\x75\x68\xab\x2f\xc9" "\x46\xd9\xe5\x65\x0a\x65\x9e\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x36\x8e\x7f\x03\x00\x00\xff\xff\x44\x03" "\xdb\x3c", 1107); syz_mount_image(/*fs=*/0x400000000500, /*dir=*/0x400000000480, /*flags=*/0, /*opts=*/0x4000000004c0, /*chdir=*/1, /*size=*/0x453, /*img=*/0x400000001040); break; case 7: memcpy((void*)0x4000000008c0, "\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", 14); syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x4000000008c0ul, /*size=*/0x48ul); break; case 8: memcpy((void*)0x4000000002c0, "/sys/power/resume", 17); res = syscall( __NR_openat, /*fd=*/0xffffffffffffff9cul, /*dir=*/0x4000000002c0ul, /*flags=O_TRUNC|O_SYNC|O_NONBLOCK|O_NOCTTY|O_NOATIME|O_EXCL|0x2*/ 0x141b82, /*mode=S_IXOTH|S_IWOTH|S_IWUSR*/ 0x83); if (res != -1) r[1] = res; break; case 9: sprintf((char*)0x400000000000, "0x%016llx", (long long)0x700); syscall(__NR_write, /*fd=*/r[1], /*buf=*/0x400000000000ul, /*len=*/0x12ul); break; case 10: syscall(__NR_getsockopt, /*fd=*/r[1], /*level=*/0x84, /*opt=*/1, /*val=*/0ul, /*len=*/0ul); break; case 11: memcpy((void*)0x400000000000, "./cgroup.net/cgroup.procs\000", 26); syscall(__NR_name_to_handle_at, /*fd=*/0xffffff9c, /*file=*/0x400000000000ul, /*handle=*/0ul, /*mnt=*/0ul, /*flags=AT_HANDLE_FID*/ 0x200ul); break; case 12: memcpy((void*)0x400000000580, "ext4\000", 5); memcpy((void*)0x4000000005c0, "./file0\000", 8); *(uint8_t*)0x400000000000 = 0; memcpy( (void*)0x400000000c00, "\x78\x9c\xec\xdd\xcb\x6f\x14\x47\x1a\x00\xf0\xaf\xc7\x0f\x6c\x8c\xd6" "\x03\x5a\xed\x2e\x7b\x58\x2c\xad\x56\x20\xed\x62\x63\x03\x2b\x14\xe5" "\x00\xd7\x08\x59\xe4\xa1\x5c\x72\x89\x83\x0d\x21\x18\xb0\xb0\xa3\xc4" "\x24\x12\x46\x22\x97\x48\x51\x2e\x51\x14\x29\xa7\x1c\x42\xfe\x8b\x04" "\x85\x2b\xa7\xe4\x94\x43\x2e\x39\x45\x48\x28\x89\x38\x46\xca\x44\x3d" "\xd3\x6d\x3c\x76\x8f\x5f\xd8\xd3\x88\xfe\xfd\xa4\x61\xba\xab\xa6\x5d" "\xd5\xd8\xdf\x54\x75\x4d\x55\x4f\x00\x95\x35\x92\xfe\x53\x8b\x38\x18" "\x11\x73\x49\xc4\x70\xb2\xb4\x9c\xd7\x1b\x59\xe6\x48\xeb\x75\x8f\x7e" "\x7b\xff\x7c\xfa\x48\xa2\xd1\x78\xf9\x97\x24\x92\x2c\x2d\x7f\x7d\x92" "\x3d\x0f\x65\x07\x0f\x44\xc4\x77\xdf\x26\x71\xa0\x67\x6d\xb9\xf3\x8b" "\x37\x2e\x4f\xcd\xce\xce\x5c\xcf\xf6\xc7\x16\xae\xcc\x8d\xcd\x2f\xde" "\x38\x7a\xe9\xca\xd4\xc5\x99\x8b\x33\x57\x27\xfe\x3f\x71\xea\xe4\x89" "\x93\xa7\xc6\x8f\x6d\xeb\xbc\x6e\x16\xa4\x9d\xbd\xfd\xd6\x3b\xc3\x1f" "\x4e\xbe\xf6\xe5\xe7\xbf\x27\xe3\x5f\xfd\x38\x99\xc4\xe9\x78\x21\x7b" "\xe1\xca\xf3\xd8\x29\x23\x31\xd2\xfc\x3f\x49\xd6\x66\x0d\x9d\xda\xe9" "\xc2\x4a\xd2\x93\xfd\x9d\x34\x1a\x8d\x46\x9e\x96\xf4\x96\x5b\x27\x36" "\x2f\xff\xfd\xf5\x45\xc4\xdf\x63\x38\x7a\xe2\xf1\x2f\x6f\x38\x3e\x78" "\xb1\xd4\xca\x01\xbb\xaa\x91\xb4\xde\xbb\x81\x2a\x4a\xc4\x3f\x54\x54" "\xde\x0f\xc8\xaf\xed\x57\x5f\x07\xd7\x4a\xe9\x95\x00\xdd\xf0\xf0\x4c" "\x6b\x00\x60\x6d\xfc\xf7\xb6\xc6\x06\x63\xa0\x39\x36\xb0\xf7\x51\x12" "\x2b\x87\x75\x92\x88\xd8\xde\xc8\x5c\xbb\x7d\x11\x71\xff\xde\xe4\xed" "\x0b\xf7\x26\x6f\xc7\x2e\x8d\xc3\x01\xc5\x96\x6e\x45\xc4\x3f\x8a\xe2" "\x3f\x69\xc6\x7f\x3d\x06\xa2\xde\x8c\xff\x5a\x5b\xfc\xa7\xfd\x82\x73" "\xd9\x73\x9a\xfe\xd2\x36\xcb\x5f\x3d\x54\x2c\xfe\xa1\x7b\x5a\xf1\x3f" "\xb0\x6e\xfc\x47\x87\xf8\x7f\x3d\x7d\xbe\xd9\x8a\xe1\x37\xb6\x59\x7e" "\xfd\xf1\xe6\x9b\x83\x6d\xf1\x3f\xb8\xdd\x53\x02\x00\x00\x00\x00\x00" "\x80\xca\xba\x7b\x26\x22\xfe\x57\xf4\xf9\x7f\x6d\x79\xfe\x4f\x14\xcc" "\xff\x19\x8a\x88\xd3\x3b\x50\xfe\xc8\xaa\xfd\xb5\x9f\xff\xd7\x1e\xec" "\x40\x31\x40\x81\x87\x67\x22\x9e\x2f\x9c\xff\x5b\xcb\x67\xff\xd6\x7b" "\x56\x2c\x61\xad\x47\x5f\x72\xe1\xd2\xec\xcc\xb1\x88\xf8\x4b\x44\x1c" "\x89\xbe\x3d\xe9\xfe\xf8\x3a\x65\x1c\xfd\xe8\xc0\x67\x9d\xf2\x46\xb2" "\xf9\x7f\xf9\x23\x2d\xff\x7e\x36\x17\x30\xab\xc7\x83\xde\x3d\xed\xc7" "\x4c\x4f\x2d\x4c\x3d\xc1\x29\x03\x99\x87\xb7\x22\xfe\x59\x38\xff\x37" "\x59\x6e\xff\x93\x82\xf6\x3f\x7d\x67\x98\xdb\x64\x19\x07\xfe\x73\xe7" "\x5c\xa7\xbc\x8d\xe3\x1f\xd8\x2d\x8d\x2f\x22\x0e\x17\xb6\xff\x8f\xef" "\x5a\x91\xac\x7f\x7f\x8e\xb1\x66\x7f\x60\x2c\xef\x15\xac\xf5\xaf\xf7" "\x3e\xfe\xba\x53\xf9\xdb\x8d\x7f\xb7\x98\x80\x27\x97\xb6\xff\x7b\xd7" "\x8f\xff\x7a\xb2\xf2\x7e\x3d\xf3\x5b\x2f\xe3\xf8\x62\x6f\xa3\x53\xde" "\x76\xfb\xff\xfd\xc9\x2b\xcd\xbb\x0a\xf5\x67\x69\xef\x4e\x2d\x2c\x5c" "\x1f\x8f\xe8\x4f\xce\xf6\xa4\xa9\x6d\xe9\x13\x5b\xaf\x33\x3c\x8b\xf2" "\x78\xc8\xe3\x25\x8d\xff\x23\xff\x5e\x7f\xfc\xaf\xa8\xff\x3f\x18\x11" "\x4b\xab\x7e\x76\xf2\x6b\xfb\x9a\xe2\xdc\xdf\xfe\x18\xfa\xa9\x53\x7d" "\xf4\xff\xa1\x3c\x69\xfc\x4f\x6f\xa9\xfd\xdf\xfa\xc6\xc4\x9d\xfa\x37" "\x9d\xca\xdf\x5c\xfb\x7f\xa2\xd9\xd6\x1f\xc9\x52\x8c\xff\x41\xcb\xa7" "\x79\x98\xf6\xb7\xa7\x17\x84\x63\x6f\x51\x56\xb7\xeb\x0b\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xcf\x82\x5a\x44\xec\x8b\xa4\x36\xba\xbc\x5d\xab" "\x8d\x8e\x46\x0c\x45\xc4\x5f\x63\x6f\x6d\xf6\xda\xfc\xc2\x7f\x2f\x5c" "\x7b\xfb\xea\x74\x9a\xd7\xfc\xfe\xff\x5a\xfe\x4d\xbf\xc3\xad\xfd\x24" "\xff\xfe\xff\xfa\x8a\xfd\x89\x55\xfb\xc7\x23\x62\x7f\x44\x7c\xd2\x33" "\xd8\xdc\x1f\x3d\x7f\x6d\x76\xba\xec\x93\x07\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x80\xa7\xc4\x50\x87\xf5\xff\xa9\x9f" "\x7b\xca\xae\x1d\xb0\xeb\x7a\xcb\xae\x00\x50\x9a\x82\xf8\xff\xbe\x8c" "\x7a\x00\xdd\xa7\xfd\x87\xea\x12\xff\x50\x5d\xe2\x1f\xaa\x4b\xfc\x43" "\x75\x89\x7f\xa8\x2e\xf1\x0f\xd5\x25\xfe\xa1\xba\xc4\x3f\x00\x00\x00" "\x00\x00\x3c\x53\xf6\x1f\xba\xfb\x43\x12\x11\x4b\xcf\x0d\x36\x1f\xa9" "\xfe\x2c\xaf\xaf\xd4\x9a\x01\xbb\xad\x56\x76\x05\x80\xd2\xb8\xc5\x0f" "\x54\x97\xa9\x3f\x50\x5d\xae\xf1\x81\x64\x83\xfc\x81\x8e\x07\x6d\x74" "\xe4\x7a\xe6\xce\x3f\xc1\xc1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x50\x39\x87\x0f\x5a\xff\x0f\x55\x65\xfd\x3f\x54\x97\xf5\xff\x50\x5d" "\xf9\xfa\xff\x43\x25\xd7\x03\xe8\x3e\xd7\xf8\x40\x6c\xb0\x92\xbf\x70" "\xfd\xff\x86\x47\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x69" "\x7e\xf1\xc6\xe5\xa9\xd9\xd9\x99\xeb\x36\x5e\x7d\x3a\xaa\xd1\xcd\x8d" "\x46\xa3\x71\x33\xfd\x2b\x78\x5a\xea\xb3\xf3\x1b\x49\x36\x43\xbd\x2b" "\x85\xe6\x53\xe1\xbb\x7f\xa6\xfd\x9b\x39\xc1\x7c\xad\xdf\xe6\x7e\x72" "\x79\xef\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x40\xbb\x3f\x03\x00\x00\xff\xff\x89\x8c" "\x24\xe5", 1515); syz_mount_image(/*fs=*/0x400000000580, /*dir=*/0x4000000005c0, /*flags=MS_STRICTATIME|MS_SILENT|MS_NOSUID*/ 0x1008002, /*opts=*/0x400000000000, /*chdir=*/4, /*size=*/0x5eb, /*img=*/0x400000000c00); break; case 13: memcpy((void*)0x400000000040, ".\000", 2); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x400000000040ul, /*flags=*/0, /*mode=*/0); break; } } int main(void) { syscall(__NR_mmap, /*addr=*/0x3ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x400000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x400001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); setup_sysctl(); const char* reason; (void)reason; use_temporary_dir(); loop(); return 0; }