// https://syzkaller.appspot.com/bug?id=d8ed1f6e53c6b849f4a5fecd62617cee96df6faa // 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, 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 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, loopfd = -1, 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) { memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; 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) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } 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() { char mypid[32]; snprintf(mypid, sizeof(mypid), "%d", getpid()); 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", mypid}, }; for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) { if (!write_file(files[i].name, files[i].data)) printf("write to %s failed: %s\n", files[i].name, strerror(errno)); } } 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) { 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); event_timedwait(&th->done, 50 + (call == 0 ? 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 (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } } } uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000c0, "nilfs2\000", 7); memcpy((void*)0x200001c0, "./file0\000", 8); memcpy( (void*)0x20000100, "\x00\xaf\x08\x9b\x0a\x32\xe3\x1a\xfa\xa5\xa6\x74\x33\xb5\x10\x7c\x2f" "\x3f\xdb\xb7\x25\x34\x4e\x0a\xfc\x2e\xad\x9e\xf0\x81\xca\xf0\x16\x71" "\x74\x61\xdd\xd9\x67\xba\xd2\x65\x87\x2f\xfe\x18\x54\x07\xd7\x8e\x17" "\xbe\x2a\x7a\x32\x7f\x70\x2e\xc4\x18\xe4\xca\x1f\x79\x00\x00\x00\x00" "\xff\x08\x02\xde\x04\xc0\x61\x1b\xc5\x1c\xb5\x1a\x67\xa3\xaf\x83\x07" "\x87\x63\x64\xa3\x5a\xef\x43\x04\x0e\x9f\xa1\x13\x18\x50\xd7\x57\x8c" "\x0a\x9f\xe8\xe0\x8b\xc2\xe0\x45\x7f\x2f\x4a\x6d\x01\x8b\xdf\x34\x6c", 119); memcpy( (void*)0x20000200, "\x78\x9c\xec\xdd\x4d\x8c\x5b\x47\x1d\x00\xf0\xb1\x77\xbd\xc9\x26\x2d" "\x71\x4a\x42\x97\x34\xb4\x09\x85\xb6\x7c\x74\xb7\xd9\x2c\xe1\x23\x82" "\xa6\x6a\x2e\x44\x4d\xc5\xad\x52\xc5\x25\x4a\xd3\x12\x91\x06\x44\x2a" "\x41\xab\x1e\x92\x9c\xb8\xd1\xaa\x0a\x57\x3e\xc4\xa9\x97\x0a\x10\x12" "\xbd\xa0\xa8\x27\x2e\x95\x68\x24\x2e\x3d\x15\x0e\x1c\x88\x82\x54\x89" "\x03\x14\x92\x45\xf1\xce\x78\xbd\xff\xd8\x3c\x7b\x37\xbb\x8e\xd7\xbf" "\x9f\x34\x3b\x9e\x37\x63\xcf\x3c\xef\xf3\xf3\xf3\x7b\x6f\x66\x12\x30" "\xb6\xea\xad\xbf\x0b\x0b\x33\xb5\x94\x2e\xbd\xfd\xc6\xd1\xbf\x3f\xf4" "\xb7\xe9\x9b\x4b\x1e\x6f\x97\x68\xb6\xfe\x4e\x76\xa4\x1a\x29\xa5\x5a" "\x4e\x4f\x86\xd7\xfb\x60\x62\x29\xbe\xfe\xe1\xab\x27\xbb\xc5\xb5\x34" "\xdf\xfa\x5b\xd2\xe9\xe9\x6b\xed\xe7\x6e\x4f\x29\x9d\x4f\xfb\xd2\xe5" "\xd4\x4c\x7b\x2e\x5d\x79\xfd\xdd\xf9\xa7\x8e\x5f\x38\x76\x71\xff\x7b" "\x6f\x1e\xbe\xba\x3e\x6b\x0f\x00\x00\xe3\xe5\x5b\x97\x0f\x2f\xec\xfe" "\xcb\x9f\xee\xdb\xf9\xd1\x5b\xf7\x1f\x49\x5b\xda\xcb\xcb\xf1\x79\x33" "\xa7\xef\xca\xc7\xfd\x47\xf2\x81\x7f\x39\xfe\xaf\xa7\x95\xe9\x5a\x47" "\xe8\x34\x15\xca\x4d\xe6\x50\x0f\xe5\x26\xba\x94\xeb\xac\xa7\x11\xca" "\x4d\xf6\xa8\x7f\x2a\xbc\x6e\xa3\x47\xb9\x2d\x15\xf5\x4f\x74\x2c\xeb" "\xb6\xde\x30\xca\xca\x76\xdc\x4c\xb5\xfa\xec\x8a\x74\xbd\x3e\x3b\xbb" "\xf4\x9b\x3c\xb5\x7e\xd7\x4f\xd5\x66\xcf\x9e\x3e\xf3\xfc\xb9\x21\x35" "\x14\xb8\xed\xfe\xf9\x40\x4a\x69\x9f\x20\x0c\x16\x8e\xa4\xe1\xb7\x41" "\x58\x7b\x58\xdc\x31\xec\x3d\x10\xc0\x92\x78\xbd\xf0\x16\xe7\xe3\x99" "\x85\xb5\x69\xbf\xda\x64\x7f\xf5\x5f\x7b\xa2\xde\xfd\xf9\x7d\x8b\x67" "\x1c\x60\xd9\x46\x6f\xff\xea\x1f\xad\xfa\x7f\x75\x61\x7d\xeb\x67\xbc" "\x6c\xd6\xad\xa9\xac\x57\xf9\x1c\xdd\x95\xd3\xf1\x3a\x42\xbc\x7f\x69" "\xd0\xcf\x7f\x79\xbd\x78\x3d\xa2\xd1\x67\x3b\x7b\x5d\x47\x18\x95\xeb" "\x0b\xbd\xda\x39\xb1\xc1\xed\x58\xad\x5e\xed\x8f\xdb\xc5\x66\xf5\xf5" "\x1c\x97\xf7\xe1\x1b\x21\xbf\xf3\xf3\x13\xff\xa7\xa3\xf2\x3f\x06\xba" "\xfb\x97\xf3\xff\x82\x30\xb6\x61\x71\xd8\x3b\x20\xe0\x8e\x15\xef\x9b" "\x5b\xcc\x4a\x7e\xbc\xaf\x2f\xe6\x6f\xa9\xc8\xdf\x5a\x91\x3f\x5d\x91" "\xbf\xad\x22\x7f\x7b\x45\x3e\x8c\xb3\xdf\xbe\xf4\x93\xf4\x5a\x6d\xf9" "\x77\x7e\xfc\x4d\x3f\xe8\xf9\xb0\x72\x9e\xed\xee\x1c\x7f\x6c\xc0\xf6" "\xc4\xf3\x91\x83\xd6\x1f\xef\xfb\x1d\xd4\x5a\xeb\x77\x75\x8f\x51\xf2" "\xfb\x13\xcf\x9c\xfa\xca\x73\xcf\x5e\x59\xba\xff\xbf\xd6\xde\xfe\x6f" "\xe4\xed\x7d\x5f\x4e\x37\xf3\x67\xeb\x72\x2e\x50\xce\x17\xc6\xf3\xea" "\xed\x7b\xff\x9b\x2b\xeb\xa9\xf7\x28\x77\x4f\x68\xcf\xdd\x5d\xca\xb7" "\x1e\xef\x5a\x59\xae\xb6\x6b\xf9\x75\x52\xc7\x7e\xe6\x96\x76\xcc\xac" "\x7c\xde\x8e\x5e\xe5\xf6\xae\x2c\xd7\x0c\xe5\xa6\x73\xd8\x1a\xda\x1b" "\x8f\x4f\xb6\x85\xe7\x95\xe3\x8f\xb2\x5f\x2d\xef\xd7\x64\x58\xdf\x46" "\x58\x8f\xa9\xd0\x8e\xb2\x5f\xd9\x99\xe3\xd8\x0e\x58\x8d\xb2\x3d\xf6" "\xba\xff\xbf\x6c\x9f\x33\xa9\x51\x7b\xfe\xf4\x99\x53\x8f\xe5\x74\xd9" "\x4e\xff\x38\xd1\xd8\x72\x73\xf9\x81\x0d\x6e\x37\xb0\x76\xfd\xf6\xff" "\x99\x49\x2b\xfa\xff\xb4\x0f\x73\x67\x52\xa3\xde\xb9\x5f\xd8\xb1\xbc" "\xbc\xd6\xb9\x5f\x68\x86\xe5\xf3\x3d\x96\x1f\xcc\xe9\xf2\x3d\xf7\x9d" "\x89\xe9\xd6\xf2\xd9\x93\xdf\x3b\xf3\xdc\xed\x5e\x79\x18\x73\xe7\x5e" "\x7e\xe5\xbb\x27\xce\x9c\x39\xf5\x03\x0f\x3c\xf0\xc0\x83\xf6\x83\x61" "\xef\x99\x80\xf5\x36\xf7\xd2\x8b\xdf\x9f\x3b\xf7\xf2\x2b\x8f\x9e\x7e" "\xf1\xc4\x0b\xa7\x5e\x38\x75\xf6\xe0\xa1\x43\x07\xe7\xe7\x0f\x7d\xf5" "\xe0\xc2\x5c\xeb\xb8\x7e\xae\xf3\xe8\x1e\xd8\x4c\x96\xbf\xf4\x87\xdd" "\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x5f\x3f\x3c\x76\xf4\xca" "\x9f\xdf\xf9\xf2\xfb\x4b\xfd\xff\x97\xfb\xff\x95\xfe\xff\xe5\xce\xdf" "\xd2\xff\xff\xc7\xa1\xff\x7f\xec\x27\x5f\xfa\xc1\x97\x7e\x80\x3b\xbb" "\xe4\xb7\xca\x84\x01\x56\xa7\x42\xb9\x46\x8f\x1e\xee\xbb\x42\x3d\xbb" "\xc3\xf3\x3e\x91\xe3\xf6\x3c\x7e\xb9\xff\x7f\xa9\x2e\x8e\xeb\x5a\xda" "\x73\x6f\x58\x1e\xc7\xef\x2d\xe5\xc2\x70\x02\xb7\x8c\x97\x32\x15\xc6" "\x20\x89\xf3\x05\x7e\x3a\xc7\x17\x73\xfc\xcb\xb8\x82\xb0\x91\x6a\xd3" "\xdd\x17\xe7\xb8\x6a\x7c\xeb\xb2\xad\x97\x0e\xc1\xc6\xa5\x18\x4d\xe5" "\xff\x56\xb6\x86\x32\x8e\x49\xe9\xff\x5d\x35\xae\xd3\xce\x75\x6e\x1f" "\xeb\x63\x23\xba\x13\x0e\x7b\x1d\x81\xee\xfe\x71\x9b\xc6\xff\x6e\x1d" "\x27\xdc\x01\xe3\x19\x0b\xc3\x0a\xd3\x77\x40\x1b\x84\x41\xc3\xe2\xa2" "\x59\x3c\x80\x3b\xc3\xb0\xe7\xff\x2c\xe7\x3d\x4b\x7c\xf6\x0f\xdf\xdc" "\x7a\x33\x94\x62\xd7\x9e\x58\xb9\xbf\x8c\xe3\x97\xc2\x5a\xdc\xe9\xf3" "\x4f\xaa\x7f\x73\xcd\xff\xd9\x9e\xff\xae\xef\xfd\x5f\x98\x31\xaf\xb9" "\xba\x7a\xff\xfd\xb3\xab\xef\x77\x54\x9b\xf6\xf4\x5b\x7f\x5c\xff\x32" "\x0e\xf4\xae\xc1\xea\xff\x28\xd7\x5f\xd6\xe6\xe1\xd4\x5f\xfd\x8b\xbf" "\x08\xf5\xc7\x0b\x42\x7d\xfa\x4f\xa8\x7f\x5b\x9f\xf5\xdf\xb2\xfe\x7b" "\x57\x57\xff\x7f\x73\xfd\xe5\x6d\x7b\xe4\xc1\x7e\xeb\x5f\x6a\x71\xad" "\xbe\xb2\x1d\xf1\xbc\x71\xb9\xfe\x17\xcf\x1b\x17\xd7\xc3\xfa\x97\xb1" "\x3d\x07\x5e\xff\x55\x4e\xd4\x78\x23\xd7\x0f\xe3\x6c\x54\xe6\x99\x1d" "\xd4\xa8\xcc\xff\xdb\x4b\xbc\x0f\xe3\x4b\x39\x5d\x76\x84\xe5\x3e\x87" "\x38\xdf\xc9\xa0\xed\xff\x78\x8e\xcb\xf7\xc0\xee\xf0\xfa\xb5\x8a\xef" "\x37\xf3\xff\x8e\xb6\xaf\xe5\xb8\xea\xf3\x50\xe6\xff\x2d\xdb\x63\xb3" "\x4b\xba\xde\x91\x6e\x74\x79\x6f\x37\xeb\xbe\x06\x46\xd5\x07\xe6\xff" "\x15\x84\xb1\x0d\x8b\x8b\x8b\xeb\x7b\x42\xab\xc2\x50\x2b\x67\xe8\xef" "\xff\xb0\x7f\x27\x0c\xbb\xfe\xc1\xde\xff\x8d\x6f\x6d\x9c\xff\x37\x1e" "\xc3\xc7\xf9\x7f\x63\x7e\x9c\xff\x37\xe6\xc7\xf9\x7f\x63\x7e\x9c\x5f" "\x2f\xe6\xc7\xf9\x7f\xe3\xfb\x19\xe7\xff\x8d\xf9\xf7\x86\xd7\x8d\xf3" "\x03\xcf\x54\xe4\x7f\xb2\x22\x7f\x4f\x45\xfe\x7d\x15\xf9\x7b\x2b\xf2" "\x3f\x55\x91\xbf\x7f\xcb\xff\xcf\xbf\xbf\xe2\xf9\x0f\x54\xe4\xdf\x53" "\x91\xff\x60\x45\xfe\x67\x2a\xf2\x3f\x5b\x91\xff\x50\x45\xfe\x23\x15" "\xf9\x9f\xab\xc8\xdf\xec\x4a\x7f\x94\x71\x5d\x7f\x18\x67\xb1\x7f\x9e" "\xcf\x3f\x8c\x8f\x72\xfd\xa7\xd7\xe7\x7f\x57\x45\x3e\x30\xba\x7e\xfa" "\xd6\x81\x27\x9f\xfd\xcd\xb7\x9b\x4b\xfd\xff\xa7\xda\x67\x18\xca\x75" "\xbc\x23\x39\xdd\xc8\xbf\x9d\x7f\x94\xd3\xf1\xba\x77\xea\x48\xdf\xcc" "\x7b\x27\xa7\xff\x1a\xf2\x87\x7d\xbe\x09\x58\x16\xc7\xcf\x88\xdf\xef" "\x0f\x57\xe4\x03\xa3\xab\xdc\xe7\xe5\xf3\x0d\x63\xa8\xd6\x7d\xc4\x9e" "\x7e\xc7\xad\xea\x75\x9c\xcf\x68\xf9\x7c\x8e\xbf\x90\xe3\x2f\xe6\xf8" "\xd1\x1c\xcf\xe6\x78\x2e\xc7\x07\x72\x3c\xbf\x41\xed\x63\x7d\x3c\xf9" "\xeb\xdf\x1d\x7e\xad\xb6\xfc\x7b\x7f\x47\xc8\xef\xf7\x7e\xf2\xd8\x1f" "\x28\x8e\x13\x75\xb0\xcf\xf6\xc4\xf3\x03\x83\xde\xcf\x1e\xc7\xf1\x1b" "\xd4\x5a\xeb\x5f\x65\x77\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xa1\xa9" "\xb7\xfe\x2e\x2c\xcc\xd4\x52\xba\xf4\xf6\x1b\x47\x9f\x39\x7e\x7a\xee" "\xe6\x92\xc7\xdb\x25\x9a\xad\xbf\x93\x1d\xa9\x46\xfb\x79\x29\x3d\x96" "\xe3\x89\x1c\xff\x3c\x3f\xb8\xfe\xe1\xab\x27\x3b\xe3\x1b\x39\xae\xa5" "\xf9\x54\x4b\xb5\xf6\xf2\xf4\xf4\xb5\x76\x4d\xdb\x53\x4a\xe7\xd3\xbe" "\x74\x39\x35\xd3\x9e\x4b\x57\x5e\x7f\x77\xfe\xa9\xe3\x17\x8e\x5d\xdc" "\xff\xde\x9b\x87\xaf\xae\xdf\x3b\x00\x00\x00\x00\x9b\xdf\xff\x02\x00" "\x00\xff\xff\x9e\xa9\x0d\x94", 2591); syz_mount_image(0x200000c0, 0x200001c0, 0x808, 0x20000100, 1, 0xa1f, 0x20000200); break; case 1: memcpy((void*)0x20000000, ".pending_reads\000", 15); res = syscall(__NR_openat, 0xffffff9c, 0x20000000ul, 0x1c1041ul, 0ul); if (res != -1) r[0] = res; break; case 2: syscall(__NR_socket, 0x10ul, 3ul, 0); break; case 3: memcpy((void*)0x20000040, "blkio.bfq.io_service_bytes_recursive\000", 37); res = syscall(__NR_openat, 0xffffff9c, 0x20000040ul, 0x275aul, 0ul); if (res != -1) r[1] = res; break; case 4: syscall(__NR_write, r[1], 0x20000040ul, 0x208e24bul); break; case 5: memcpy((void*)0x20000200, "\x01\x80\x03\x00\x00\x00\x00\x00", 8); syscall(__NR_ioctl, r[0], 0x40086e8b, 0x20000200ul); break; } } int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); setup_sysctl(); loop(); return 0; }