VFS DeleteFileW hides a read-only original and reports success #2945

Open
opened 2026-11-27 03:19:53 +00:00 by CryingLaughing · 0 comments
CryingLaughing commented 2026-11-27 03:19:53 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-27T03:19:53Z.


With the VFS hooks installed, DeleteFileW(L"GAME:\\readonly-original.txt") returns success for a read-only game file and records a deletion marker. The host file still has its read-only attribute and original contents, but the marker hides the game path. Native Windows returned FALSE and ERROR_ACCESS_DENIED (5) for the corresponding unvirtualized read-only control. Windows DeleteFileW contract

The synthetic integration fixture creates a read-only original, a read-only overlay copy, and writable controls. A child process installs the Win32 file hooks and calls DeleteFileW on the virtual paths. The fixture verifies returned errors, visibility, contents and deletion markers. It also checks that a read-only move succeeds and reopens the VFS to verify which markers persist. Synthetic fixture and archived fix

Archived executable Full integration fixture Direct hooked child
Base b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 plus identical test-only fixture 0 passed, 1 failed, exit 101 0 passed, 1 failed, exit 101. The original returned success and appeared in .xcl_whiteouts.
Clean candidate 80cf435643189a0ea2ec31f4e4e5642539b47815 1 passed, 0 failed, exit 0 1 passed, 0 failed, exit 0. Both read-only deletions returned ERROR_ACCESS_DENIED and preserved the files. Only the writable-original deletion and the read-only move persisted markers.

Both direct executions printed VFS: 31 file hooks active. The read-only overlay file in the candidate direct fixture had a 442-character host path. All four serial runs had zero ignored tests and zero capability skips. They ran on Windows 11 25H2 build 26200.9974, Intel Core i5-13600K, with fresh private directories and XCL_NETWORK=0. The full fixture self-launches its own integration executable for the hooked child. For the separate direct reproduction, set XCL_VFS_READONLY_DELETE_TEST_ROOT to a private tree staged with the same synthetic files.

& $testBinary delete_file_respects_readonly_attribute --exact --test-threads=1 --nocapture

The base binary SHA-256 was 55433b030e8d1f66e8c3f7caacbbda2cb94efc700313059acfa12186b535ec7d. The candidate binary SHA-256 was 3d4be8d251afd159d6200a14c0d1959d8599f5e4b0b21e5a38b030e9d7c3b6d5. Current main 8b957bec6f82495aec940944c6bf47faa02db590 matches the archived base’s vfs.rs and vfs_hooks.rs byte for byte. The replay exercised the archived binaries. Pinned main VFS source · Pinned main hook source

This report covers DeleteFileW on a VFS path. The related #998 issue covers deletion through SetFileInformationByHandle. The separately archived retail smoke pair measured startup stability. Whether the title exercised the affected VFS path remains unknown. Related #998 · Archived retail smoke

AI use

  • OpenAI Codex assisted with the archived implementation and synthetic fixture. Codex verified the archived source and binary identities, ran the four focused replays, inspected the deletion markers, and drafted this report. The exact serving variant was unavailable.
<!-- greyfinch-sync:ivall/xcl:issue:6639252119 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2945). Originally posted by [CryingLaughing](https://github.com/CryingLaughing) on 2026-11-27T03:19:53Z. --- With the VFS hooks installed, `DeleteFileW(L"GAME:\\readonly-original.txt")` returns success for a read-only game file and records a deletion marker. The host file still has its read-only attribute and original contents, but the marker hides the game path. Native Windows returned `FALSE` and `ERROR_ACCESS_DENIED` (`5`) for the corresponding unvirtualized read-only control. [Windows `DeleteFileW` contract](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-deletefilew#remarks) The synthetic integration fixture creates a read-only original, a read-only overlay copy, and writable controls. A child process installs the Win32 file hooks and calls `DeleteFileW` on the virtual paths. The fixture verifies returned errors, visibility, contents and deletion markers. It also checks that a read-only move succeeds and reopens the VFS to verify which markers persist. [Synthetic fixture and archived fix](https://github.com/CryingLaughing/xcl/commit/80cf435643189a0ea2ec31f4e4e5642539b47815) | Archived executable | Full integration fixture | Direct hooked child | | --- | --- | --- | | Base `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7` plus identical test-only fixture | 0 passed, 1 failed, exit 101 | 0 passed, 1 failed, exit 101. The original returned success and appeared in `.xcl_whiteouts`. | | Clean candidate `80cf435643189a0ea2ec31f4e4e5642539b47815` | 1 passed, 0 failed, exit 0 | 1 passed, 0 failed, exit 0. Both read-only deletions returned `ERROR_ACCESS_DENIED` and preserved the files. Only the writable-original deletion and the read-only move persisted markers. | Both direct executions printed `VFS: 31 file hooks active`. The read-only overlay file in the candidate direct fixture had a 442-character host path. All four serial runs had zero ignored tests and zero capability skips. They ran on Windows 11 25H2 build 26200.9974, Intel Core i5-13600K, with fresh private directories and `XCL_NETWORK=0`. The full fixture self-launches its own integration executable for the hooked child. For the separate direct reproduction, set `XCL_VFS_READONLY_DELETE_TEST_ROOT` to a private tree staged with the same synthetic files. ```powershell & $testBinary delete_file_respects_readonly_attribute --exact --test-threads=1 --nocapture ``` The base binary SHA-256 was `55433b030e8d1f66e8c3f7caacbbda2cb94efc700313059acfa12186b535ec7d`. The candidate binary SHA-256 was `3d4be8d251afd159d6200a14c0d1959d8599f5e4b0b21e5a38b030e9d7c3b6d5`. Current main `8b957bec6f82495aec940944c6bf47faa02db590` matches the archived base’s `vfs.rs` and `vfs_hooks.rs` byte for byte. The replay exercised the archived binaries. [Pinned main VFS source](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/vfs.rs) · [Pinned main hook source](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/vfs_hooks.rs) This report covers `DeleteFileW` on a VFS path. The related #998 issue covers deletion through `SetFileInformationByHandle`. The separately archived retail smoke pair measured startup stability. Whether the title exercised the affected VFS path remains unknown. [Related #998](https://github.com/xcl-dev/xcl/issues/998) · [Archived retail smoke](https://github.com/xcl-dev/xcl/pull/2809#issuecomment-7195248544) **AI use** - OpenAI Codex assisted with the archived implementation and synthetic fixture. Codex verified the archived source and binary identities, ran the four focused replays, inspected the deletion markers, and drafted this report. The exact serving variant was unavailable.
Sign in to join this conversation.
No labels
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.

Reference
xcl-dev/xcl#2945
No description provided.