// https://syzkaller.appspot.com/bug?id=fc600cb3588f604c65a424c9b0ec530d7e6427e3 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[6] = {0xffffffffffffffff, 0x0, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0x0}; 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*)0x20000040, "/dev/iommu\000", 11); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000040ul, /*flags=*/0ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000140 = 0xc; *(uint32_t*)0x20000144 = 0; res = syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3b81, /*arg=*/0x20000140ul); if (res != -1) r[1] = *(uint32_t*)0x20000148; memcpy((void*)0x20000000, "/dev/iommu\000", 11); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000000ul, /*flags=*/0ul, /*mode=*/0ul); if (res != -1) r[2] = res; *(uint32_t*)0x20000240 = 0x38; *(uint32_t*)0x20000244 = 5; *(uint32_t*)0x20000248 = r[1]; *(uint32_t*)0x2000024c = 0; *(uint32_t*)0x20000254 = 1; res = syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3ba0, /*arg=*/0x20000240ul); if (res != -1) r[3] = *(uint32_t*)0x20000250; memcpy((void*)0x200000c0, "/dev/iommu\000", 11); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000c0ul, /*flags=*/0ul, /*mode=*/0ul); if (res != -1) r[4] = res; *(uint32_t*)0x20000000 = 0xc; *(uint32_t*)0x20000004 = 0; res = syscall(__NR_ioctl, /*fd=*/r[4], /*cmd=*/0x3b81, /*arg=*/0x20000000ul); if (res != -1) r[5] = *(uint32_t*)0x20000008; *(uint32_t*)0x200000c0 = 0x28; *(uint32_t*)0x200000c4 = 2; *(uint32_t*)0x200000c8 = r[5]; *(uint32_t*)0x200000cc = 0; *(uint64_t*)0x200000d0 = 0x20ffe000; *(uint64_t*)0x200000d8 = 0x1000; *(uint64_t*)0x200000e0 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3b85, /*arg=*/0x200000c0ul); *(uint32_t*)0x20000280 = 0x38; *(uint32_t*)0x20000284 = 7; *(uint32_t*)0x20000288 = r[3]; *(uint32_t*)0x2000028c = 0; *(uint32_t*)0x20000290 = 0x10001; *(uint32_t*)0x20000298 = 0; *(uint32_t*)0x2000029c = 0; *(uint64_t*)0x200002a0 = 0x300; *(uint64_t*)0x200002a8 = 0xffffffffffffff7b; syscall(__NR_ioctl, /*fd=*/r[2], /*cmd=*/0x3ba0, /*arg=*/0x20000280ul); return 0; }