// https://syzkaller.appspot.com/bug?id=765cc4b30a90c3561f0743fdaaf96e3e9b1a1ff3 // 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 319 #endif static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; for (;;) { uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts); if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) return 1; now = current_time_ms(); if (now - start > timeout) return 0; } } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } struct fs_image_segment { void* data; uintptr_t size; uintptr_t offset; }; static int setup_loop_device(long unsigned size, long unsigned nsegs, struct fs_image_segment* segs, const char* loopname, int* memfd_p, int* loopfd_p) { int err = 0, loopfd = -1; int memfd = syscall(__NR_memfd_create, "syzkaller", 0); if (memfd == -1) { err = errno; goto error; } if (ftruncate(memfd, size)) { err = errno; goto error_close_memfd; } for (size_t i = 0; i < nsegs; i++) { if (pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset) < 0) { } } 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; } } *memfd_p = 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 unsigned long size, volatile unsigned long nsegs, volatile long segments, volatile long flags, volatile long optsarg, volatile long change_dir) { struct fs_image_segment* segs = (struct fs_image_segment*)segments; int res = -1, err = 0, loopfd = -1, memfd = -1, need_loop_device = !!segs; 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(size, nsegs, segs, loopname, &memfd, &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) { if (strstr(opts, "errors=panic") || strstr(opts, "errors=remount-ro") == 0) 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); close(memfd); } errno = err; return res; } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; retry: while (umount2(dir, MNT_DETACH | UMOUNT_NOFOLLOW) == 0) { } dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exit(1); } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); while (umount2(filename, MNT_DETACH | UMOUNT_NOFOLLOW) == 0) { } struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EPERM) { int fd = open(filename, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exit(1); if (umount2(filename, MNT_DETACH | UMOUNT_NOFOLLOW)) exit(1); } } closedir(dp); for (int i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EPERM) { int fd = open(dir, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, MNT_DETACH | UMOUNT_NOFOLLOW)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void reset_loop() { char buf[64]; snprintf(buf, sizeof(buf), "/dev/loop%llu", procid); int loopfd = open(buf, O_RDWR); if (loopfd != -1) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); if (symlink("/dev/binderfs", "./binderfs")) { } } 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 < 4; 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); if (call == 2) break; event_timedwait(&th->done, 50 + (call == 0 ? 50 : 0)); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { 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; } remove_dir(cwdbuf); } } void execute_call(int call) { switch (call) { case 0: memcpy((void*)0x20000000, "vfat\000", 5); memcpy((void*)0x20000080, "./file0\000", 8); *(uint64_t*)0x20000440 = 0x20000180; memcpy((void*)0x20000180, "\x60\x1c\x6d\x6b\x64\x6f\x73\x66\x90\xe6\xb1\x00\x08\x01\x01\x00" "\x04\x40\x00\x20\x00\xf8\x01\x00\x10\x00\x02\x00\x03\x00\x00\x00" "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x19\x7d\x92\xd6\xcb\xe5\xd9\x15\x00" "\x7b\xf7\xd7\xef\xdf\x73\x0c\x3d\x67\xac\x38\x9a\x1c\xda\x44\x0a" "\x25\xe1\xc3\x0c\x10\xfc\xd6\xdc", 88); *(uint64_t*)0x20000448 = 0x58; *(uint64_t*)0x20000450 = 0; *(uint64_t*)0x20000458 = 0x200004c0; memcpy( (void*)0x200004c0, "\x53\x59\x5a\x4b\x41\x4c\x4c\x45\x52\x20\x20\x08\x00\x00\x07\x60\x2c" "\x55\x2c\x55\x00\x00\x15\x60\x2c\x55\x00\x00\x00\x00\x00\x00\x41\x66" "\x00\x69\x00\x6c\x00\x65\x00\x30\x80\x0f\x00\xfc\x00\x01\x00\xff\xff" "\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xdf\xf2\xff\x46\x49\x4c\x45" "\x30\x20\x20\x20\x20\x20\x20\x10\x00\x7f\x15\x60\x2c\x55\x2c\x55\x00" "\x00\x15\x60\x2c\x55\x03\x00\x00\x00\x00\x00\x6f\x7a\x00\x69\x00\x6c" "\x00\x65\x00\x31\x00\x0f\x00\x10\x00\x00\xff\xff\xff\xff\xff\xff\xff" "\xe6\x46\x49\x4c\x45\x31\x20\x20\x20\x20\x00\x7f\x15\x60\x2c\x55\x2c" "\x55\x00\x00\x15\x60\x2c\x01\x00\x00\x00\x00\x00\x00\xae\x42\x00\x69" "\x00\x6c\x00\x65\x00\x32\x00\x0f\x00\x14\x00\x00\xff\xff\xff\xff\xff" "\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\x46\x49\x4c\x45\x32\x20" "\x20\x20\x20\x20\x20\x20\x00\x7f\x15\x60\x2c\x85\x32\xe7\xf4\x7a\xb7" "\x6b\xcb\x55\x06\x00\x28\x23\x00\x00\x41\x66\x00\x69\x00\x6c\x00\x65" "\x00\x3e\x00\x0f\xd2\xd2\x63\x00\x6f\x00\x6c\x00\x64\x00\x00\x00\xff" "\xff\x00\x00\xff\xff\xff\xff\x46\x49\x4c\x45\x7e\x31\x20\x20\x43\x4f" "\x4c\x20\x00\x7f\x15\x60\x2c\x55\x2c\x55\x00\x00\x15\x60\x2c\x55\x0b" "\x7f\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc" "\x19\x14\x59\x4e\xad\x9c\xcb\x47\x69\xa3\xd4\x16\x9f\x87\xf3\x19\x30" "\xb0\xa5\x2d\xa1\x74\x14\xbe\x0a\x1b\x27\x33\xa3\xdd\x1b\x8e\x4f\xee" "\xa2\x33\xbc\xa2\x86\x56\x04\x14\x7c\x58\xbc\x24\x5d\x00\x39\x9f\xd1" "\x06\xed\x56\x68\xca\xd4\xf5\xbf\x66\xbb\x1e\x8b\x0a\xdf\x8a\xc2\xf5" "\x14\x57\x2e\xba\x10\x56\xcf\x86\x1b\x1b\x5f\x3c\x77\xf9\xf2\x7e\x61" "\x22\xa2\x48\xe8\x7c\xa8\x7c\x58\x61\xa0\x50\x5b\x3f\xff\xd8\x64\x8d" "\xd7\xa9\x96\x78\xd1\x2d\x6c\xaf\xb0\x4a\xd5\xd6\xac\x08\x86\xd8\xf8" "\x18\xb7\x55\xcc\x84\x3d\x40\xe0\x95\xd1\x74\x11\xca\x66\x67\x14\x81" "\x4a\x24\x6a\x7d\x31\x6c\xbf\x3e\x40\x24\xeb\xcd\x62\xae\xc2\xa1\xfd" "\xac\x43\xa5\x24\x61\x4b\xad\xf8\x0c\x63\x8e\xd9\x92\x20\x62\x0f\x0a" "\x4b\xa0\x67\x03\xfc\x6f\xf8\x85\xd1\x4a\xbb\x02\xb7\x02\xac\x0b\x6e" "\xcf\x15\xd1\xd5\x91\x61\xe3\x74\x78\x21\xb2\xef\x23\x50\xbc\x29\xc6" "\x97\xce\x57\x37\xfd\xa5\x74\x02\x00\x16\xa3\xdd\x75\x2d\x96\x53\xb5" "\x05\x34\x8e\x85\xf4\x83\x1b\x52\xef\x2f\x81\x74\x32\xca\x74\xa3\xe1" "\x9f\x49\x3d\x7b\x46\xa0\x6f\xb6\xda\x92\xc8\x90\x30\xa3\xc8\x06\xe1" "\x26\x02\x01\x97\x95\x00\x62\x4e\x5f\x82\x5f\x34\x73\x4e\x76\x61\x0b" "\xd1\xba\xcb\xcb\xf3\x69\x90\x24\x74\xd7\x25\x0f\xd6\xc4\x05\x6e\x34" "\xa9\x29\x1c\x11\x9d\x3f\xcb\x63\x72\x32\x71\xc3\x61\x0a\x28\xb8\x9e" "\x68\x26\x6e\x52\x20\x63\x15\x6e\x2e\x4c\x3e\xeb\xcc\xb6\xa8\xe9\x02" "\x10\xd2\x2d\x32\x11\xe4\xc0\xe8\xf8\xfc\x32\xbf\x59\x22\x4b\x68\x69" "\xcd\xb3\xc6\x4f\xf7\x65\xfb\xdb\x48\x42\x64\xd5\x6d\xda\xd9\x60\x9e" "\xa1\x2c\x6a\x8c\xcd\x7c\x05\x73\xdd\xc2\xdb\x2a\xe3\x95\x8b\x23\xa0" "\x31\x06\x10\x18\x11\xeb\x65\x46\x50\xc8\x57\xca\xb5\xd1\x75\x15\x93" "\x29\x67\xa7\xc8\x4d\xf8\xbd\x46\xc2\x00\x4c\x18\x0b\x0a\x05\x71\xfb" "\x66\xd8\x49\x6e\xd1\x36\x23\x1c\xb6\x12\x7d\x0a\xc9\x28\x4a\x16\x19" "\x46\x03\x90\xe1\xb2\x95\x3b\xee\xb0\xbb\x15\xe3\xe7\x2c\xf6\x50\x4d" "\x93\xcd\x69\x27\x82\xf7\xe6\xab\xb0\x17\x6c\x9e\x05\x88\x0c\x7b\x8d" "\x1f\x9d\x4a\x0f\x41\x2d\x01\xd5\xfe\x6a\xd5\xfc\x34\x28\x5c\x24\xfa" "\x6e\x44\x08\xd1\xa9\x79\x0b\x5d\xa5\xfb\x65\x38\x1c\xaa\xa0\xe4\xcf" "\xed\x6b\x98\x17\xf0\xf3\x33\x2f\xc0\xc1\x5a\x22\x96\xb0\xb6\xa1", 798); *(uint64_t*)0x20000460 = 0x31e; *(uint64_t*)0x20000468 = 0x2800; *(uint64_t*)0x20000470 = 0x20000140; memcpy((void*)0x20000140, "\x00\xba\x1f\x9d\xf7\x25\x7e\xb9\x87", 9); *(uint64_t*)0x20000478 = 9; *(uint64_t*)0x20000480 = 0x4000; *(uint64_t*)0x20000488 = 0x20000100; memcpy((void*)0x20000100, "\xf8\xff\x07\x00\xf0\xff\x4f\xc4\xfe\x26\x80\x00\x09\xa0\x00\xc8" "\xa6\x00", 18); *(uint64_t*)0x20000490 = 0x12; *(uint64_t*)0x20000498 = 0x4009; *(uint64_t*)0x200004a0 = 0x200009c0; memcpy( (void*)0x200009c0, "\x73\xc0\xd2\x8b\xde\xef\xe2\x35\x25\x97\x75\xdb\xad\x79\x7a\x6b\x61" "\x6c\x6c\x65\x72\x73\x79\x7a\x6b\x61\x6c\xec\x65\x72\x65\x72\x73\x79" "\x7a\x6b\x61\x6c\x6c\x65\x6a\x73\x79\x7a\x6b\x61\x6c\x6c\x65\x72\x73" "\x79\x7a\x6b\xb6\x6c\x65\x72\x73\x79\x7a\x6b\x61\x6c\x6c\x65\x72\x53" "\x79\x7a\x6b\x61\x6c\x6c\x65\x72\x73\xee\x82\xc1\x1b\x5a\x79\x7a\x6b" "\x61\x6c\x6c\x65\x72\x73\x79\x7a\x6b\x62\x6c\x6c\xdf\xd0\x57\x65\x72" "\x73\x00\x00\x08\x00\x00\x00\x00\x00\x00\x0d\x6b\x06\x94\x7c\xb3\x42" "\x9c\xac\xcf\x7b\x04\xc1\x5b\xf7\x99\xae\x00\x29\x46\xee\x83\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\xfa\xdc\xe0\x63\x2c" "\xc3\xa2\xd1\x2b\xd4\xa1\x59\xde\xed\x7f\xbf\xb7\x2f\x6e\x54\x87\xea" "\xe6\xa9\x60\xed\xce\x55\xd5\x48\xba\x10\xd1\x36\x02\x37\x64\x1e\x2b" "\x8b\x58\xc5\x71\xd8\x60\x25\x50\x07\x02\x81\x65\xba\x1a\xe2\x70\x79" "\x77\x24\x07\x1f\xc3\xd0\xcc\x07\x3c\x7e\x13\xf7\xbb\xd2\x0e\x76\x02" "\x81\x9d\xe3\x39\xaf\x11\xf9\x9d\x9e\xaa\xe6\xc6\xa7\x13\x41\x5b\x83" "\x54\x5d\x59\xb2\x4a\xb5\xf3\x8d\x50\x24\x91\x51\x98\xba\xe4\xe0\x8b" "\x10\x29\xbc\x01\x1b\xa4\xf9\x76\x36\xbd\xc9\x88\x80\x24\x6c\xab\x8a" "\xfa\x98\xae\xa8\xfe\x88\xf5\x63\x9e\x7a\x17\x90\x36\x79\x28\xee\x02" "\x08\xd6\x15\x10\x61\x79\xd1\x36\xb4\x06\xea\x87\x0f\x32\xc2\x26\xd6", 306); *(uint64_t*)0x200004a8 = 0x132; *(uint64_t*)0x200004b0 = 0x8003; memcpy( (void*)0x20001300, "\x6e\x66\x73\x2c\x65\x72\x72\x6f\x72\x73\x3d\x63\x6f\x6e\x74\x69\x6e" "\x75\x65\x2c\x73\x68\x6f\x72\x74\x6e\x61\x6d\x65\x3d\x77\x69\x6e\x6e" "\x74\x2c\x00\xa0\xc3\x39\xe3\xdc\xf0\x0a\x1e\x54\x16\x00\x69\x46\x43" "\x9d\x2f\x70\x86\x02\x8d\x0e\xaf\xb4\xf9\xea\xd6\x48\xa7\x29\x6f\xd6" "\x31\x81\xf7\xe1\x2f\xd9\x02\x84\xec\xcb\x6e\x00\xa6\x07\xf0\x00\x00" "\x09\x00\x00\xb0\x7b\x7b\x29\x00\x00\x00\x00\x00\x20\x6d\xdf\x4d\xce" "\xb8\xca\x36\xed\xab\x63\x70\x31\xb6\xfe\x1a\x7b\x91\x65\xb3\x0c\x37" "\x8b\x67\xbf\x60\xc4\x81\xe6\x74\x30\x3c\x23\x7d\x20\xcb\x8e\x33\xb7" "\x9d\xda\xe8\xae\x65\xc6\x94\x3b\xab\x01\x66\xd7\x51\xa8\x7e\x3e\xbe" "\x15\x68\xec\x42\x84\x5c\x0a\xe6\x7d\x9d\xb4\x02\xa6\x66\xbc\xbe\xc5" "\xf6\xfa\x4e\x67\xed\xf1\xf1\x3c\xd6\x32\x54\xc0\x77\x07\xc2\xd5\xe3" "\x9b\xd3\xcb\x6a\xe2\x60\x3b\xe9\x02\x81\x0b\xbe\xeb\xec\xa3\xca\x29" "\xa4\xd4\x82\xb6\xc3\x46\x99\x13\x0f\x47\xcc\x27\xdc\x3f\xaf\xb3\x7a" "\x8b\xb5\x46\x97\x4a\x55\xfa\x2f\xf1\x5a\x55\xe6\x9d\x09\xaa\xb7\xda" "\x46\x5e\xdd\x83\x4d\x70\xec\x52\xa2\x0e\xdc\xf1\x1a\x19\x39\x3f\x27" "\xcf\x28\x93\x18\xde\x35\x54\xf8\x26\x44\x43\x9c\x4c\xe6\x4d\xe3\x3b" "\x10\x48\x40\x40\x1d\x8f\xfe\x96\x73\x1d\xdd\xaa\x96\x78\xf9\x6c\x12" "\x74\x31\x9e\x13\xa6\x20\xfe\x84\x5c\x24\xc7\x2c\x51\x7b\x66\x4f\xbf" "\x74\x5f\x32\xdf\xed\x4c\x28\x2b\x65\xaf\x46\x22\x0e\xfc\xde\xae\x6a" "\xb4\x76\x48\xb0\xac\xb2\xc8\x7d\x29\x5c\x88\xb3\x20\x6c\x42\x49\xab" "\x3f\xcc\x48\x0c\xed\x1c\xb4\x98\xe7\x82\x8c\xed\xe2\xe5\x7c\x61\x60" "\xf5\x20\xea\x96", 361); syz_mount_image(0x20000000, 0x20000080, 0x8135, 5, 0x20000440, 0x8010, 0x20001300, 1); break; case 1: memcpy((void*)0x20000240, "./file1\000", 8); syscall(__NR_mkdir, 0x20000240ul, 0ul); break; case 2: memcpy((void*)0x20000040, "./file1/file0\000", 14); syscall(__NR_mkdir, 0x20000040ul, 0ul); { int i; for (i = 0; i < 64; i++) { syscall(__NR_mkdir, 0x20000040ul, 0ul); } } break; case 3: memcpy((void*)0x20000300, "./file0/file0\000", 14); syscall(__NR_rmdir, 0x20000300ul); { int i; for (i = 0; i < 64; i++) { syscall(__NR_rmdir, 0x20000300ul); } } 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); use_temporary_dir(); loop(); return 0; }