Commit Graph
648 Commits
Author SHA1 Message Date
Dean 750eb13d87 Merge pull request #6401 from MarcZX100/codex/windows-tls-eof-read-6391
fix(relinker): guard TLS instruction byte access at EOF
2026-10-17 18:15:00 +13:00
Dean 696c5f3516 Merge pull request #6156 from MarcZX100/codex/relinker-guest-dir-identity
fix(relinker): compare guest module directories by identity
2026-10-17 18:00:53 +13:00
Adrià a3250608a5 Merge pull request #6080 from Zinebyte/fix/linux-guest-weak-imports
fix(relinker): preserve weak imports in Linux guest modules
2026-10-17 06:53:43 +02:00
Adrià e3a8e44305 Merge pull request #6027 from nikowolf123/test/file-writer-own-executable
test(relinker): run the file writer's replacement test on a copy of itself
2026-10-17 05:27:59 +02:00
Dean e1ac3300d3 Merge pull request #6224 from Agnibha007/fix/linux-fixed-base-relocated-phdrs
fix(relinker): rebase the relocated program header table at a fixed Linux base
2026-10-17 14:41:25 +13:00
Adrià 8c90c879e0 Merge pull request #5990 from Get-fix/ps4/windows-libc-for-libkernel
fix(relinker): search libc.prx for libkernel-only Windows executables
2026-10-17 01:16:00 +02:00
Adrià c1d72d9335 Merge pull request #5890 from Piglit09/phase1/tls-protected-entry
fix(relinker): protect Windows TLS code entry roots
2026-10-17 00:15:50 +02:00
Adrià 4664b28976 Merge pull request #5812 from NumberGuan/codex/reject-non-executable-elf-types
fix(relinker): reject core and untyped ELF conversion inputs
2026-10-16 21:23:30 +02:00
Adrià 383cb26339 Merge pull request #5614 from JJenkx/fix/linux-guest-finalizer-arguments
fix(relinker): clear Linux guest finalizer arguments
2026-10-16 21:23:12 +02:00
Agnibha Mukherjee 2cf75dbbfa test(relinker): assert entry mapping for grown fixed-base table 2026-10-16 09:23:12 +05:30
Adrià e967594f62 Merge pull request #5868 from Lorkydey/fix/autorun-system-failure
fix(relinker): propagate POSIX autorun failures
2026-10-15 23:01:29 +02:00
Adrià 15a60e1455 Merge pull request #5762 from AlexOfTheForest/fix/rosetta-legacy-compare
fix(relinker): move legacy CMPSS and CMPSD out of line for Rosetta
2026-10-15 20:34:12 +02:00
Get-fix 8c34587598 fix(relinker): search libc.prx for libkernel-only Windows executables
AnyPS5 exports some libkernel functions, such as __error, from
libc.prx, which libkernel.prx links. On Linux they resolve through that
dependency. On Windows, the import stubs search only the listed
modules, and libc.prx was listed only when libSceLibcInternal.prx was
needed. A PS4 homebrew that needs libkernel.prx but no C library (the
OpenOrbis graphics sample) failed with "unresolved ELF import
9BcDykPmo1I". libc.prx is now also listed when libkernel.prx is needed.
PS5 executables need libSceLibcInternal.prx and convert unchanged.
2026-10-15 21:02:31 +03:00
Adrià 3bb409b603 Merge pull request #5784 from gguerra26/fix/macos-m1-andn
fix(relinker): lower ANDN in Rosetta conversion
2026-10-15 19:25:06 +02:00
Adrià 0029e62f97 Merge pull request #5773 from fogydes/fix/relinker-eh-frame-unwind-address-overflow-guards
fix(relinker): guard against address underflow in encoded unwind pointers and reject zero FDE CIE offset
2026-10-15 17:53:08 +02:00
Tomás Ortellado 95410ad9e6 refactor(relinker): read ELF header once during validation 2026-10-15 11:11:11 -03:00
Tomás Ortellado e28dbf7666 fix(relinker): reject core and untyped ELF conversion inputs 2026-10-15 11:11:11 -03:00
MarcZX100 2a65acd86c fix(relinker): guard TLS instruction byte access at EOF 2026-10-15 14:05:06 +00:00
Adrià 5c0cc1bba4 Merge pull request #5755 from AlexOfTheForest/fix/decoder-rip-far-indirect
fix(relinker): report RIP-relative operands of far indirect CALL and JMP
2026-10-15 15:58:16 +02:00
Adrià 0c32e8dd02 Merge pull request #5741 from IshmamDC217/fix/relinker-load-file-ranges
fix(relinker): check PT_LOAD and uncovered PT_SCE_RELRO file ranges
2026-10-15 15:07:43 +02:00
gguerra26 9b92c55edf fix(relinker): lower ANDN in Rosetta conversion 2026-10-15 15:00:43 +02:00
Adrià 2b8a685dfe Merge pull request #5683 from MarcZX100/codex/rosetta-scalar-compare-5642
fix(relinker): isolate Rosetta scalar compare hazards
2026-10-15 14:57:14 +02:00
Adrià 54ee3c0945 Merge pull request #5675 from fogydes/fix/test-windows-fixed-base-error-mode
test(relinker): suppress Windows error dialog in occupied base collision check
2026-10-15 14:56:20 +02:00
Adrià f3c00ad28e Merge pull request #5670 from fogydes/fix/relinker-cfg-address-overflow-guards
fix(relinker): prevent address overflow and signed UB in CFG, GOT access, and entry point analysis
2026-10-15 14:55:50 +02:00
Adrià f728e37955 Merge pull request #5702 from AlexOfTheForest/test/runtime-layout
test(cli): cover RuntimeLayout file tree output
2026-10-15 14:15:39 +02:00
Adrià 7a22c43027 Merge pull request #5695 from YossiYad/fix/relinker-executable-mode
fix(relinker): write Linux and macOS executables with execute permission
2026-10-15 14:15:08 +02:00
Adrià 7bb2b1f973 Merge pull request #5598 from JJenkx/fix/guest-declared-host-import-registry
fix(relinker): record declared host imports in guest registries
2026-10-15 13:58:59 +02:00
Adrià f50d4335ab Merge pull request #5587 from nikowolf123/fix/relinker-dependency-diagnostics
fix(relinker): name missing and non-PE modules in Windows dependency diagnostics
2026-10-15 13:39:17 +02:00
Adrià 38d2454486 Merge pull request #5559 from JJenkx/fix/guest-executable-import-dependencies
fix(relinker): select guest startup dependencies from required roots
2026-10-15 13:38:52 +02:00
Adrià 341613ab62 Merge pull request #5543 from mariuszkreft/fix/gpu-extra-load-drops-guest-tail
fix(relinker): place the Linux extra PT_LOAD past the last guest page
2026-10-15 13:31:07 +02:00
Ishmam AhmedandClaude Opus 5.5 063cf4894b fix(relinker): drop the PT_LOAD range check made redundant in translation
ReadProgramHeaders now rejects a PT_LOAD whose file range exceeds the
input, so TranslateVirtualAddress no longer needs its own check. An
uncovered PT_SCE_RELRO outside the file reports the same "Segment offset
out of bounds" as a PT_LOAD, and a test pins that a load or uncovered
PT_SCE_RELRO ending exactly at the end of the file is still accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9JfvrCsztJtbkd5SATAzL
2026-10-15 12:16:49 +01:00
Ishmam AhmedandClaude Opus 5.5 d7ebcf7712 fix(relinker): check PT_LOAD and uncovered PT_SCE_RELRO file ranges
ElfReader::ReadProgramHeaders checked that a PT_LOAD's file size does
not exceed its memory size, but not that its file range lies inside the
input. The Windows and macOS writers reject such a segment later; the
Linux patcher keeps the original PT_LOADs and appends its own block at
the old end of the file, so a load reaching past the input mapped the
relinker's .dynstr, .dynsym and entry stub into the guest segment.

A PT_SCE_RELRO that no PT_LOAD covers is turned into a PT_LOAD after
the per-header checks, so it skipped them: a file size larger than its
memory size was accepted for Linux, and Windows and macOS reported a
file-range error instead.

Reject a PT_LOAD whose file range exceeds the input, and run the same
two checks on an uncovered PT_SCE_RELRO before converting it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9JfvrCsztJtbkd5SATAzL
2026-10-15 12:16:49 +01:00
JJenkx a38314933d test(relinker): provide libkernel host fixture for deferred dependencies 2026-10-15 01:41:59 -04:00
JJenkx d94000a096 fix(relinker): load guest providers used by executable imports 2026-10-15 01:40:33 -04:00
JJenkx 39ba223bdd fix(relinker): defer runtime-only guest dependencies 2026-10-15 01:40:33 -04:00
fogydes 65ba674e1b test(relinker): cover negative wrapped pointer rejection with matching FDE segment 2026-10-15 10:53:35 +05:30
fogydes e692264e16 fix(relinker): limit relative unwind pointer overflow check to signed encodings 2026-10-15 10:53:18 +05:30
fogydes 7ffb6713c9 fix(relinker): guard against address underflow in encoded unwind pointers and reject zero FDE CIE offset 2026-10-15 10:53:18 +05:30
Agnibha Mukherjee 8e5073ebe8 fix(relinker): rebase the relocated program header table at a fixed Linux base 2026-10-15 10:32:57 +05:30
m2 (AI Agent) 7f73643e0c test(relinker): name each program-layout check instead of tracking its line 2026-10-15 03:50:14 +02:00
Adrià 839d242405 Merge pull request #5508 from Zinebyte/test/executable-segment-scan-boundaries
test(relinker): cover executable segment scan boundaries
2026-10-15 02:38:28 +02:00
Jota 006e176812 fix(relinker): compare guest module directories by identity
(cherry picked from commit 6e3b80d65bd47344b896af9cbc763033fe6d5be0)
2026-10-14 23:42:30 +00:00
Adrià 8f9240f067 Merge pull request #5512 from zaryabzip/fix/module-dir-executable-input
fix(relinker): skip the input executable when scanning modules for --executable
2026-10-15 00:02:56 +02:00
Zinebyte 875a159f64 fix(relinker): preserve weak imports in Linux guest modules 2026-10-14 17:26:22 -04:00
Adrià 411e5e6d9f Merge pull request #4916 from harry-z-kang/codex/issue-2776-dependency-audit
fix(relinker): audit dependencies without imported functions
2026-10-14 21:44:04 +02:00
Adrià 358e218a4c Merge pull request #5083 from Dripl1x/codex/secondary-loadexec
fix(libSceSystemService): pass LoadExec arguments as the whole guest argv
2026-10-14 21:37:44 +02:00
NikoandClaude Opus 5.5 3abfe906bd test(relinker): run the file writer's replacement test on a copy of itself
The running-executable replacement test copied /bin/sleep under the
names "running" and "leftover" and started the copy. On Ubuntu 26.04
/bin/sleep is the uutils multi-call coreutils binary, which picks the
utility from the file name of the path it was started through, not
from argv[0], so the copy printed "coreutils: unknown program
'running'" and exited, and file_writer_binary and file_writer_text
failed without ever replacing a running executable. The test now
copies its own executable and starts it with a "wait" argument that
sleeps, so it no longer depends on how a system binary reads its name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:31:32 +02:00
Adrià e23eff5f49 Merge pull request #5386 from simonbronk/fix/relinker-macos-weak-imports
fix(relinker): keep weak imports weak in macOS binds
2026-10-14 21:25:57 +02:00
Adrià 067d13037e Merge pull request #5362 from thuanquang/test/guest-module-args-data-segment
test(relinker): keep the guest_module_args fixture's GOT out of executable memory
2026-10-14 20:58:30 +02:00
Kang, Harry Zixuan b2c9e91102 fix(relinker): audit dependencies without imported functions 2026-10-14 20:57:16 +02:00