// https://syzkaller.appspot.com/bug?id=f2eb888197960823e1b5856e93918bdb6fd32090 // 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, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x20000000, "./file0\000", 8); syscall(__NR_mkdir, 0x20000000ul, 0ul); memcpy((void*)0x20000080, "./file0\000", 8); memcpy((void*)0x20000040, "hugetlbfs\000", 10); syscall(__NR_mount, 0ul, 0x20000080ul, 0x20000040ul, 0ul, 0ul); memcpy((void*)0x20000300, "./file0\000", 8); syscall(__NR_chdir, 0x20000300ul); memcpy((void*)0x20000240, "./file1\000", 8); syscall(__NR_mkdir, 0x20000240ul, 0ul); memcpy((void*)0x20000300, "./bus\000", 6); syscall(__NR_mkdir, 0x20000300ul, 0ul); memcpy((void*)0x20000280, "./file0\000", 8); syscall(__NR_mkdir, 0x20000280ul, 0ul); memcpy((void*)0x20000000, "./bus\000", 6); memcpy((void*)0x20000400, "overlay\000", 8); memcpy((void*)0x20000300, "lowerdir=./bus,workdir=./file1,upperdir=./file0", 47); syscall(__NR_mount, 0x400000ul, 0x20000000ul, 0x20000400ul, 0ul, 0x20000300ul); memcpy((void*)0x20000140, "./bus\000", 6); syscall(__NR_chdir, 0x20000140ul); memcpy((void*)0x20000080, "cpu.stat\000", 9); res = syscall(__NR_openat, 0xffffff9c, 0x20000080ul, 0x275aul, 0ul); if (res != -1) r[0] = res; syscall(__NR_mmap, 0x20000000ul, 0x3000ul, 0ul, 0x10012ul, r[0], 0ul); return 0; }