// https://syzkaller.appspot.com/bug?id=acc91fc5738dacbfaa1163219fc6bf0685224b60 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x20001700, "/dev/ptmx\000", 10); res = syscall(__NR_openat, 0xffffffffffffff9cul, 0x20001700ul, 0xfb3f12eae2187916ul, 0ul); if (res != -1) r[0] = res; *(uint16_t*)0x20000000 = 0; *(uint8_t*)0x20000002 = 0; *(uint8_t*)0x20000003 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint32_t*)0x20000010 = 0; *(uint32_t*)0x20000014 = 0; *(uint32_t*)0x20000018 = 0; *(uint32_t*)0x2000001c = 0; memcpy((void*)0x20000020, "\x49\x6f\x89\x30\xcf\xbf\x17\xbd\xff\xc6\x71\xe9\x35\x4e\xbf\x26\xf0" "\xd4\x3c\xa1\x49\x04\x34\x44\x27\x5a\x35\x12\xa7\x84\x4b\x33\x86\xa5" "\x6a\xbd\x52\xe4\x69\x67\xff\xb8\xec\xdf\x5c\x56\x56\xc5\x94\x39\xba" "\x30\xe2\x1f\xce\xf2\x40\x0d\x4e\xa1\x3f\x35\xbb\x8b\xb0\xa2\x4f\xc6" "\x9c\x48\x35\xc3\x7e\xc7\x60\x25\x11\xaf\x9b\xa2\x61\x41\x36\xa7\x50" "\xa7\x6b\x3e\x86\x00\xb1\x37\x66\x18\x96\x0a", 96); syscall(__NR_write, r[0], 0x20000000ul, 0x80ul); syscall(__NR_ioctl, r[0], 0x5403, 0ul); return 0; }