// https://syzkaller.appspot.com/bug?id=1955d9c9477968ba018f8030e46aecfa357c86cd // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0x0}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000080, "/dev/iommu\000", 11); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000080ul, /*flags=*/0ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000000 = 0xc; *(uint32_t*)0x20000004 = 0; res = syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3b81, /*arg=*/0x20000000ul); if (res != -1) r[1] = *(uint32_t*)0x20000008; *(uint32_t*)0x20000180 = 0xc; *(uint32_t*)0x20000184 = r[1]; *(uint16_t*)0x20000188 = 1; *(uint16_t*)0x2000018a = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3b88, /*arg=*/0x20000180ul); *(uint32_t*)0x200000c0 = 0x20; *(uint32_t*)0x200000c4 = 2; *(uint64_t*)0x200000c8 = 0; *(uint64_t*)0x200000d0 = 7; *(uint64_t*)0x200000d8 = 0x8000000000000000; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3b71, /*arg=*/0x200000c0ul); *(uint32_t*)0x20000140 = 0x28; *(uint32_t*)0x20000144 = 0x10000; *(uint32_t*)0x20000148 = r[1]; *(uint32_t*)0x2000014c = r[1]; *(uint64_t*)0x20000150 = 0x40000000001552f3; *(uint64_t*)0x20000158 = 0; *(uint32_t*)0x20000160 = 0; *(uint32_t*)0x20000164 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x3b83, /*arg=*/0x20000140ul); return 0; }