// https://syzkaller.appspot.com/bug?id=4a8bc3f07c940ddaa40ba0a04fa483f8e5996890 // 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, /*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); intptr_t res = 0; memcpy((void*)0x20000100, "cpuset.effective_cpus\000", 22); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000100ul, /*flags=*/0x275aul, /*mode=*/0ul); memcpy((void*)0x20000100, "cpuset.effective_cpus\000", 22); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000100ul, /*flags=*/0x275aul, /*mode=*/0ul); memcpy((void*)0x20000240, "./file0\000", 8); syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x20000240ul, /*mode=*/0ul); memcpy((void*)0x20000200, "./file1\000", 8); syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x20000200ul, /*mode=*/0ul); memcpy((void*)0x200000c0, "./file0\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000c0ul, /*flags=*/0ul, /*mode=*/0ul); if (res != -1) r[0] = res; memcpy((void*)0x20000180, "./file0\000", 8); syscall(__NR_mknodat, /*dirfd=*/r[0], /*file=*/0x20000180ul, /*mode=*/0ul, /*dev=*/0); memcpy((void*)0x200000c0, "./bus\000", 6); syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x200000c0ul, /*mode=*/0ul); memcpy((void*)0x20000340, "./bus\000", 6); memcpy((void*)0x200002c0, "overlay\000", 8); memcpy((void*)0x20000080, "workdir=./file1,lowerdir=./file0,upperdir=./bus,index=on", 56); syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x20000340ul, /*type=*/0x200002c0ul, /*flags=*/0ul, /*opts=*/0x20000080ul); memcpy((void*)0x20000100, "./bus\000", 6); syscall(__NR_chdir, /*dir=*/0x20000100ul); memcpy((void*)0x200000c0, "./file0\000", 8); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000c0ul, /*flags=*/0x43ul, /*mode=*/0ul); return 0; }