// https://syzkaller.appspot.com/bug?id=012e084e0fb9760cb6c3aa267e2a835652ab40cb // 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 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_write #define __NR_write 64 #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 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; } 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*)0x200004c0, "ext4\000", 5); memcpy((void*)0x20000500, "./file0\000", 8); *(uint8_t*)0x20000540 = 0; memcpy( (void*)0x20000580, "\x78\x9c\xec\xdd\x4f\x6b\x5c\xe5\x1a\x00\xf0\xe7\x9c\x24\x4d\xda\xa6\x37" "\xe9\xbd\x85\xfb\x67\x73\x7b\xdb\xde\xdb\x0b\xa5\x33\x99\x48\x0a\x15\xc4" "\x8a\x0b\x05\x2d\x88\xfd\x00\x35\x26\xd3\x18\x32\xc9\x84\xcc\xa4\x26\xa1" "\x60\xfb\x15\x54\xb4\xe0\x42\x44\x70\xe5\x46\xd0\x7d\x11\x71\xab\x1b\x51" "\x17\xe2\xc6\x95\x20\x5a\x2a\x22\xb8\x18\x39\x67\x26\x69\x9a\x66\x92\x68" "\xd3\x0c\x64\x7e\x3f\x38\x9c\xf3\x9e\x33\x99\xe7\x7d\x33\x9c\xf7\x99\x3c" "\x49\xe6\x0d\xa0\x6b\x1d\x8f\x88\xeb\x11\x71\x20\x22\x5e\x88\x88\xa1\xd6" "\xf9\xa4\xb5\xc5\x85\xe6\x96\x3d\xee\xce\xed\x6b\x13\xd9\x96\x44\xa3\x71" "\xe9\xc7\x24\xbf\x9e\xb5\x63\xdd\xd7\x64\x0e\xb7\x9e\x73\x20\x22\x9e\x7f" "\x2a\xe2\xc5\xe4\xfe\xb8\xb5\xe5\x95\x99\xf1\x4a\xa5\xbc\xd0\x6a\x17\xeb" "\xb3\xf3\xc5\xda\xf2\xca\xd9\xe9\xd9\xf1\xa9\xf2\x54\x79\x6e\x74\x64\xec" "\xfc\x58\xe9\x5c\xa9\x54\xda\xb5\xb1\xbe\xfa\xcb\xe0\xdf\x4f\x7c\x7c\xe1" "\xb1\xb7\x9f\x7d\xf7\xb3\xf7\x3e\x5c\x5a\xca\xba\x35\xd8\xba\xb6\x7e\x1c" "\xbb\xa9\x39\xf4\xbe\xb5\x38\x99\xde\x88\x78\xe6\x61\x04\xeb\x80\x9e\xd6" "\x78\x0e\x74\xba\x23\xfc\x29\x69\x44\xfc\x35\x22\x4e\xe4\xf7\xff\x50\xf4" "\xe4\xaf\x26\x00\xb0\x9f\x35\x1a\x43\xd1\x18\x5a\xdf\x06\x00\xf6\xbb\x34" "\xaf\x81\x25\x69\xa1\x55\x0b\x18\x8c\x34\x2d\x14\x9a\x35\xbc\x63\x71\x28" "\xad\x54\x6b\xf5\x33\x57\xaa\x8b\x73\x93\xcd\x5a\xd9\x70\xf4\xa5\x57\xa6" "\x2b\xe5\x91\x56\xad\x70\x38\xfa\x92\xac\x5d\xca\x8f\xef\xb6\x47\x37\xb4" "\x1f\x89\x88\xa3\x11\xf1\x7a\xff\xc1\xbc\x5d\x98\xa8\x56\x26\x3b\xf9\xc6" "\x07\x00\xba\xd8\xe1\x0d\xf9\xff\xe7\xfe\x66\xfe\x07\x00\xf6\xb9\x81\x4e" "\x77\x00\x00\xd8\x73\xf2\x3f\x00\x74\x1f\xf9\x1f\x00\xba\x8f\xfc\x0f\x00" "\xdd\x47\xfe\x07\x80\xee\x23\xff\x03\x40\xf7\x91\xff\x01\xa0\xab\x3c\x77" "\xf1\x62\xb6\x35\x56\x3f\xff\x7a\xf2\xea\xf2\xe2\x4c\xf5\xea\xd9\xc9\x72" "\x6d\xa6\x30\xbb\x38\x51\x98\xa8\x2e\xcc\x17\xa6\xaa\xd5\xa9\xfc\x33\x7b" "\x66\xb7\x7b\xbe\x4a\xb5\x3a\x7f\x2e\xe6\x16\x97\x8a\xf5\x72\xad\x5e\xac" "\x2d\xaf\x5c\x9e\xad\x2e\xce\xd5\x2f\xe7\x9f\xeb\x7d\xb9\xdc\xb7\x27\xa3" "\x02\x00\xb6\x72\xf4\xdf\xb7\xbe\x4e\x22\xe2\xfa\xa3\x07\xf3\x2d\xd6\xad" "\xe5\x20\x57\xc3\xfe\x96\x76\xba\x03\x40\xc7\xf4\x74\xba\x03\x40\xc7\x58" "\xed\x0b\xba\x97\x9f\xf1\x81\x4d\x96\xe8\xbd\x47\xdb\x3f\x11\xba\xb9\xfb" "\x7d\x01\xf6\xc6\xe9\x7f\xaa\xff\x43\xb7\x52\xff\x87\xee\xa5\xfe\x0f\xdd" "\x4b\xfd\x1f\xba\x57\xa3\x91\x58\xf3\x1f\x00\xba\x8c\x1a\x3f\xe0\xf7\xff" "\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\xc7\x0d\xe6\x5b\x92\x16\x5a\x6b\x81\x0f\x46" "\x9a\x16\x0a\x11\x47\x22\x62\x38\xfa\x92\x2b\xd3\x95\xf2\x48\x44\xfc\x25" "\x22\xbe\xea\xef\xeb\xcf\xda\xa5\x4e\x77\x1a\x00\x78\x40\xe9\xf7\x49\x6b" "\xfd\xaf\xd3\x43\xa7\x06\x37\x5e\x3d\x90\xfc\xda\x9f\xef\x23\xe2\xe5\xb7" "\x2e\xbd\xb9\x34\x5e\xaf\x2f\x94\xb2\xf3\x3f\xad\x9d\xaf\xdf\x6c\x9d\x1f" "\xed\x44\xff\x01\x80\xed\xac\xe6\xe9\xd5\x3c\xbe\xea\xce\xed\x6b\x13\xab" "\xdb\x5e\xf6\xe7\x87\x27\x9a\x8b\x8b\xde\x1f\xbf\x37\x7a\xf3\xfd\x40\xf4" "\x45\xc4\xa1\x3b\x49\xab\xdd\x94\xbd\x5f\xe9\xd9\x85\xf8\xd7\x6f\x44\xc4" "\x3f\x36\x8b\x9f\xe4\xb5\x91\xe1\xd6\xca\xa7\x1b\xe3\x67\xb1\x8f\xec\x69" "\xfc\xf4\x9e\xf8\x69\x7e\xad\xb9\xcf\xbe\x17\x7f\xdb\x85\xbe\x40\xb7\xb9" "\x95\xcd\x3f\x17\x36\xbb\xff\xd2\x38\x9e\xef\x37\xbf\xff\x07\xf2\x19\xea" "\xc1\xb5\x9f\xff\xd2\xb5\xf9\xaf\xa7\xcd\xfc\x77\x7c\xa7\x63\xfc\x74\xe8" "\xe9\xb6\xf1\x6f\x44\xfc\xab\x77\xd3\xf9\xbf\x67\x35\x7e\xd2\x26\xfe\xa9" "\x1d\xc6\xff\xae\xfa\xcd\x6b\xed\xae\x35\xde\x89\x38\xbd\x69\xfe\x49\xee" "\x89\x55\xac\xcf\xce\x17\x6b\xcb\x2b\x67\xa7\x67\xc7\xa7\xca\x53\xe5\xb9" "\xd1\x91\xb1\xf3\x63\xa5\x73\xa5\x52\xa9\x98\xd7\xa8\x8b\xab\x95\xea\xfb" "\x3d\xfe\xc6\x97\xaf\x6c\x35\xfe\x43\x6d\xe2\x0f\x6c\x33\xfe\xff\xee\x70" "\xfc\xdf\x7e\xfe\xe4\x27\xff\xd9\x22\xfe\xff\x4f\x6e\xfe\xfa\x1f\xdb\x22" "\x7e\x96\x13\xff\xb7\xc3\xf8\xef\x9f\xfc\xe8\xa5\x76\xd7\xb2\xf8\x93\x6d" "\xc6\xbf\xdd\xeb\x7f\x66\x87\xf1\x6f\x7d\xf1\xc1\x6f\x3b\x7c\x28\x00\xb0" "\x07\x6a\xcb\x2b\x33\xe3\x95\x4a\x79\xc1\x81\x03\x07\x0e\xd6\x0e\x3a\x3d" "\x33\x01\x0f\xdb\xdd\x9b\xbe\xd3\x3d\x01\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\xda\xd9\x8b\x7f\x27\xea\xf4\x18\x01\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8" "\xbf\x7e\x0f\x00\x00\xff\xff\x27\x0c\xdc\x75", 1181); syz_mount_image(/*fs=*/0x200004c0, /*dir=*/0x20000500, /*flags=*/0, /*opts=*/0x20000540, /*chdir=*/1, /*size=*/0x49c, /*img=*/0x20000580); memcpy((void*)0x200002c0, "/sys/power/resume", 17); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*dir=*/0x200002c0ul, /*flags=*/0x141a82ul, /*mode=*/0ul); if (res != -1) r[0] = res; sprintf((char*)0x20000040, "0x%016llx", (long long)0x700); syscall(__NR_write, /*fd=*/r[0], /*buf=*/0x20000040ul, /*len=*/0x12ul); } 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; }