// https://syzkaller.appspot.com/bug?id=90cd06695bd4650a5228385b4b02f370ef9c219f // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_ioctl #define __NR_ioctl 54 #endif #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_openat #define __NR_openat 295 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; memcpy((void*)0x20000000, "/dev/kvm", 9); res = syscall(__NR_openat, 0xffffff9c, 0x20000000, 0, 0); if (res != -1) r[0] = res; res = syscall(__NR_ioctl, (long)r[0], 0xae01, 0); if (res != -1) r[1] = res; res = syscall(__NR_ioctl, (long)r[1], 0xae41, 0); if (res != -1) r[2] = res; syscall(__NR_ioctl, (long)r[2], 0x4080aebf, 0x20000100); return 0; }