diff options
| author | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 09:19:38 -0300 |
|---|---|---|
| committer | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 09:19:38 -0300 |
| commit | 1f88b25d9a3bd2b1266a83f8ef7abe8287298fde (patch) | |
| tree | 35be5e3cb2cae920bd2200e82c617b4517f0b45c /runtime/src/vulkan_aftermath.cpp | |
| parent | d7cdfcf25500503fbd694fb6eb949b694ae71bdf (diff) | |
ws2_offline: loopback-bind unbound sends, refuse multicast joins and WSAJoinLeaf groupsfeat/ws2-offline-shim
Closes the gaps from the security review on #357:
- sendto, WSASendTo, WSASendMsg (both exports) and WSAJoinLeaf on an
unbound socket made the host bind it to the wildcard address
(Microsoft's sendto remarks), so its port took datagrams from other
hosts. The shim now binds such a socket to 127.0.0.1, ::1 or
::ffff:127.0.0.1 first and fails with WSAEADDRNOTAVAIL if it stays
unbound.
- setsockopt (ws2_32 name and #21) refuses IP_ADD_MEMBERSHIP,
IP_ADD_SOURCE_MEMBERSHIP, IPV6_ADD_MEMBERSHIP, MCAST_JOIN_GROUP and
MCAST_JOIN_SOURCE_GROUP with WSAEADDRNOTAVAIL. wsock32's setsockopt is
its own export (dumpbin on Windows 10 22H2: not a forwarder) that remaps
the Winsock 1.1 IP_ numbers (Wine dlls/wsock32/socket.c has the same
table), so it gets its own wrapper that also refuses the 1.1 join (5)
and forwards everything else to the host wsock32.
- WSAJoinLeaf gets connect's loopback check, so a group is refused.
Tested: ws2_offline_test 71 checks, 0 failures, MSVC 14.44 / SDK
10.0.26100 on Windows 10, including a control check that the host sendto
alone binds to 0.0.0.0; docs tests 47 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions