// https://syzkaller.appspot.com/bug?id=efffbf96c6c052f5ecc7f712e0e162c57aaf199e // 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*)0x20000300, "./bus\000", 6); syscall(__NR_mkdir, 0x20000300ul, 0ul); memcpy((void*)0x200002c0, "./file1\000", 8); syscall(__NR_mkdir, 0x200002c0ul, 0ul); memcpy((void*)0x20000180, "./bus/file0\000", 12); syscall(__NR_creat, 0x20000180ul, 0ul); memcpy((void*)0x20000040, "./bus\000", 6); memcpy((void*)0x20000080, "overlay\000", 8); memcpy((void*)0x20000280, "upperdir=./bus,workdir=./file1,lowerdir=.", 41); syscall(__NR_mount, 0ul, 0x20000040ul, 0x20000080ul, 0ul, 0x20000280ul); memcpy((void*)0x200001c0, "./bus\000", 6); syscall(__NR_chdir, 0x200001c0ul); memcpy((void*)0x20000040, "./file0\000", 8); res = syscall(__NR_open, 0x20000040ul, 0ul, 0ul); if (res != -1) r[0] = res; syscall(__NR_fcntl, r[0], 0x400ul, 0ul); syscall(__NR_lseek, r[0], 4ul, 0ul); return 0; }