Add bounds checking for relocation entries in RelinkerPipeline and up… #298
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/298"
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 Praetorian0420 on 2026-10-01T23:23:23Z.
…date tests
What
Tested
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T05:40:17Z.
Thanks for looking at relocation bounds. A few things before this can go in. The template is empty, so please fill in What, Tested and the checklist, including its last line. The workflow edits (pr-overlap.yml and progress.yml) are a separate topic and should be their own PR. The new optional_plt case fails on both CI jobs: main already rejects DT_RELA 0x2000 with "Virtual address not mapped by any PT_LOAD segment" before your check runs, so the fixture needs a table that is mapped but runs past the end of the file (for example a valid DT_RELA with an oversized DT_RELASZ). Please also drop the merge commit and rebase onto current main.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T23:37:48Z.
Thanks for bringing this up to date with main. The points from my earlier comment are still open (template, the separate workflow edits, the
bad-rela-rangefixture and the merge commits), and CI now also shows a second failure (run 37382987112, both jobs):The change in
RelinkerPipeline.cppreplaces main's checkwith the two
validateRelaRangecalls, so an oversizedDT_STRSZis no longer rejected. Please keep that check and add the relocation checks next to it.optional_pltstill fails inbad-rela-rangefor the reason I gave before:DT_RELA = 0x2000isn't mapped by anyPT_LOAD, so the address translation rejects it before your check runs. A mappedDT_RELAwith aDT_RELASZthat runs past the end of the file would reach the new check.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T21:20:20Z.
Thanks for looking at relocation bounds. I'm closing this for now, since the points from 10-04 and 10-05 are still open and the branch has drifted from main:
DT_STRSZcheck (Dynamic string table is out of bounds) fromRelinkerPipeline.cpp.pr-overlap.ymlandprogress.ymledits, and the template is empty.extractRelativeloop.If you decide to continue, please reopen with a branch rebased on current main that only changes the relocation bounds, with the template filled in and a fixture that fails on main.
Pull request closed