// https://syzkaller.appspot.com/bug?id=a2f5173b3fec1613f2470c2fa6e761d233339575 // 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, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); intptr_t res = 0; memcpy((void*)0x20000140, "/dev/vim2m\000", 11); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000140ul, /*flags=*/2ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint32_t*)0x200000c0 = 0xffffffe0; *(uint32_t*)0x200000c4 = 2; *(uint32_t*)0x200000c8 = 2; *(uint32_t*)0x200000cc = 0; *(uint8_t*)0x200000d0 = 0; memset((void*)0x200000d1, 0, 3); syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0xc0145608, /*arg=*/0x200000c0ul); *(uint32_t*)0x20000300 = 0; *(uint32_t*)0x20000304 = 2; *(uint32_t*)0x20000308 = 4; *(uint32_t*)0x2000030c = 0; *(uint32_t*)0x20000310 = 0; *(uint64_t*)0x20000318 = 0x77359400; *(uint64_t*)0x20000320 = 0; *(uint32_t*)0x20000328 = 0; *(uint32_t*)0x2000032c = 0; *(uint8_t*)0x20000330 = 0; *(uint8_t*)0x20000331 = 0; *(uint8_t*)0x20000332 = 0; *(uint8_t*)0x20000333 = 0; memcpy((void*)0x20000334, "\x00\x10\x00\x00", 4); *(uint32_t*)0x20000338 = 0; *(uint32_t*)0x2000033c = 2; *(uint64_t*)0x20000340 = 0; *(uint32_t*)0x20000348 = 0xff000000; *(uint32_t*)0x2000034c = 0; *(uint32_t*)0x20000350 = -1; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0xc058565d, /*arg=*/0x20000300ul); return 0; }