Repository navigation
Conversation
|
2| |
fdabe73 to
28fd53d
Compare
|
Thanks for the Wine/Proton catch! Squashed a fix into
Re-tested on native Windows 11 + NVIDIA RTX 5080 ( (Assisted-by: Antigravity / Gemini 4 Neon + Claude Sonnet 5.5) |
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on XCL_NETWORK=0 and WSAConnectByList is green here and the workspace keeps its verdict (737 passed on AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
WSAConnectByList connects to the first address of a list that answers without going through the hooked connect, and it was hooked neither in the title's imports nor in the system's ws2_32. With XCL_NETWORK=0 it made a live TCP connect (measured on Windows 11: to 192.0.2.1:80 until WSAETIMEDOUT after 21 s). WSAConnectByNameW/A were already refused, since they resolve through the hooked GetAddrInfoExW. It now goes through the same check as connect: a list with no loopback entry fails with WSAENETUNREACH; a list with only loopback entries goes to the original as it is; a mixed list goes to the original with a copy that holds only its loopback entries, in order. The system hook is installed after the main table so the table and its statics are left as they are. Test: wsa_connect_by_list_refuses_all_but_loopback checks the loopback filter on a mixed list, then calls both the title-side function and the system export (through GetProcAddress, after install_system_hooks) with an invalid socket: no loopback gives 10051, a mixed or loopback list reaches Winsock and fails with its own error. Not built or run on Windows. Assisted-by: Claude Code (Claude Opus 5.5)
28fd53d to
f9ef768
Compare
|
Test report for f9ef768 on the retail title: one 120 s smoke run without this PR and one with it. Tested
Smoke runs main 930e8b4 + #235 + #821 (f9ef768) Not tested
AI use
|
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
With
XCL_NETWORK=0,WSAConnectByListwas hooked neither in the title's import table nor inws2_32.dll, and connects without passing through the hookedconnectorWSAConnect. On Windows 11 withinstall_system_hooks()active, callingWSAConnectByListwith192.0.2.1:80bypassed every hook and attempted a live TCP connect untilWSAETIMEDOUT(10060) after 21.04 s. (WSAConnectByNameWandWSAConnectByNameAare already blocked because they call the hookedGetAddrInfoExWinternally and fail in microseconds withWSAHOST_NOT_FOUND.)What is in it
crates/xcl/src/hle/netoff.rs:WSAConnectByListin bothtable()andinstall_system_hooks()(using a dedicated trampolineO_WSA_CONNECT_BY_LIST, placed after the main hook array to avoid textual conflicts with XCL_NETWORK=0: WSASendTo lets loopback and connected sockets through, matching sendto #807/XCL_NETWORK=0: parse loopback IPs in local_name instead of matching any 127. prefix #808/Netoff: block ConnectEx when network is disabled #462/XCL_NETWORK=0: a bind to a network address binds to loopback #570/XCL_NETWORK=0: the system's WSASendMsg refuses too #612/XCL_NETWORK=0: IPv4-mapped loopback (::ffff:127.x.x.x) goes through #619).SOCKET_ADDRESS_LISTlayout (count at offset 0, 16-byteSOCKET_ADDRESSentries from offset 8): refuses lists with no loopback entry (FALSE+WSAENETUNREACH), passes loopback-only lists through unchanged, and filters mixed lists to a copy containing only the loopback entries in order.wsa_connect_by_list_refuses_all_but_loopbackverifying both title-side import and systemGetProcAddress("WSAConnectByList")behavior on non-loopback, mixed, and loopback-only lists.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), D3D12 debug layer installed (d3d12SDKLayers.dll),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC from Windows SDK10.0.26100.0, debug build.maind208e14): empirical Windows 11 probe withinstall_system_hooks()confirmedWSAConnectByList(192.0.2.1:80)bypassed all hooks and timed out withWSAETIMEDOUT(10060) after 21.04 s.fdabe7392327c5472ddad9cbfccbbdb07a135f69):cargo build --workspace && cargo test --workspace -- --test-threads=4hle::netoff::tests::wsa_connect_by_list_refuses_all_but_loopback—okgpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64).Regression run
Smoke run by @Toons29 in comment below: #821 (comment)
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.
main:
PR:
Tester's setup and limits: AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.Tester's AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; the tester checked the blocks before posting.Not tested
AI use
WSAConnectByListlead and wrote the hook implementation and unit test.WSAConnectByNameW/Awere already blocked), audited the x64SOCKET_ADDRESS_LISTlayout, ran the full Windows RTX 5080 MSVC + D3D12 debug-layer workspace suite, and drafted this PR description.