// https://syzkaller.appspot.com/bug?id=fde6964e9bcb7ae3d5776b379e74a526ada8ab4e // 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_unshare #define __NR_unshare 310 #endif #ifndef __NR_openat #define __NR_openat 295 #endif #ifndef __NR_ioctl #define __NR_ioctl 54 #endif #ifndef __NR_epoll_create #define __NR_epoll_create 254 #endif #ifndef __NR_epoll_ctl #define __NR_epoll_ctl 255 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 long r[2]; void loop() { memset(r, -1, sizeof(r)); syscall(__NR_unshare, 0x40600); memcpy((void*)0x20b31ff7, "/dev/ppp", 9); r[0] = syscall(__NR_openat, 0xffffff9c, 0x20b31ff7, 0, 0); syscall(__NR_ioctl, r[0], 0xc004743e, 0x20521000); r[1] = syscall(__NR_epoll_create, 0x1ffe); *(uint32_t*)0x201b3073 = 0; *(uint64_t*)0x201b3077 = 0; syscall(__NR_epoll_ctl, r[1], 1, r[0], 0x201b3073); syscall(__NR_ioctl, r[0], 0x4004743c, 0x20d1df52); } int main() { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); loop(); return 0; }