// 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=*/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*)0x20000000, "/sys/kernel/profiling", 21); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*dir=*/0x20000000ul, /*flags=*/0x169101ul, /*mode=*/0x25ul); if (res != -1) r[0] = res; sprintf((char*)0x20002480, "%020llu", (long long)-1); sprintf((char*)0x20002494, "%020llu", (long long)-1); *(uint32_t*)0x200024a8 = -1; *(uint16_t*)0x200024ac = -1; syscall(__NR_write, /*fd=*/r[0], /*arg=*/0x20002480ul, /*len=*/0x48ul); return 0; }