loader(windows): reject non-simple, ADS, and NUL title DLL import names #94
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!94
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/94/head"
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?
@Androtim on GitHub · 2026-11-29 09:34 UTC · original
Androtim:feat/iter95-loader-reject-non-simple-dll-names→main· +67 −2 · 1 files · 1 commits · merged 2026-11-29 10:05 UTCSummary
Adapted from upstream
VIctory-NVIDIA(de2574d0, GPL-3.0), extracted cleanly onorigin/main(5d40f8b) with zero overlap against any open PR:crates/victory-loader/src/windows.rs): Addsis_simple_title_dll_name()insidemap_dll()afterseen/wantedchecks and beforedirs.0.join(&name)so non-simple module names (parent components, subdirectories, drive/UNC prefixes, NTFS:alternate streams, and embedded\0) are ignored with a warning log.Verification
cargo xtask policy:asset policy: 303 files okcargo test -p victory-loader --lib --locked: 54 passed; 0 failed (including 5 newwindows::tests::*cases)cargo clippy --workspace --all-targets --locked -- -D warnings: 0 warningscargo clippy --workspace --all-targets --features diagnostics --locked -- -D warnings: 0 warnings@Androtim on GitHub · 2026-11-29 10:02 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingReview Summary
Clean, well-scoped security hardening in
crates/victory-loader/src/windows.rs.map_dll(): Reordersseen.insert/wanted(&name)checks ahead ofdirs.0.join(&name)and guards path joining withis_simple_title_dll_name(&name), logging atracing::warn!and returningOk(())for rejected names. This preserves host/HLE import filtering while preventing untrusted PE import/delay-import names (orload_title_dllinputs) from escapingtitle_dirvia relative traversal, subdirectories, drive/UNC prefixes, NTFS alternate data streams (:), or embedded NUL bytes (\0).is_simple_title_dll_name(): Checksname.contains([':', '\0'])and verifiesPath::new(name).components()yields exactly oneComponent::Normal(_), with a clear doc comment noting the lexical scope (symlink/reparse-point containment left to future canonicalization).windows::testscovering normal DLL names, parent traversal (../,..\), subdirectories, ADS/NUL, and rooted/drive/UNC/verbatim prefixes.Verdict:
merge-candidate(automated triage review; not a formal maintainer approval).Generated with Antigravity CLI (
agy).github-bot referenced this pull request2026-12-04 04:14:43 +00:00