// https://syzkaller.appspot.com/bug?id=ab136f1e51bcdf545b941b75c5d4215c6c2e3353 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_fcntl #define __NR_fcntl 55 #endif #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_openat #define __NR_openat 295 #endif #ifndef __NR_write #define __NR_write 4 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; memcpy((void*)0x200002c0, "/dev/vga_arbiter", 17); res = syscall(__NR_openat, 0xffffff9c, 0x200002c0, 2, 0); if (res != -1) r[0] = res; res = syscall(__NR_fcntl, (long)r[0], 0, (long)r[0]); if (res != -1) r[1] = res; *(uint32_t*)0x20000000 = 0xf; *(uint8_t*)0x20000004 = 0x1f; *(uint16_t*)0x20000005 = 0x40; *(uint64_t*)0x20000007 = 0; syscall(__NR_write, (long)r[1], 0x20000000, 0xfffffefa); return 0; }