ShardBrowser icon indicating copy to clipboard operation
ShardBrowser copied to clipboard

Noise seeds >= 2^31 are silently ignored by the engine (launcher generates u32) — ~50% of profiles run without canvas/rect/WebGL noise

Open angeloathayde opened this issue 2 months ago • 1 comments

Environment: ShardX Launcher 2.0.1, engine 152.0.7977.65 build 2, Windows 11 x64.

Symptom: a profile with noise.canvas.enabled=true and noise.client_rects.enabled=true produces exactly the same canvas hash and the same getBoundingClientRect() values as a profile with noise disabled. Follow-up to #11: the enabled flag is now set for UI profiles, but the seed value itself decides whether noise is applied.

Reproduction (same profile, same page https://example.com, only the seed changes; canvas = SHA-256 of toDataURL(), rect = width of a <div> with 15px Arial text):

seed canvas hash rect width noise applied
off 06ee415e8fa2204f 1142.390625 —
111111111 cae385593cbbd34b 1143.068… yes
2147483647 (2^31−1) 1f7df295794877d8 1141.588… yes
2147483648 (2^31) 06ee415e8fa2204f 1142.390625 no (identical to off)
2956331048 06ee415e8fa2204f 1142.390625 no

ensure_default_noise in the launcher draws seeds as u32, so roughly half of all generated profiles get at least one vector above 2^31 and silently lose it. A profile created in the UI here shipped with canvas seed 2617118525 and client_rects seed 2341006230 — both dead.

Second, related default: profiles created through POST /profiles with a fingerprint from GET /fingerprint/new are stored with noise.*.enabled=false, webgl.intensity=0, client_rects.max_offset=0 (seeds filled, flags not). UI-created profiles get everything enabled. The API/MCP/SDK path therefore runs without noise unless the caller sends a full noise block.

Suggested fixes:

  • Engine: parse seeds as uint32 (or accept the full u32 range) instead of a signed 32-bit int.
  • Launcher: until then, generate seeds in [1, 2^31-1] (rng.gen_range(1..=i32::MAX as u32)), and make ensure_default_noise enable vectors with the same strengths the UI uses.
  • Launcher/UI: show a warning when a stored seed is outside the accepted range, since the failure is invisible to the user.

angeloathayde avatar Sep 11 '26 18:09 angeloathayde

in v2.0.3

ProxyShard avatar Sep 13 '26 12:09 ProxyShard