VFS: protect game folders on network shares from direct writes (#961) #1077
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1077
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1077"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mahfuzinam0045-spec on GitHub · 2026-11-24 11:22 UTC · original
mahfuzinam0045-spec:fix/vfs-unc-game-root→main· +34 −1 · 1 files · 1 commits · openVfs::classify_withunconditionally returnedTarget::Passfor any path starting with\\\\before comparing the path with the game root. When the game root is hosted on a UNC network share (\\\\server\\share\\Game), any title access via its absolute path bypassed the copy-on-write overlay and wrote directly to the game folder, violating the invariant that the game folder is never modified.classify_withnow verifies whether a UNC path falls withingame_root_lc,data_root_lc, orown_roots_lcbefore letting external UNC paths pass through.Fixes #961.
What is in it
crates/xcl/src/vfs.rs: inclassify_with, check whether a\\\\-prefixed path matchesgame_root_lc,data_root_lc, orown_roots_lcbefore early-returningTarget::Pass.crates/xcl/src/vfs.rs: added unit testunc_game_root_protects_game_folder_from_writesverifying that paths inside a UNC game root classify asTarget::Gamewhile external UNC paths classify asTarget::Pass.Tested
unc_game_root_protects_game_folder_from_writes: fails withTarget::Passwithout the fix, and passes returningTarget::Game { rel: save.dat }with the fix.XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 736 passed, 0 failed, 41 ignored.Regression run
XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s (courtesy of @Anon64).main:
this PR:
Not tested
AI use
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@Anon64 on GitHub · 2026-11-24 11:32 UTC · original
Regression run for Regression run,
scripts/smoke.ps1on a retail title, 60 s each: this PR's headb028903and themainit is based on (67a3735, the merge base), release builds, RTX 3060 12 GB (581.80), Windows 11 26200,XCL_NETWORK=0, A pressed every 4 s from 20 s (XCL_PRESS_A_AT).main:
this PR:
No device removals or crashes; 97 % of main's frames, 97 % of its peak commit. Both runs reach world loading, where frames fall off the same way on this card.
Not tested: the title runs from a local drive, so the UNC game-root path this PR changes is not reached; this is a regression check only.
Written with Claude Code (Claude Opus 5.5) from runs on this machine.
@futurepro62 on GitHub · 2026-11-24 14:25 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
b028903(on its base67a3735).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 736 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.unc_game_root_protects_game_folder_from_writes.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 08:51 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.