// https://syzkaller.appspot.com/bug?id=367509f8fdee02c7d5a6c24b77eb2643792ef376 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); intptr_t res = 0; res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); if (res != -1) r[0] = res; *(uint32_t*)0x20000140 = 0; syscall(SYS_setsockopt, r[0], 0x84, 0x1c, 0x20000140ul, 4ul); *(uint8_t*)0x20000080 = 0x46; *(uint8_t*)0x20000081 = 0x1c; *(uint16_t*)0x20000082 = htobe16(0x4e22); *(uint32_t*)0x20000084 = 0; memset((void*)0x20000088, 0, 16); *(uint32_t*)0x20000098 = 0; syscall(SYS_bind, r[0], 0x20000080ul, 0x1cul); res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); if (res != -1) r[1] = res; *(uint32_t*)0x20000140 = 0; syscall(SYS_setsockopt, r[1], 0x84, 0x1c, 0x20000140ul, 4ul); *(uint8_t*)0x20000080 = 0x46; *(uint8_t*)0x20000081 = 0x1c; *(uint16_t*)0x20000082 = htobe16(0x4e22); *(uint32_t*)0x20000084 = 0; memset((void*)0x20000088, 0, 16); *(uint32_t*)0x20000098 = 0; syscall(SYS_bind, r[1], 0x20000080ul, 0x1cul); syscall(SYS_listen, r[1], 0); return 0; }