diff options
| author | Tyrannys <80750971+Tyrannys@users.noreply.github.com> | 2026-11-27 19:10:03 -0600 |
|---|---|---|
| committer | Tyrannys <80750971+Tyrannys@users.noreply.github.com> | 2026-11-27 19:10:03 -0600 |
| commit | c3cf8a042d961fccbb0855ad97e323bcdf3a47e1 (patch) | |
| tree | b40c4c96aaf92687175361ecf666b682991f5a5f /runtime/test/vk_queue_constructor_oom_test.cpp | |
| parent | 431ceba4f4a55c69c26fcf0e36fd83e86e1b9a32 (diff) | |
ws2_offline: refuse the local computer's name, answer localhost with loopback literals, keep WSAIoctl synchronous
From kevincommits' finding (batch 18, item 3) in #1608.
- An empty name ("") passed is_loopback_node_a, so getaddrinfo, GetAddrInfoW,
GetAddrInfoExA/W, gethostbyname and WSAAsyncGetHostByName forwarded it to the
host, which answers with every address of the local computer (its LAN and
external adapters). A null name did the same for gethostbyname and
WSAAsyncGetHostByName. Both are refused now; a null getaddrinfo node (a
service-only lookup: loopback, or the wildcard that bind narrows) is still
answered.
- "localhost" went to the host as a name, so its hosts file could map it off
loopback. The lookups now hand the host a loopback literal for it (::1 for an
AF_INET6 lookup, else 127.0.0.1), as WSAConnectByNameA/W already do.
- WSAIoctl(SIO_GET_EXTENSION_FUNCTION_POINTER) for ConnectEx and WSASendMsg
passed the caller's overlapped and completion routine to the host along with
pointers into its own stack frame. The host lookup is now synchronous, as in
host_extension, and an overlapped request is reported as completed at once:
status and byte count in the OVERLAPPED, its event set or its routine queued.
ws2_offline_test gains section 9 for each case. With main's shim the test
fails at gethostbyname(NULL) and then crashes; 83/83 checks pass with the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/vk_queue_constructor_oom_test.cpp')
0 files changed, 0 insertions, 0 deletions