net: the log list of blocked destinations grows without bound and is scanned under a global lock #220

Open
opened 2026-11-26 11:59:06 +00:00 by github-bot · 0 comments
Owner

@⁠kekonn on GitHub · 2026-11-26 11:58 UTC · original

crates/victory-hle/src/modules/net.rs:71 keeps static SEEN: Mutex<Vec<(&str, String)>>, so that a blocked destination is logged only the first time. The key includes the port (shown(SocketAddr); WinHTTP logs {name}:{port}, ~738). Every blocked call scans the whole list linearly under one global lock, and nothing ever removes an entry.

When: the default path, on every blocked connect/sendto/name lookup/WinHTTP connect. It grows with each distinct (call, destination:port) pair, which is unbounded only if the title keeps trying new destinations or ports (per-peer UDP, NAT punching, scanning).

Proposed fix (~5 lines)

Stop adding after 256 entries and log once that further blocked destinations are not logged. Optionally use a HashSet for O(1) lookups.

Upstream: no open PR touches net.rs.
Status: a fix is being prepared in kekonn/VIctory-7900XTX on branch claude/gifted-clarke-uxuqw8.


Generated by Claude Code

**@⁠kekonn** on GitHub · 2026-11-26 11:58 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/220) `crates/victory-hle/src/modules/net.rs:71` keeps `static SEEN: Mutex<Vec<(&str, String)>>`, so that a blocked destination is logged only the first time. The key includes the port (`shown(SocketAddr)`; WinHTTP logs `{name}:{port}`, ~738). Every blocked call scans the whole list linearly under one global lock, and nothing ever removes an entry. **When:** the default path, on every blocked `connect`/`sendto`/name lookup/WinHTTP connect. It grows with each distinct (call, destination:port) pair, which is unbounded only if the title keeps trying new destinations or ports (per-peer UDP, NAT punching, scanning). ### Proposed fix (~5 lines) Stop adding after 256 entries and log once that further blocked destinations are not logged. Optionally use a `HashSet` for O(1) lookups. **Upstream:** no open PR touches `net.rs`. **Status:** a fix is being prepared in kekonn/VIctory-7900XTX on branch `claude/gifted-clarke-uxuqw8`. --- _Generated by [Claude Code](https://claude.ai/code)_
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:59:06 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/avatarmanz--VIctory-7900XTX#220
No description provided.