Commit Graph
1161 Commits
Author SHA1 Message Date
Dean 7c3d8b3bbb Merge pull request #11007 from al3ss4ndrolb/test/suggest-patches-resolved-temp-root
test(relinker): compare patch advisor output against the resolved temporary root
2026-10-27 09:15:45 +13:00
Dean 3fa7e3f9cc Merge pull request #10545 from Bram910/fix/file-prefix-allocation
fix(io): avoid allocating the entire file prefix limit
2026-10-27 09:00:30 +13:00
Adrià cabd860cbe Merge pull request #10439 from KSWORK2001/fix/relinker-syscall-number-paths
fix(relinker): agree on the syscall number between the two constant-load paths
2026-10-26 19:10:09 +01:00
Adrià aa04180e37 Merge pull request #10391 from roboterspinne/fix/relinker-macos-relocation-message
fix(relinker): drop Windows from errors the macOS target also reports
2026-10-26 19:10:01 +01:00
Dean ae17955d2c Merge pull request #10945 from roboterspinne/fix/relinker-windows-lazy-stub-alignment
fix(relinker): align the stack in Windows lazy import failure stubs
2026-10-27 05:53:57 +13:00
Dean 50ef454b5a Merge pull request #11082 from roboterspinne/fix/relinker-windows-fixed-base-user-limit
fix(relinker): keep fixed Windows images below the highest user address
2026-10-27 05:40:54 +13:00
Dean 728266059d Merge pull request #11063 from roboterspinne/fix/relinker-red-zone-pop-rm-xop
fix(relinker): stop reading pop r/m without REX as XOP in red-zone framing
2026-10-27 05:40:19 +13:00
Dean b73c5659a5 Merge pull request #11000 from plexerPK/fix/windows-empty-tls-file-offset
fix(relinker): accept empty TLS images beyond EOF on Windows
2026-10-27 05:35:55 +13:00
Dean 47d389e6da Merge pull request #10561 from vingelvatten/fix/relinker-dynamic-segment-tail
fix(relinker): accept PT_DYNAMIC data after DT_NULL
2026-10-27 05:27:55 +13:00
review 044e52a2f0 Merge commit 'refs/review/9669/head' into HEAD 2026-10-26 14:10:41 +01:00
Dean 190386eb70 Merge pull request #11058 from plexerPK/fix/executable-tls-symbol-bounds
fix(relinker): reject out-of-range executable TLS symbols
2026-10-27 00:59:47 +13:00
fogydes 719701a68e fix(libkernel): follow the measured exec lookup and image checks 2026-10-26 16:19:46 +05:30
Adrià 01cd4a42df Merge pull request #9711 from milescoviello/test/input-magic-asan
test(relinker): bound input_magic's large input with ASan's allocation cap
2026-10-26 11:35:00 +01:00
Adrià cbf76e7a6e Merge pull request #9408 from rursache/feat/macos-trace-imports
feat(relinker): trace function imports on macOS
2026-10-26 11:27:51 +01:00
fogydes f53346a288 feat(libkernel): implement execv, execvp and execve process replacement 2026-10-26 14:51:38 +05:30
Dean ec9256a042 Merge pull request #10852 from Mherberts/codex/fix-elf-section-table-alignment
fix(relinker): align ELF64 section header tables
2026-10-26 22:03:40 +13:00
Dean fb5afb3ef7 Merge pull request #8236 from javierUDP/test/rosetta-inplace-execution
test(relinker): execute the in-place Rosetta replacements
2026-10-26 21:59:04 +13:00
plexerPK 5f4c8cb927 fix(relinker): reject executable TLS symbols outside their block 2026-10-26 08:45:23 +01:00
Dean f33c06b639 Merge pull request #10862 from hakarrr/patch-2
test(relinker): compile the executable-exports probe on glibc before 2.36
2026-10-26 20:38:48 +13:00
Dean b744c37f4e Merge pull request #8076 from brainiac91/fix/relinker-embedded-data-tables
fix(relinker): mask embedded data tables in inter-FDE gaps
2026-10-26 20:36:58 +13:00
Dean 637397576b Merge pull request #10102 from JJenkx/windows/relinker-trailing-note
fix(relinker): ignore an unmapped note segment outside a module's file
2026-10-26 20:34:57 +13:00
Dean 2bdd30ebe6 Merge pull request #10719 from WhiteAssassins/feat/patch-advisor-list-verified
feat(tools): list verified patch catalog entries
2026-10-26 20:00:41 +13:00
VingelvattenandClaude Opus 5.5 0103719e10 Merge branch 'main' into fix/relinker-dynamic-segment-tail
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 07:37:56 +01:00
Dean e3657de5e4 Merge pull request #10402 from roboterspinne/fix/relinker-linux-load-bounds
fix(relinker): require the Linux entry, relocation offsets and DT_PLTGOT in PT_LOAD memory
2026-10-26 16:30:06 +13:00
Karan Shrivastava 0f45390a92 fix(relinker): agree on the syscall number between the two constant-load paths 2026-10-25 23:00:48 -04:00
Dean db1a91f42b Merge pull request #10303 from Bram910/fix/native-path-null-bytes
fix(io): reject NUL bytes in native file paths
2026-10-26 14:39:36 +13:00
Dean dbf4f6aa3f Merge pull request #10607 from roboterspinne/fix/relinker-linux-run-path
fix(relinker): validate every entry of the Linux run path
2026-10-26 14:26:39 +13:00
Dean 98891b5a0a Merge pull request #10403 from roboterspinne/fix/relinker-reject-second-pt-dynamic
fix(relinker): reject a second PT_DYNAMIC segment
2026-10-26 14:15:52 +13:00
Brainiac91 133ae3261f fix(relinker): only end the gap mask at a block that holds a syscall
A chain of table bytes that decodes to a return after a padding run looked
like trailing gap code and stopped the mask inside a real table, which hands
the rest of it back to the decoder. Truncating now needs the block to contain
a syscall, or to end where the gap turns into padding, so a 2 KiB table with
00/cc/90 runs and return-like bytes stays masked.
2026-10-26 02:02:49 +02:00
Brainiac91 3cb3e8f53b fix(relinker): end the data table mask at a control-flow terminator
A gap that holds a table, padding and then a syscall stub followed by
non-padding data classified the stub as invalid, so the mask ran to the end
of the gap and hid the syscall from the scan. Mark any instruction that ends
control flow as a terminator, which stops the mask before that block.

Covered by the helper test and by the SCE, SysV and guest-module conversion
tests, which convert before the change and refuse syscall 9 after it.
2026-10-26 01:23:47 +02:00
Brainiac91 ac1dc93255 perf(relinker): binary-search function ranges for gap branch targets
Every pending gap target walked the whole unwind function vector, so a
large executable cost targets x functions. Sort and merge the ranges once,
then use upper_bound for each target.
2026-10-26 01:23:39 +02:00
Adrià 2b5225605b Merge pull request #9719 from AasishDairelSahayaGrinspan/fix/relinker-gs-non-memory-operands
fix(relinker): leave GS-prefixed LEA and NOP instructions unchanged
2026-10-26 00:15:58 +01:00
Dean 1997e647f9 Merge pull request #10017 from SteelCrab/review-split/relinker-import-types
fix(relinker): preserve imported ELF symbol types
2026-10-26 12:11:16 +13:00
Brainiac91 640577c3ec fix(relinker): keep the terminator before a decoded padding suffix
trailing[next] is Padding for an instruction that starts with 00 or CC
even when the rest of its bytes are code, so it is not the same as
padding[next]. The recurrence treated the two as interchangeable and
overwrote the trailing state of a syscall that precedes such an
instruction, which let the fallback extend the mask over it and made
both conversion routes accept the gap. Decide from the trailing state
whether the successor is padding.

The regression covers the table helper plus the executable and guest
module routes; without the correction the executable and module
conversions succeed instead of refusing syscall 9.
2026-10-26 00:37:56 +02:00
Dean dab64bbc52 Merge pull request #9375 from thakrarsagar/codex/relinker-output-path-cache
fix(relinker): avoid repeated output path canonicalization
2026-10-26 11:10:02 +13:00
Dean 905c3e2870 Merge pull request #10647 from Bram910/fix/call-site-hint-prefixes
fix(relinker): resolve BND and NOTRACK call sites
2026-10-26 11:09:02 +13:00
Dean 190aaa23bb Merge pull request #10564 from roboterspinne/fix/relinker-linux-overlapping-loads
fix(relinker): reject overlapping PT_LOAD segments in Linux output
2026-10-26 11:08:08 +13:00
Dean f2c8e1dda4 Merge pull request #9657 from jotitadev/fix/autorun-skip-noop-chmod
fix(relinker): leave an already executable autorun output's mode alone
2026-10-26 11:07:10 +13:00
Dean d4b8883fca Merge pull request #10393 from Bram910/fix/output-temporary-name-length
fix(io): stage long-named outputs with short temporary names
2026-10-26 11:01:21 +13:00
Dean 1926a56886 Merge pull request #9454 from cocoa55/fix/rewriter-branch-into-cut
fix(codegen): reject branches into a rewritten instruction
2026-10-26 11:00:51 +13:00
Dean 64a318c6bc Merge pull request #10424 from Oscar45397/fix/windows-working-directory-unwritten-peb
fix(tests): retry the Windows working directory read until the child has written it
2026-10-26 11:00:19 +13:00
Brainiac91 c8de02cba9 test(relinker): cover 32 large zero gaps in the table analysis
A 2 MiB text with 32 gaps of 64 KiB, the largest gap the analysis
follows, fails the fixture if the padding, trailing-code and syscall
queries go back to a quadratic walk, and asserts the bounded table end.
2026-10-25 23:44:09 +02:00
Brainiac91 56718b3314 fix(relinker): keep non-SCE scans strict while masking gap tables
Read the unwind functions of an image that only has PT_GNU_EH_FRAME so
inter-FDE data tables are still found and masked, but leave the syscall
and call-site scan ranges empty without PT_SCE_DYNLIBDATA as main does.
The fixture now emits standard dynamic tags for its SysV block, and the
debt entry stays within the 1000 character limit.
2026-10-25 23:44:07 +02:00
Dean Galvin e27a9d3e01 test: restore the function layout of the rosetta in-place execution tests 2026-10-26 10:37:03 +13:00
Dean Galvin 099b865f82 Merge branch 'main' into test/rosetta-inplace-execution 2026-10-26 10:32:38 +13:00
Brainiac91 dfe24c2e3a fix(relinker): bound embedded data tables and preserve trailing gap code 2026-10-25 23:25:32 +02:00
Brainiac91 2f3e41252d fix(relinker): mask embedded data tables in inter-FDE gaps
In PS5 Prospero PRX binaries, compilers place embedded constant data tables (such as the OpenSSL Whirlpool lookup table in ubiservices.prx) in inter-FDE gaps after function code, referenced via RIP-relative LEA instructions.

- In RelativeJumpTables, detect constant data tables in inter-FDE gaps that begin with padding, contain no direct branch targets, and contain undecodable non-code bytes, distinguishing them from valid unannotated code routines and multi-hop gap branches.
- In GuestModuleBuilder and RelinkerPipeline, extract unwind functions from PT_GNU_EH_FRAME as well as PT_SCE_DYNLIBDATA, and mask embedded data tables with 0x90 in scan buffers before SyscallScanner.
- In CodeInstructionCollector, populate table boundaries whenever unwind functions are present to prevent addAddressTakenRoot from adding data table addresses to CFG roots on Windows and macOS.
- Update relinker technical debt documentation and add regression tests.

Fixes #7547
Unblocks: PPSA28155 #7547
2026-10-25 23:22:06 +02:00
Adrià 6bc1139698 Merge pull request #9184 from javierUDP/test/scalar-compare-execution
test(relinker): execute the moved scalar compare
2026-10-25 20:36:37 +01:00
Adrià 50bc72bbbc Merge pull request #9513 from harisibrar1/fix/windows-test-output-utf8
test(relinker): decode relinker output as UTF-8 in the path-checking tests
2026-10-25 20:31:26 +01:00
Adrià b1f023dda3 Merge pull request #9486 from harisibrar1/fix/relinker-dlltool-temp-prefix
build(relinker): give dlltool a short temporary prefix for the msvcrt import library
2026-10-25 19:29:55 +01:00