fix(relinker): require a full ELF64 header before reading it #183
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/183"
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 boykopovar/AnyPS5. Originally posted by arreina on 2026-09-30T12:09:02Z.
What
ElfReader::ReadHeaderreads fields up to offset 0x40 but only rejected inputs shorter than 20 bytes. A truncated ELF (20–63 bytes) failed withFileByteOffset out of bounds (offset 0x20)instead ofFile too small for ELF header. The check now requires the full 64-byte ELF64 header.test_elf_header.pycovers tiny, truncated, header-only and bad-magic inputs with synthetic bytes.Tested
Linux (Ubuntu 24.04, GCC 13.3): full build,
ctest65/65 passed. The new test fails without the fix and passes with it. No title used.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt — n/a.mdfiles or images added to the repository🤖 Generated with Claude Code
https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb