loader: bound-check the SELF segment program-header index #1350
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1350
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1350/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?
@HamsterCL on GitHub · 2026-10-10 02:41 UTC · original
HamsterCL:fix/elf-program-header-bounds→main· +2 −0 · 1 files · 1 commits · closed without mergingThe program-header id of a SELF segment is a 12-bit field read from the file.
Elf64::LoadSegmentused it to indexm_phdrwithout a check. It now exits viaEXIT_NOT_IMPLEMENTEDunless the id is belowe_phnum.Split out of the closed #1329 as a one-file change. Built and ran the ctest suite locally on Windows (clang-cl). All pass except image_transfer_layout, which also fails on current main without this change.
@coderabbitai[bot] on GitHub · 2026-10-10 02:45 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
445221d9-7e67-4ad2-b130-ff2a3cb212d1📥 Commits
Reviewing files that changed from the base of the PR and between
679be25c37andd1b72f3be6.📒 Files selected for processing (1)
src/loader/elf.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
📝 Walkthrough
Walkthrough
LoadSegment now returns EXIT_NOT_IMPLEMENTED if the ELF header is null or the SELF segment’s program-header index is outside e_phnum. These checks run before the program-header table is accessed.
Priority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
d1b72The new guard rejects invalid SELF program-header lookups before table access. No actionable merge risk remains.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#1329is closed. It provides historical context only, so it supplies no active coding requirements for this pull request. The current change matches the stated historical context for SELF progra…Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed