// https://syzkaller.appspot.com/bug?id=01a246c94708ec2bb925cde22c3c0dbe88626d5e // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #ifndef SYS_mknod #define SYS_mknod 450 #endif #ifndef SYS_mmap #define SYS_mmap 197 #endif #ifndef SYS_open #define SYS_open 5 #endif #ifndef SYS_preadv #define SYS_preadv 289 #endif uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000, 0x1000000, 3, 0x1012, -1, 0, 0); long res = 0; memcpy((void*)0x20000000, "./file0\000", 8); syscall(SYS_mknod, 0x20000000, 0xf020, 0); memcpy((void*)0x200000c0, "./file0\000", 8); res = syscall(SYS_open, 0x200000c0, 0, 0); if (res != -1) r[0] = res; *(uint64_t*)0x20001100 = 0; *(uint64_t*)0x20001108 = 0; syscall(SYS_preadv, r[0], 0x20001100, 1, 0); return 0; }