loader: avoid u32 overflow and odd-block OOB read in dir64_relocations #46
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/46"
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?
Imported from edsuuu/VI-BR-PORT. Originally posted by ahmetbagci8 on 2026-11-29T20:44:43Z.
Problem
In crates/victory-loader/src/prepare.rs, dir64_relocations:
Fix
Loop while entry + 2 <= block_end and use page.checked_add(u32::from(e & 0xFFF)). Added unit test dir64_relocations_skips_overflowing_rva_and_odd_trailing_byte.
Verification