// https://syzkaller.appspot.com/bug?id=f2d1d7a456381df6affb60da9693d8c9b0fce6f6 // 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=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*)0x200000c0, "/sys/kernel/profiling", 21); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*dir=*/0x200000c0ul, /*flags=O_RDWR*/ 2ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000000 = 0x30; *(uint32_t*)0x20000004 = 5; *(uint64_t*)0x20000008 = 0; *(uint64_t*)0x20000010 = 0; *(uint64_t*)0x20000018 = 0; *(uint64_t*)0x20000020 = 0; *(uint32_t*)0x20000028 = 0; *(uint32_t*)0x2000002c = 0; syscall(__NR_write, /*fd=*/r[0], /*arg=*/0x20000000ul, /*len=*/0x3bul); return 0; }