// https://syzkaller.appspot.com/bug?id=0b4da77a97a1973e769a93dc400233a5d4da6c08 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0x0}; 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; res = syscall(__NR_socket, 0x2cul, 3ul, 0); if (res != -1) r[0] = res; *(uint64_t*)0x200000c0 = 0x20000000; *(uint64_t*)0x200000c8 = 0x200000; *(uint32_t*)0x200000d0 = 0x1000; *(uint32_t*)0x200000d4 = 0; *(uint32_t*)0x200000d8 = 0; syscall(__NR_setsockopt, r[0], 0x11b, 4, 0x200000c0ul, 0x20ul); *(uint32_t*)0x20000040 = 0x20; syscall(__NR_setsockopt, r[0], 0x11b, 2, 0x20000040ul, 4ul); res = syscall(__NR_socketpair, 1ul, 5ul, 0, 0x200001c0ul); if (res != -1) r[1] = *(uint32_t*)0x200001c4; memcpy((void*)0x20000000, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16); res = syscall(__NR_ioctl, r[1], 0x8933, 0x20000000ul); if (res != -1) r[2] = *(uint32_t*)0x20000010; *(uint32_t*)0x20000180 = 0x20; syscall(__NR_setsockopt, r[0], 0x11b, 6, 0x20000180ul, 4ul); *(uint32_t*)0x20000140 = 0x4000; syscall(__NR_setsockopt, r[0], 0x11b, 5, 0x20000140ul, 4ul); *(uint16_t*)0x20000100 = 0x2c; *(uint16_t*)0x20000102 = 0; *(uint32_t*)0x20000104 = r[2]; *(uint32_t*)0x20000108 = 0; *(uint32_t*)0x2000010c = -1; syscall(__NR_bind, r[0], 0x20000100ul, 0x10ul); *(uint32_t*)0x20000080 = 0x1000; syscall(__NR_setsockopt, r[0], 0x11b, 3, 0x20000080ul, 4ul); return 0; }