// https://syzkaller.appspot.com/bug?id=a565654c68511a745c2a7ebc8ecc7885cd7a2f55 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_getpid #define __NR_getpid 172 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_process_vm_readv #define __NR_process_vm_readv 270 #endif uint64_t r[1] = {0x0}; 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; res = syscall(__NR_getpid); if (res != -1) r[0] = res; *(uint64_t*)0x20008400 = 0x20000300; *(uint64_t*)0x20008408 = 0x7ffff000; *(uint64_t*)0x20008410 = 0x20006180; *(uint64_t*)0x20008418 = 0x98; *(uint64_t*)0x20008640 = 0x20008480; *(uint64_t*)0x20008648 = 0x7ffff000; syscall(__NR_process_vm_readv, /*pid=*/r[0], /*loc_vec=*/0x20008400ul, /*loc_vlen=*/2ul, /*rem_vec=*/0x20008640ul, /*rem_vlen=*/0x286ul, /*flags=*/0ul); return 0; }