// https://syzkaller.appspot.com/bug?id=2eb39f9063a72cd5eed7331fd431b561f4e2fb1b // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include static uintptr_t syz_open_procfs(uintptr_t a0, uintptr_t a1) { char buf[128]; memset(buf, 0, sizeof(buf)); if (a0 == 0) { snprintf(buf, sizeof(buf), "/proc/self/%s", (char*)a1); } else if (a0 == (uintptr_t)-1) { snprintf(buf, sizeof(buf), "/proc/thread-self/%s", (char*)a1); } else { snprintf(buf, sizeof(buf), "/proc/self/task/%d/%s", (int)a0, (char*)a1); } int fd = open(buf, O_RDWR); if (fd == -1) fd = open(buf, O_RDONLY); return fd; } long r[19]; void loop() { memset(r, -1, sizeof(r)); r[0] = syscall(__NR_mmap, 0x20000000ul, 0xfff000ul, 0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul); *(uint64_t*)0x20593000 = (uint64_t)0x0; *(uint32_t*)0x20593008 = (uint32_t)0x22; *(uint32_t*)0x2059300c = (uint32_t)0x3; *(uint64_t*)0x20593010 = (uint64_t)0x20552000; *(uint64_t*)0x20593018 = (uint64_t)0x20c81000; *(uint64_t*)0x20593020 = (uint64_t)0x0; *(uint64_t*)0x20593028 = (uint64_t)0x0; *(uint64_t*)0x20593030 = (uint64_t)0x0; *(uint64_t*)0x20593038 = (uint64_t)0x0; *(uint64_t*)0x20593040 = (uint64_t)0x0; *(uint64_t*)0x20593048 = (uint64_t)0x0; *(uint64_t*)0x20593050 = (uint64_t)0x0; *(uint64_t*)0x20593058 = (uint64_t)0x0; r[14] = syscall(__NR_timer_create, 0x2ul, 0x20593000ul, 0x20755ffcul); memcpy((void*)0x204e0000, "\x74\x69\x6d\x65\x72\x73\x00", 7); r[16] = syz_open_procfs(0x0ul, 0x204e0000ul); *(uint64_t*)0x20480ff8 = (uint64_t)0x801; r[18] = syscall(__NR_sendfile, r[16], r[16], 0x20480ff8ul, 0xfful); } int main() { loop(); return 0; }