// https://syzkaller.appspot.com/bug?id=072d064576d88a07cbb2575e1a7619a2567ca229 // 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; *(uint16_t*)0x20000180 = 0; *(uint16_t*)0x20000182 = 0; *(uint64_t*)0x20000188 = 0; *(uint64_t*)0x20000190 = 0x100000000; *(uint32_t*)0x20000198 = 0; syscall(SYS_fcntl, r[0], 9ul, 0x20000180ul); *(uint16_t*)0x20000200 = 3; *(uint16_t*)0x20000202 = 0; *(uint64_t*)0x20000208 = 0x7ffffffffffffffd; *(uint64_t*)0x20000210 = 0x20002fffffffd; *(uint32_t*)0x20000218 = 0; syscall(SYS_fcntl, r[0], 0x10000000000009ul, 0x20000200ul); *(uint16_t*)0x20000180 = 0; *(uint16_t*)0x20000182 = 0; *(uint64_t*)0x20000188 = 0; *(uint64_t*)0x20000190 = 0x100000000; *(uint32_t*)0x20000198 = 0; syscall(SYS_fcntl, r[0], 9ul, 0x20000180ul); return 0; }