// https://syzkaller.appspot.com/bug?id=dacdd83da50d42f90f00ea4b3c264efb31070b26 // 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_memfd_create #define __NR_memfd_create 319 #endif static unsigned long long procid; 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 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 setup_common() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void setup_binderfs() { if (mkdir("/dev/binderfs", 0777)) { } if (mount("binder", "/dev/binderfs", "binder", 0, NULL)) { } if (symlink("/dev/binderfs", "./binderfs")) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setsid(); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 128 << 20; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } static int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static void drop_caps(void) { struct __user_cap_header_struct cap_hdr = {}; struct __user_cap_data_struct cap_data[2] = {}; cap_hdr.version = _LINUX_CAPABILITY_VERSION_3; cap_hdr.pid = getpid(); if (syscall(SYS_capget, &cap_hdr, &cap_data)) exit(1); const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE); cap_data[0].effective &= ~drop; cap_data[0].permitted &= ~drop; cap_data[0].inheritable &= ~drop; if (syscall(SYS_capset, &cap_hdr, &cap_data)) exit(1); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); setup_common(); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); setup_binderfs(); loop(); exit(1); } uint64_t r[1] = {0xffffffffffffffff}; void loop(void) { intptr_t res = 0; memcpy((void*)0x20000000, "hfsplus\000", 8); memcpy((void*)0x200000c0, "./file1\000", 8); memcpy( (void*)0x20000e00, "\x78\x9c\xec\xdd\xcd\x6b\x1c\xf7\xfd\x07\xf0\xf7\xae\x57\x0f\xeb\x80\xa2" "\x24\x8e\xe3\xdf\x8f\x40\x4d\x0c\x69\xa9\xa9\x2d\x59\x38\xad\x7a\xb1\x5b" "\x4a\x51\x21\x94\xe0\x1e\x7a\x16\xb1\x1c\x0b\xaf\x15\x57\x52\x8a\x12\x4a" "\xa3\x3e\xd1\x6b\x0f\xfd\x03\xd2\x83\x7a\x69\x4f\x2d\xa5\x50\x28\x18\xd2" "\x73\x7b\xcb\x55\xf4\x14\x28\xf4\x92\x93\x9b\x43\xa7\xcc\xec\xac\xb4\x52" "\xf4\xb0\x8a\x2d\xaf\x9c\xbc\x5e\x66\xf6\xfb\x99\xf9\xce\x7c\xe7\x33\x9f" "\x79\xd8\x5d\x19\xa1\x00\x9f\x5b\x73\x17\xd3\xba\x9f\x76\xe6\x2e\xbe\xba" "\x56\xce\x6f\x6e\xcc\x74\x36\x37\x66\xee\xf6\xe2\x24\x63\x49\x9a\x49\xab" "\xdb\xa4\xb1\x94\x34\xde\x4f\xae\xa7\x3b\xe5\xff\xca\x85\xf5\x70\x8d\xfd" "\xf6\xf3\xeb\xc5\xd9\x1b\x1f\x7c\xb4\xf9\x61\x77\xae\x95\xed\xf1\xca\x97" "\xf6\x43\x1e\xc5\x7a\x3d\xe5\x7c\x92\x53\x75\xfb\xa8\xc6\x7b\xfd\xd3\x8d" "\x37\xb6\x1d\x36\xb6\x2a\x53\x16\xec\x42\xaf\x70\x30\x6c\x23\x49\x8a\x1d" "\x7e\x70\x76\xbb\x67\x2f\xc5\xa9\xbe\x99\x7d\xef\x77\xe0\xc9\xd1\xa8\xde" "\x37\xfb\xde\xb3\xea\xfb\x7f\x32\x39\x9d\x64\xbc\xf7\x86\xb6\xde\xed\x6c" "\x0e\x25\xc9\x47\x68\x7d\xd8\x09\x00\x00\x00\xc0\x63\xf0\xf4\x83\x77\x93" "\xb5\x4c\x0c\x3b\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x92\x74\xff" "\xfe\x7f\xd9\x54\x53\xb3\x17\x9f\x4f\xa3\xf7\xf7\xff\x47\xeb\x65\xa9\xe3" "\x93\x69\xc0\xcc\xee\x37\x8f\x3b\x11\x00\x00\x00\x00\x00\x00\x00\x38\x7e" "\x5f\x78\x90\xdf\xdd\x28\x8a\x89\xde\x7c\xd1\xa8\xfe\xcf\xff\xa5\x6a\xe6" "\x4c\xf5\xfa\x54\xde\xca\x4a\x16\xb2\x9c\x4b\x59\xcb\x7c\x56\xb3\x9a\xe5" "\x4c\x27\x99\xec\x1b\x68\x74\x6d\x7e\x75\x75\x79\xba\xb7\xe5\xc7\x45\x51" "\xec\xb3\xe5\x95\x3d\xb7\xbc\x32\x60\xc2\xed\x47\x71\xd4\x00\x00\x00\x00" "\x00\x00\x00\xf0\x99\x71\xad\x6e\x7f\x9a\xb9\x4c\x0c\x39\x17\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xa1\x91\x9c\xea\x36\xd5\x74\xa6\x17" "\x4f\xa6\xd9\x4a\x32\x9e\x64\xb4\x5c\x6f\x3d\xf9\x47\x2f\x7e\x92\xdd\x1f" "\x76\x02\x00\x00\x00\xf0\x18\x3c\xfd\x20\x0f\xb2\x96\x89\xde\x7c\xd1\xa8" "\xbe\xf3\x9f\xad\xbe\xf7\x8f\xe7\xad\x2c\x65\x35\x8b\x59\x4d\x27\x0b\xb9" "\x59\xfd\x2c\xa0\xfb\xad\xbf\xb9\xb9\x31\xd3\xd9\xdc\x98\xb9\x5b\x4e\x9f" "\x1c\xf7\x1b\xff\xde\x8e\xff\x38\x71\x68\x1a\xd5\x88\xe9\xfe\xec\x61\xef" "\x3d\x9f\xab\xd6\x68\xe7\x56\x16\xab\x25\x97\xf2\x7a\xde\x4c\x27\x37\xd3" "\xac\xb6\x2c\x9d\xeb\xe5\xb3\x77\x5e\x3f\x29\x73\x6a\x5c\xeb\x2a\x8a\xc1" "\x0a\x74\xb3\x6e\xcb\x23\xff\x55\xdd\x9e\x0c\x93\x55\x45\x46\xb6\x2a\x32" "\x55\xe7\x56\x56\xe3\x99\x83\x2b\xd1\x7f\x76\x3e\xc5\x9e\xa6\xd3\xdc\xfa" "\xc9\xcf\x99\x23\xd4\xfc\xda\x81\x7b\x69\xfc\xb7\x77\x4e\x4e\xf7\x96\x24" "\x4f\x7d\xe7\xf0\x9a\x8f\x1c\xe9\x60\x1e\xca\xee\x4a\x5c\xe9\xbb\xfa\xce" "\x1e\x5c\x89\xe4\x8b\x7f\xfa\xfd\xf7\x6f\x77\x96\xee\xdc\xbe\xb5\x72\xf1" "\xe4\x5c\x46\x47\x30\xf6\xcf\xed\xbb\x66\x77\x25\x66\xfa\x2a\xf1\xc2\x67" "\xbe\x12\xfd\xa6\x32\x92\x66\x9e\xdf\x9a\x9f\xcb\xb7\xf3\xbd\x5c\xcc\xf9" "\xbc\x96\xe5\x2c\xe6\x87\x99\xcf\x6a\x16\x72\x3e\xdf\xaa\xa2\xf9\xfa\x7a" "\x2e\x5f\x27\x0f\xae\xd4\xf5\x1d\x73\xaf\x1d\x96\xc9\x68\x7d\x5e\xba\x4f" "\xd1\xa3\xe5\xf4\x52\xb5\xed\x44\x16\xf3\xdd\xbc\x99\x9b\x59\xc8\x2b\xd5" "\xbf\x2b\x99\xce\x57\x73\x35\x57\x33\xdb\x77\x86\x9f\x1f\xe0\xae\x6f\xee" "\x71\xd7\xff\x79\xff\xe4\x2f\x7c\xa9\x0e\xda\x49\x7e\x59\xb7\x27\x43\x59" "\xd7\x67\xfa\xea\xda\xff\xcc\x9d\xac\xfa\xfa\x97\x34\x53\x8c\x75\xb7\x7b" "\xf6\x91\x3d\x1b\xc7\x7b\x41\xeb\xff\xeb\xa0\x3c\x13\x3f\xab\xdb\x93\x61" "\x77\x25\xa6\xfb\xae\x97\xe7\x0e\xae\xc4\x6f\xaa\xc7\xca\x4a\x67\xe9\xce" "\xf2\xed\xf9\x7b\x03\xee\xef\xe5\xba\x2d\xef\xa3\x5f\x9c\xa8\x77\xe6\xf2" "\x7a\x79\xb6\x3c\x59\xd5\xdc\xce\xab\xa3\xec\x7b\x6e\xcf\xbe\xe9\xaa\xef" "\xcc\x56\x5f\x73\x77\xdf\x6f\xdb\x5b\x7d\x87\xdd\xa9\xa3\xf5\x67\xb8\x4f" "\x8e\x74\xa5\xea\x7b\x61\xcf\xbe\x99\xaa\xef\x5c\x5f\xdf\xf6\xe7\xad\x8f" "\x8b\xa2\xe8\x7e\xde\x02\xe0\xc4\x3b\xfd\xe5\xd3\xa3\xed\x7f\xb5\xff\xde" "\x7e\xaf\xfd\xf3\xf6\xed\xf6\xab\xe3\xdf\x1c\xfb\xda\xd8\x8b\xa3\x19\xf9" "\xdb\xc8\xd7\x5b\x53\xa7\x5e\x6e\xbe\xd8\xf8\x43\xde\xcb\x8f\x73\xf8\x37" "\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xe0\x50\x2b\x6f\xbf\x73\x67\xbe\xd3\x59\x58\xde" "\x15\x14\x45\xf1\xee\x3e\x5d\xc7\x12\xa4\x95\xec\x58\xf2\xd7\xbf\xf4\xad" "\x93\x64\xbd\xcc\x76\xf0\x01\xcb\xb5\xaf\x37\x93\x6a\x49\x2b\x75\xf0\xd8" "\x0e\xe7\x73\x12\x8c\xef\x7b\xfd\xec\x0e\xfe\x53\x14\xc5\xc9\xc8\x79\x90" "\xa0\xa8\x55\x4b\x46\x87\x9f\xcf\x30\x82\x61\x3f\x99\x80\xe3\x76\x79\xf5" "\xee\xbd\xcb\x2b\x6f\xbf\xf3\x95\xc5\xbb\xf3\x6f\x2c\xbc\xb1\xb0\x34\x7b" "\xf5\xea\xec\xd4\xec\xd5\x57\x66\x2e\xdf\x5a\xec\x2c\x4c\x75\x5f\x87\x9d" "\x25\x70\x1c\xfa\x3e\x81\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\x88" "\xc1\x7e\x39\xa7\xf1\x70\xbf\xdb\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\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\x10\xe6\x2e\xa6\x75" "\x3f\x8d\x4c\x4f\x5d\x9a\x2a\xe7\x37\x37\x66\x3a\xe5\xd4\x8b\xb7\xd7\x6c" "\x25\x69\x26\x69\xfc\x28\x69\xbc\x9f\x5c\x4f\x77\xca\x64\xdf\x70\x8d\xfd" "\xf6\xb3\x9e\xdc\xf8\xe0\xa3\xcd\x0f\xb7\xc7\x6a\xf5\xd6\x6f\x1e\xb4\xdd" "\x60\xd6\xeb\x29\xe7\x93\x9c\xaa\xdb\x3d\x8c\x1f\x6d\xbc\x46\x35\xce\xbd" "\xfd\xc7\x1b\x50\x63\xeb\x08\xcb\x82\x5d\xe8\x15\x0e\x86\xed\x7f\x01\x00" "\x00\xff\xff\x4b\x96\x1d\x1d", 1645); syz_mount_image(/*fs=*/0x20000000, /*dir=*/0x200000c0, /*flags=*/0x50, /*opts=*/0x20000100, /*chdir=*/5, /*size=*/0x66d, /*img=*/0x20000e00); memcpy((void*)0x20000240, "cpuacct.usage_percpu\000", 21); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000240ul, /*flags=*/0x275aul, /*mode=*/0ul); if (res != -1) r[0] = res; syscall(__NR_write, /*fd=*/r[0], /*data=*/0x20000040ul, /*len=*/0x208e24bul); memcpy((void*)0x20000240, "cpuacct.usage_percpu\000", 21); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000240ul, /*flags=*/0x275aul, /*mode=*/0ul); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); do_sandbox_none(); return 0; }