// 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*)0x20000100, "/dev/kvm", 9); res = syscall(__NR_openat, 0xffffff9c, 0x20000100, 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; *(uint32_t*)0x20000240 = 0x7b; *(uint32_t*)0x20000244 = 0xbff; *(uint64_t*)0x20000248 = 0; *(uint64_t*)0x20000250 = 0; *(uint64_t*)0x20000258 = 0; *(uint64_t*)0x20000260 = 0; *(uint8_t*)0x20000268 = 0; *(uint8_t*)0x20000269 = 0; *(uint8_t*)0x2000026a = 0; *(uint8_t*)0x2000026b = 0; *(uint8_t*)0x2000026c = 0; *(uint8_t*)0x2000026d = 0; *(uint8_t*)0x2000026e = 0; *(uint8_t*)0x2000026f = 0; *(uint8_t*)0x20000270 = 0; *(uint8_t*)0x20000271 = 0; *(uint8_t*)0x20000272 = 0; *(uint8_t*)0x20000273 = 0; *(uint8_t*)0x20000274 = 0; *(uint8_t*)0x20000275 = 0; *(uint8_t*)0x20000276 = 0; *(uint8_t*)0x20000277 = 0; *(uint8_t*)0x20000278 = 0; *(uint8_t*)0x20000279 = 0; *(uint8_t*)0x2000027a = 0; *(uint8_t*)0x2000027b = 0; *(uint8_t*)0x2000027c = 0; *(uint8_t*)0x2000027d = 0; *(uint8_t*)0x2000027e = 0; *(uint8_t*)0x2000027f = 0; *(uint8_t*)0x20000280 = 0; *(uint8_t*)0x20000281 = 0; *(uint8_t*)0x20000282 = 0; *(uint8_t*)0x20000283 = 0; *(uint8_t*)0x20000284 = 0; *(uint8_t*)0x20000285 = 0; *(uint8_t*)0x20000286 = 0; *(uint8_t*)0x20000287 = 0; *(uint8_t*)0x20000288 = 0; *(uint8_t*)0x20000289 = 0; *(uint8_t*)0x2000028a = 0; *(uint8_t*)0x2000028b = 0; *(uint8_t*)0x2000028c = 0; *(uint8_t*)0x2000028d = 0; *(uint8_t*)0x2000028e = 0; *(uint8_t*)0x2000028f = 0; *(uint8_t*)0x20000290 = 0; *(uint8_t*)0x20000291 = 0; *(uint8_t*)0x20000292 = 0; *(uint8_t*)0x20000293 = 0; *(uint8_t*)0x20000294 = 0; *(uint8_t*)0x20000295 = 0; *(uint8_t*)0x20000296 = 0; *(uint8_t*)0x20000297 = 0; *(uint8_t*)0x20000298 = 0; *(uint8_t*)0x20000299 = 0; *(uint8_t*)0x2000029a = 0; *(uint8_t*)0x2000029b = 0; *(uint8_t*)0x2000029c = 0; *(uint8_t*)0x2000029d = 0; *(uint8_t*)0x2000029e = 0; *(uint8_t*)0x2000029f = 0; *(uint8_t*)0x200002a0 = 0; *(uint8_t*)0x200002a1 = 0; *(uint8_t*)0x200002a2 = 0; *(uint8_t*)0x200002a3 = 0; *(uint8_t*)0x200002a4 = 0; *(uint8_t*)0x200002a5 = 0; *(uint8_t*)0x200002a6 = 0; *(uint8_t*)0x200002a7 = 0; syscall(__NR_ioctl, (long)r[2], 0x4080aebf, 0x20000240); return 0; }