// https://syzkaller.appspot.com/bug?id=973ab6d3828f5da0aeed4da2d09c9e04643fa996 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; 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); intptr_t res = 0; memcpy((void*)0x200000c0, "./file0\000", 8); syscall(__NR_mkdirat, 0xffffff9c, 0x200000c0ul, 0ul); memcpy((void*)0x20000300, "./file0\000", 8); memcpy((void*)0x20000340, "cgroup\000", 7); syscall(__NR_mount, 0x20000100ul, 0x20000300ul, 0x20000340ul, 0ul, 0ul); memcpy((void*)0x200003c0, "./file0/file0\000", 14); syscall(__NR_mkdir, 0x200003c0ul, 0ul); memcpy((void*)0x20000000, "./file0\000", 8); syscall(__NR_chdir, 0x20000000ul); memcpy((void*)0x20000080, "./file0\000", 8); res = syscall(__NR_open, 0x20000080ul, 0ul, 0ul); if (res != -1) r[0] = res; memcpy((void*)0x200000c0, ".\000", 2); syscall(__NR_unlinkat, r[0], 0x200000c0ul, 0x200ul); memcpy((void*)0x200000c0, "./file0\000", 8); syscall(__NR_mkdirat, 0xffffff9c, 0x200000c0ul, 0ul); memcpy((void*)0x200000c0, ".\000", 2); syscall(__NR_unlinkat, r[0], 0x200000c0ul, 0x200ul); return 0; }