// https://syzkaller.appspot.com/bug?id=c5f3199cfcf4d6f57d92bc76bf2f138350829e2d // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_openat #define __NR_openat 295 #endif #ifndef __NR_ioctl #define __NR_ioctl 54 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 long r[1]; void loop() { memset(r, -1, sizeof(r)); memcpy((void*)0x2059aff4, "/dev/ashmem", 12); r[0] = syscall(__NR_openat, 0xffffff9c, 0x2059aff4, 0, 0); syscall(__NR_ioctl, r[0], 0x40087703, 0x2a); syscall(__NR_mmap, 0x203f5000, 0x2000, 0, 0x1011, r[0], 0); syscall(__NR_ioctl, r[0], 0x7709, 0); } int main() { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); loop(); return 0; }