// https://syzkaller.appspot.com/bug?id=c5f658ae0644eff570c5e7d2d0e312f1164fadab // 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, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x200000c0, "memory.events\000", 14); syscall(__NR_openat, 0xffffff9c, 0x200000c0ul, 0x26e1ul, 0ul); memcpy((void*)0x20000000, "/proc/self/exe\000", 15); res = syscall(__NR_openat, 0xffffff9c, 0x20000000ul, 0ul, 0ul); if (res != -1) r[0] = res; syscall(__NR_mmap, 0x20000000ul, 0x800000ul, 0x1800003ul, 0x12ul, r[0], 0ul); memcpy((void*)0x200002c0, "memory.events\000", 14); res = syscall(__NR_openat, 0xffffff9c, 0x200002c0ul, 0x7a05ul, 0x1700ul); if (res != -1) r[1] = res; *(uint64_t*)0x200004c0 = 0; *(uint64_t*)0x200004c8 = 0; *(uint64_t*)0x200004d0 = 0; *(uint64_t*)0x200004d8 = 0; *(uint64_t*)0x200004e0 = 0x20000200; memcpy((void*)0x20000200, "\xdb", 1); *(uint64_t*)0x200004e8 = 0xfffff000; syscall(__NR_pwritev, r[1], 0x200004c0ul, 3ul, 0, 0); return 0; }