// https://syzkaller.appspot.com/bug?id=4dd513baca64d86dc50fcd839f88e64883c6b981 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #define __syscall syscall static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x1012ul, -1, 0ul); intptr_t res = 0; res = -1; res = syz_open_pts(); if (res != -1) r[0] = res; syscall(SYS_dup, r[0]); syscall(SYS_socketpair, 0x18ul, 0x4000ul, 0x29, 0ul); return 0; }