// https://syzkaller.appspot.com/bug?id=694ac77de683480618491bdd0188a59680ffbcee // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include 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); memcpy((void*)0x20000000, "./file0\000", 8); syscall(__NR_mkdir, 0x20000000ul, 0ul); memcpy((void*)0x20000080, "./file0\000", 8); memcpy((void*)0x20000940, "tmpfs\000", 6); syscall(__NR_mount, 0ul, 0x20000080ul, 0x20000940ul, 0ul, 0ul); memcpy((void*)0x20000400, "./file1\000", 8); syscall(__NR_mkdir, 0x20000400ul, 0ul); memcpy((void*)0x20000580, "./bus\000", 6); syscall(__NR_mkdir, 0x20000580ul, 0ul); memcpy((void*)0x20000200, "./file0\000", 8); memcpy((void*)0x200000c0, "overlay\000", 8); memcpy((void*)0x20000240, "lowerdir=.:file0", 16); syscall(__NR_mount, 0ul, 0x20000200ul, 0x200000c0ul, 0ul, 0x20000240ul); memcpy((void*)0x20000280, "./bus/file0\000", 12); syscall(__NR_creat, 0x20000280ul, 0ul); memcpy((void*)0x20000040, "./bus\000", 6); memcpy((void*)0x20000080, "overlay\000", 8); memcpy((void*)0x20000340, "upperdir=./bus,workdir=./file1,lowerdir=./file0", 47); syscall(__NR_mount, 0ul, 0x20000040ul, 0x20000080ul, 0ul, 0x20000340ul); memcpy((void*)0x20000540, "./bus\000", 6); syscall(__NR_chdir, 0x20000540ul); memcpy((void*)0x20000100, "./bus/file0\000", 12); syscall(__NR_open, 0x20000100ul, 0ul, 0ul); memcpy((void*)0x200001c0, "./file0\000", 8); memcpy((void*)0x20000300, "./bus/file0\000", 12); syscall(__NR_rename, 0x200001c0ul, 0x20000300ul); memcpy((void*)0x20000140, "./bus\000", 6); syscall(__NR_chdir, 0x20000140ul); memcpy((void*)0x200002c0, "./file0\000", 8); memcpy((void*)0x20000380, "./bus/file0\000", 12); syscall(__NR_rename, 0x200002c0ul, 0x20000380ul); return 0; }