// https://syzkaller.appspot.com/bug?id=1680b22e0e5eb9245a6faff10221ed76b8c5eb81 // 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 #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_quotactl_fd #define __NR_quotactl_fd 443 #endif static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } //% This code is derived from puff.{c,h}, found in the zlib development. The //% original files come with the following copyright notice: //% Copyright (C) 2002-2013 Mark Adler, all rights reserved //% version 2.3, 21 Jan 2013 //% This software is provided 'as-is', without any express or implied //% warranty. In no event will the author be held liable for any damages //% arising from the use of this software. //% Permission is granted to anyone to use this software for any purpose, //% including commercial applications, and to alter it and redistribute it //% freely, subject to the following restrictions: //% 1. The origin of this software must not be misrepresented; you must not //% claim that you wrote the original software. If you use this software //% in a product, an acknowledgment in the product documentation would be //% appreciated but is not required. //% 2. Altered source versions must be plainly marked as such, and must not be //% misrepresented as being the original software. //% 3. This notice may not be removed or altered from any source distribution. //% Mark Adler madler@alumni.caltech.edu //% BEGIN CODE DERIVED FROM puff.{c,h} #define MAXBITS 15 #define MAXLCODES 286 #define MAXDCODES 30 #define MAXCODES (MAXLCODES + MAXDCODES) #define FIXLCODES 288 struct puff_state { unsigned char* out; unsigned long outlen; unsigned long outcnt; const unsigned char* in; unsigned long inlen; unsigned long incnt; int bitbuf; int bitcnt; jmp_buf env; }; static int puff_bits(struct puff_state* s, int need) { long val = s->bitbuf; while (s->bitcnt < need) { if (s->incnt == s->inlen) longjmp(s->env, 1); val |= (long)(s->in[s->incnt++]) << s->bitcnt; s->bitcnt += 8; } s->bitbuf = (int)(val >> need); s->bitcnt -= need; return (int)(val & ((1L << need) - 1)); } static int puff_stored(struct puff_state* s) { s->bitbuf = 0; s->bitcnt = 0; if (s->incnt + 4 > s->inlen) return 2; unsigned len = s->in[s->incnt++]; len |= s->in[s->incnt++] << 8; if (s->in[s->incnt++] != (~len & 0xff) || s->in[s->incnt++] != ((~len >> 8) & 0xff)) return -2; if (s->incnt + len > s->inlen) return 2; if (s->outcnt + len > s->outlen) return 1; for (; len--; s->outcnt++, s->incnt++) { if (s->in[s->incnt]) s->out[s->outcnt] = s->in[s->incnt]; } return 0; } struct puff_huffman { short* count; short* symbol; }; static int puff_decode(struct puff_state* s, const struct puff_huffman* h) { int first = 0; int index = 0; int bitbuf = s->bitbuf; int left = s->bitcnt; int code = first = index = 0; int len = 1; short* next = h->count + 1; while (1) { while (left--) { code |= bitbuf & 1; bitbuf >>= 1; int count = *next++; if (code - count < first) { s->bitbuf = bitbuf; s->bitcnt = (s->bitcnt - len) & 7; return h->symbol[index + (code - first)]; } index += count; first += count; first <<= 1; code <<= 1; len++; } left = (MAXBITS + 1) - len; if (left == 0) break; if (s->incnt == s->inlen) longjmp(s->env, 1); bitbuf = s->in[s->incnt++]; if (left > 8) left = 8; } return -10; } static int puff_construct(struct puff_huffman* h, const short* length, int n) { int len; for (len = 0; len <= MAXBITS; len++) h->count[len] = 0; int symbol; for (symbol = 0; symbol < n; symbol++) (h->count[length[symbol]])++; if (h->count[0] == n) return 0; int left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= h->count[len]; if (left < 0) return left; } short offs[MAXBITS + 1]; offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + h->count[len]; for (symbol = 0; symbol < n; symbol++) if (length[symbol] != 0) h->symbol[offs[length[symbol]]++] = symbol; return left; } static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode, const struct puff_huffman* distcode) { static const short lens[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; static const short dists[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; static const short dext[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; int symbol; do { symbol = puff_decode(s, lencode); if (symbol < 0) return symbol; if (symbol < 256) { if (s->outcnt == s->outlen) return 1; if (symbol) s->out[s->outcnt] = symbol; s->outcnt++; } else if (symbol > 256) { symbol -= 257; if (symbol >= 29) return -10; int len = lens[symbol] + puff_bits(s, lext[symbol]); symbol = puff_decode(s, distcode); if (symbol < 0) return symbol; unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]); if (dist > s->outcnt) return -11; if (s->outcnt + len > s->outlen) return 1; while (len--) { if (dist <= s->outcnt && s->out[s->outcnt - dist]) s->out[s->outcnt] = s->out[s->outcnt - dist]; s->outcnt++; } } } while (symbol != 256); return 0; } static int puff_fixed(struct puff_state* s) { static int virgin = 1; static short lencnt[MAXBITS + 1], lensym[FIXLCODES]; static short distcnt[MAXBITS + 1], distsym[MAXDCODES]; static struct puff_huffman lencode, distcode; if (virgin) { lencode.count = lencnt; lencode.symbol = lensym; distcode.count = distcnt; distcode.symbol = distsym; short lengths[FIXLCODES]; int symbol; for (symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; for (; symbol < 256; symbol++) lengths[symbol] = 9; for (; symbol < 280; symbol++) lengths[symbol] = 7; for (; symbol < FIXLCODES; symbol++) lengths[symbol] = 8; puff_construct(&lencode, lengths, FIXLCODES); for (symbol = 0; symbol < MAXDCODES; symbol++) lengths[symbol] = 5; puff_construct(&distcode, lengths, MAXDCODES); virgin = 0; } return puff_codes(s, &lencode, &distcode); } static int puff_dynamic(struct puff_state* s) { static const short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; int nlen = puff_bits(s, 5) + 257; int ndist = puff_bits(s, 5) + 1; int ncode = puff_bits(s, 4) + 4; if (nlen > MAXLCODES || ndist > MAXDCODES) return -3; short lengths[MAXCODES]; int index; for (index = 0; index < ncode; index++) lengths[order[index]] = puff_bits(s, 3); for (; index < 19; index++) lengths[order[index]] = 0; short lencnt[MAXBITS + 1], lensym[MAXLCODES]; struct puff_huffman lencode = {lencnt, lensym}; int err = puff_construct(&lencode, lengths, 19); if (err != 0) return -4; index = 0; while (index < nlen + ndist) { int symbol; int len; symbol = puff_decode(s, &lencode); if (symbol < 0) return symbol; if (symbol < 16) lengths[index++] = symbol; else { len = 0; if (symbol == 16) { if (index == 0) return -5; len = lengths[index - 1]; symbol = 3 + puff_bits(s, 2); } else if (symbol == 17) symbol = 3 + puff_bits(s, 3); else symbol = 11 + puff_bits(s, 7); if (index + symbol > nlen + ndist) return -6; while (symbol--) lengths[index++] = len; } } if (lengths[256] == 0) return -9; err = puff_construct(&lencode, lengths, nlen); if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) return -7; short distcnt[MAXBITS + 1], distsym[MAXDCODES]; struct puff_huffman distcode = {distcnt, distsym}; err = puff_construct(&distcode, lengths + nlen, ndist); if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) return -8; return puff_codes(s, &lencode, &distcode); } static int puff(unsigned char* dest, unsigned long* destlen, const unsigned char* source, unsigned long sourcelen) { struct puff_state s = { .out = dest, .outlen = *destlen, .outcnt = 0, .in = source, .inlen = sourcelen, .incnt = 0, .bitbuf = 0, .bitcnt = 0, }; int err; if (setjmp(s.env) != 0) err = 2; else { int last; do { last = puff_bits(&s, 1); int type = puff_bits(&s, 2); err = type == 0 ? puff_stored(&s) : (type == 1 ? puff_fixed(&s) : (type == 2 ? puff_dynamic(&s) : -1)); if (err != 0) break; } while (!last); } *destlen = s.outcnt; return err; } //% END CODE DERIVED FROM puff.{c,h} #define ZLIB_HEADER_WIDTH 2 static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcelen, int dest_fd) { if (sourcelen < ZLIB_HEADER_WIDTH) return 0; source += ZLIB_HEADER_WIDTH; sourcelen -= ZLIB_HEADER_WIDTH; const unsigned long max_destlen = 132 << 20; void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); if (ret == MAP_FAILED) return -1; unsigned char* dest = (unsigned char*)ret; unsigned long destlen = max_destlen; int err = puff(dest, &destlen, source, sourcelen); if (err) { munmap(dest, max_destlen); errno = -err; return -1; } if (write(dest_fd, dest, destlen) != (ssize_t)destlen) { munmap(dest, max_destlen); return -1; } return munmap(dest, 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 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[1] = {0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; memcpy((void*)0x200004c0, "ext4\000", 5); memcpy((void*)0x20000500, "./file0\000", 8); memcpy( (void*)0x20000540, "\x78\x9c\xec\xdd\xc1\x6f\x1b\x59\x19\x00\xf0\x6f\x26\x49\x93\xcd\x66\x37" "\x59\xd8\x03\x20\x60\xcb\xb2\x50\x50\x55\x3b\x71\xb7\x51\xd5\x0b\xe5\x02" "\x42\x55\x25\x44\xc5\x89\x43\x1b\x12\x37\x8a\x62\xc7\x51\xec\x94\x26\xf4" "\x90\xfe\x0f\x48\x54\xe2\x04\x7f\x02\x07\x24\x0e\x48\x3d\x71\xe7\x06\x37" "\x38\x94\x03\x52\x81\x0a\xd4\x20\x71\x30\x9a\xf1\x24\x4d\x13\x3b\x0d\x6d" "\x6a\x4b\xf1\xef\x27\x3d\xcd\xbc\x79\xae\xbf\xf7\x3a\x9a\xf7\xdc\xaf\x89" "\x5f\x00\x43\xeb\x7c\x44\xec\x44\xc4\xb9\x88\xb8\x13\x11\xd3\xc5\xf5\xa4" "\x28\x71\xbd\x53\xb2\xd7\x3d\x7f\xf6\x60\x71\xf7\xd9\x83\xc5\x24\xda\xed" "\x5b\xff\x48\xf2\xf6\xec\x5a\x1c\xf8\x33\x99\x77\x8b\xf7\x9c\x88\x88\x1f" "\x7c\x37\xe2\xc7\xc9\xd1\xb8\xcd\xad\xed\xd5\x85\x5a\xad\xba\x51\xd4\xcb" "\xad\xfa\x7a\xb9\xb9\xb5\x7d\x69\xa5\xbe\xb0\x5c\x5d\xae\xae\x55\x2a\xf3" "\x73\xf3\xb3\x57\x2f\x5f\xa9\x9c\xda\x58\x3f\xaa\xff\xfa\xe9\x77\x56\x6e" "\xfc\xf0\x77\xbf\xfd\xd2\x93\x3f\xec\x7c\xf3\xa7\x59\xb7\xa6\x8a\xb6\x83" "\xe3\x38\x4d\x9d\xa1\x8f\xed\xc7\xc9\x8c\x46\xc4\x8d\xb7\x11\x6c\x00\x46" "\x8a\xf1\x9c\x1b\x74\x47\x78\x2d\x69\x44\x7c\x26\x22\x3e\x2e\x9e\xff\x91" "\xfc\x6e\x02\x00\x67\x59\xbb\x3d\x1d\xed\xe9\x83\x75\x00\xe0\xac\x4b\xf3" "\x1c\x58\x92\x96\x8a\x5c\xc0\x54\xa4\x69\xa9\xd4\xc9\xe1\x7d\x18\x93\x69" "\xad\xd1\x6c\x5d\xbc\xdb\xd8\x5c\x5b\xea\xe4\xca\x66\x62\x2c\xbd\xbb\x52" "\xab\xce\x16\xb9\xc2\x99\x18\x4b\xb2\xfa\x5c\x7e\xfe\xa2\x5e\x39\x54\xbf" "\x1c\x11\x1f\x44\xc4\xcf\xc6\xdf\xc9\xeb\xa5\xc5\x46\x6d\x69\x90\x1f\x7c" "\x00\x60\x88\xbd\x7b\x68\xfd\xff\xf7\x78\x67\xfd\x07\x00\xce\xb8\x89\x41" "\x77\x00\x00\xe8\x3b\xeb\x3f\x00\x0c\x1f\xeb\x3f\x00\x0c\x1f\xeb\x3f\x00" "\x0c\x1f\xeb\x3f\x00\x0c\x1f\xeb\x3f\x00\x0c\x1f\xeb\x3f\x00\x0c\x95\xef" "\xdf\xbc\x99\x95\xf6\x6e\xf1\xfd\xd7\x4b\xf7\xb6\x36\x57\x1b\xf7\x2e\x2d" "\x55\x9b\xab\xa5\xfa\xe6\x62\x69\xb1\xb1\xb1\x5e\x5a\x6e\x34\x96\xf3\xef" "\xec\xa9\xbf\xea\xfd\x6a\x8d\xc6\xfa\xdc\xa7\xb1\x79\xbf\xdc\xaa\x36\x5b" "\xe5\xe6\xd6\xf6\xed\x7a\x63\x73\xad\x75\x3b\xff\x5e\xef\xdb\xd5\xb1\xbe" "\x8c\x0a\x00\x38\xce\x07\x1f\x3d\xfe\x53\x12\x11\x3b\xd7\xde\xc9\x4b\x1c" "\xd8\xcb\xc1\x5a\x0d\x67\x5b\x3a\xe8\x0e\x00\x03\x33\x32\xe8\x0e\x00\x03" "\x63\xb7\x2f\x18\x5e\xfe\x8d\x0f\x74\xd9\xa2\xf7\x25\x3d\x7f\x44\xe8\xd1" "\xe9\xf7\x05\xe8\x8f\x0b\x9f\x97\xff\x87\x61\x75\x7c\xfe\xff\x2f\x7d\xeb" "\x07\xd0\x7f\xaf\x97\xff\xff\xd6\xa9\xf7\x03\xe8\x3f\xf9\x7f\x18\x5e\xed" "\x76\x62\xcf\x7f\x00\x18\x32\x72\xfc\x80\xff\xff\x07\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x80\xff\xdf\x54\x5e\x92\xb4\x54\xec\x05\x3e\x15\x69\x5a\x2a\x45\xbc\x17" "\x11\x33\x31\x96\xdc\x5d\xa9\x55\x67\x23\xe2\xfd\x88\xf8\xe3\xf8\xd8\x78" "\x56\x9f\x1b\x74\xa7\x01\x80\x37\x94\xfe\x2d\x29\xf6\xff\xba\x30\xfd\xc9" "\xd4\xe1\xd6\x73\xc9\x7f\xc6\xf3\x63\x44\xfc\xe4\x17\xb7\x7e\x7e\x7f\xa1" "\xd5\xda\x98\xcb\xae\xff\x73\xff\x7a\xeb\x51\x71\xbd\x32\x88\xfe\x03\x00" "\xaf\xb2\xb7\x4e\xef\xad\xe3\x7b\x9e\x3f\x7b\xb0\xb8\x57\xfa\xd9\x9f\xa7" "\xdf\xee\x6c\x2e\x9a\xc5\xdd\x2d\x4a\xa7\x65\x34\x46\xf3\xe3\x44\x8c\x45" "\xc4\xe4\xbf\x92\xa2\xde\x91\x7d\x5e\x19\x39\x85\xf8\x3b\x0f\x23\xe2\x73" "\xdd\xc6\x9f\xe4\xb9\x91\x99\x62\xe7\xd3\xc3\xf1\xb3\xd8\xef\xf5\x35\x7e" "\xfa\x52\xfc\x34\x6f\xeb\x1c\xb3\xbf\x8b\xcf\x9e\x42\x5f\x60\xd8\x3c\xce" "\xe6\x9f\xeb\xdd\x9e\xbf\x34\xce\xe7\xc7\xee\xcf\xff\x44\x3e\x43\xbd\xb9" "\xbd\xf9\x6f\xf7\xc8\xfc\x97\xee\xcf\x7f\x23\x3d\xe6\xbf\xf3\x27\x8d\xf1" "\xe9\xef\xbf\x77\xe4\x62\x7b\xba\xd3\xf6\x30\xe2\x0b\xa3\xdd\xe2\x27\xfb" "\xf1\x93\x1e\xf1\x3f\x39\x61\xfc\x3f\x7f\xf1\xcb\x1f\xf7\x6a\x6b\xff\x32" "\xe2\x42\x74\x8d\x9f\x1c\x8c\x55\x6e\xd5\xd7\xcb\xcd\xad\xed\x4b\x2b\xf5" "\x85\xe5\xea\x72\x75\xad\x52\x99\x9f\x9b\x9f\xbd\x7a\xf9\x4a\xa5\x9c\xe7" "\xa8\xcb\x7b\x99\xea\xa3\xfe\x7e\xed\xe2\xfb\xbd\xe2\x67\xe3\x9f\xec\x1e" "\xbf\xb8\xf3\xbd\xc7\xff\xb5\x13\x8e\xff\x57\xff\xbd\xf3\xa3\xaf\x1c\x13" "\xff\x1b\x5f\xed\x7e\xff\x3f\x3c\x26\x7e\xb6\x26\x7e\xfd\x84\xf1\x17\x26" "\x7f\xd3\x73\xfb\xee\x2c\xfe\x52\x8f\xf1\xef\xdd\xff\xe8\x31\xfe\x8b\x27" "\x8c\xff\xe4\xaf\xdb\x4b\x27\x7c\x29\x00\xd0\x07\xcd\xad\xed\xd5\x85\x5a" "\xad\xba\xe1\xc4\x89\x13\x27\xfb\x27\x83\x9e\x99\x80\xb7\xed\xc5\x43\x3f" "\xe8\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\xf4\xe3\xd7" "\x89\x06\x3d\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xae\xff\x05\x00\x00\xff\xff" "\x3b\xf3\xdb\x60", 1210); syz_mount_image(0x200004c0, 0x20000500, 0x4004, 0x20000080, -1, 0x4ba, 0x20000540); memcpy((void*)0x200000c0, "msdos\000", 6); memcpy((void*)0x20000000, ".\000", 2); memcpy( (void*)0x20000300, "\x00\x23\x78\x97\x28\x31\x6a\xe2\xc3\x56\x75\xdf\x5d\x74\xab\x63\xca\x2d" "\xf6\xe4\x90\xfe\xdb\x63\x6a\xf3\xbc\x86\xff\x7e\x0b\xb5\x9e\xbb\x41\xc3" "\x2a\xe9\xfc\x3d\x13\xfd\x30\x64\xea\x09\xd0\x1f\x0c\x8d\x3e\x2c\x55\x1f" "\xb8\xea\x44\x7d\x7b\xc4\x8a\x16\xe2\xe8\x47\x25\xa8\xbb\x51\x74\x34\xf6" "\x1a\xa0\xee\x29\x3a\x5a\x3f\x94\x43\x90\x80\x34\xa6\xa0\xda\x6a\x16\x52" "\x27\x01\xeb\xba\x58\x8e\x24\x5e\xae\x85\x35\xbf\xea\x86\x24\xad\xf6\xc9" "\x16\x4a\xe6\xca\x8a\x3a\x2a\x2a\x08\x52\xaa\xa2\xb8\x2e\x55\xba\xdb\x8a" "\x97\x4d\x5e\x2a\xf8\xad\x7f\x50\xa6\xad\x78\x8e\x33\xa7\x0b\x48\xb9\xeb" "\xe0\x71\xc6\x10\x46\x63\x6e\xb3\x69\x9e\xe7\x56\xd8\x4f\x77\x1d\x45\x85" "\x47\xe0\x89\x68\x04\x16\x90\xb2\x90\x22\x0b\x58\x91\x0b\xf8\xb2\x3b\xe9" "\x17\x7d\x5e\x0e\x7e\xb0\x07\x85\x93", 189); syz_mount_image(0x200000c0, 0x20000000, 0x18085a1, 0x20000300, 1, 0, 0x20000000); memcpy((void*)0x200000c0, "msdos\000", 6); memcpy((void*)0x20000000, ".\000", 2); memcpy( (void*)0x200001c0, "\x00\x80\xee\x76\x51\x7b\xa0\x16\x1f\xb0\xfe\x36\x56\x9b\x03\x8b\xc1\x06" "\xee\x85\xc4\x30\xa4\x4c\x94\xbd\x9b\xa8\x4f\xa8\x10\x4e\x71\xde\x5c\xd3" "\x49\x87\x34\x03\xd2\x00\x2f\x2d\xbb\x4c\x88\x49\x92\x36\x94\xc3\x5a\x25" "\x2a\xfa\xc4\x97\x8a\x1f\x26\x8c\xe7\x50\x0f\xdd\x54\x6b\x02\x64\xb4\x16" "\x8b\xb6\xbe\xab\xa8\x1d\xc1\x7f\x86\xe5\xc2\x60\xfc\x19\x0c\xb3\xfc\xd6" "\x33\x8a\x8a\xb6\x14\x79\x28\xe7\xb6\xba\x3f\x0b\xce\xca\x45\x6e\x1f\xfb" "\x65\xad\x84\x40\xe1\x8f\x63\x4d\xa9\x66\x97\xb0\x76\xa4\x7b\xb6\xa5\x9c" "\x82\x58\xf8\xfe\x61\x53\x8e\x86\x8e\x23\x4f\x48\x85\x9a\xf6\xa5\x62\x96" "\xec\x2f\xa0\x38\x43\x52\xb2\x09\xbc\x94\x97\xa0\xae\xac\xb4\x85\x6a\x22" "\x4a\x5d\x4e\x2f\x5b\x69\x73\x0a\x26\xd3\x04\xcb\x62\x72\xa1\x2f\x8a\x57" "\x40\x21\x52\xd6\x5e\x90\xe2\x25\xf2\x3c\x68\x2e\x1c\x57\x2f\xa7\x70\x1c" "\x58\xed\x94\x07\xf2\xb0\x23\x13\x38\xfb\xb4\x1f\x1a\xdd\xd9\x4d\xfa\xae" "\xa8\xf7\x44\xe6\x83\x6e\x51\xf4\xa5\x85\xbc\xb5\xa3\xb9\xbd\x4a\x7c\xde" "\x4a\x24\x38\xff\x4f\x27\x9e\xa9\x00\x74\x9d\x92\xbd\x22\x0a\x46\xe3\x6a" "\x11\x83\x12\xfa\x42\xee\xaf\x4a\xd2\x92\x55\x0f\xb9\xbd\x7f\xcc\xf5\x7f" "\xdf\x3e\x9f\xe0\x00\x48\x66", 277); syz_mount_image(0x200000c0, 0x20000000, 0x1b88060, 0x200001c0, 1, 0, 0x20000000); memcpy((void*)0x200001c0, "cgroup.controllers\000", 19); res = syscall(__NR_openat, 0xffffff9c, 0x200001c0ul, 0x275aul, 0ul); if (res != -1) r[0] = res; syscall(__NR_quotactl_fd, r[0], 0xffffffff80000602ul, 0, 0ul); } 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); for (procid = 0; procid < 6; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }