xmem: XMemMapPhysicalPages trusts n (unchecked n * PAGE and slice length) #224
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#224
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@kekonn on GitHub · 2026-11-26 12:00 UTC · original
crates/victory-hle/src/modules/xmem.rs:1198builds the page list withstd::slice::from_raw_parts(pages, n), and ~1216 callsunmap(&mut physical, base, n * PAGE). Neither is checked. Release builds don't check for overflow, son * PAGEandbase + leninunmap(~1852) can wrap.XMemAllocatePhysicalPagesalready useschecked_mul(~651), so this function is the odd one out.When: only with an absurd
nfrom the title, which a valid title never passes. This is hardening.Generated by Claude Code
github-bot referenced this issue2026-11-26 12:10:26 +00:00
github-bot referenced this issue2026-11-26 12:41:33 +00:00