// https://syzkaller.appspot.com/bug?id=e4081f0f1f6270d31288b58b729225ca4af3c6bc // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; 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); intptr_t res = 0; memcpy((void*)0x20000180, "memory.events\000", 14); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000180ul, /*flags=*/0x26e1ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint64_t*)0x20000540 = 0x404000; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40086602, /*period=*/0x20000540ul); memcpy((void*)0x20000340, "memory.events.local\000", 20); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000340ul, /*flags=*/0x26e1ul, /*mode=*/0ul); if (res != -1) r[1] = res; *(uint64_t*)0x20000000 = 0x100000001; syscall(__NR_ioctl, /*fd=*/r[1], /*cmd=*/0x4004662b, /*period=*/0x20000000ul); return 0; }