generated from erix/meta
[BUG] Unselected weak symbol arithmetic rejects a valid strong provider #5
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/lib-dynlink#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Suspected security vulnerabilities must be reported privately using SECURITY.md, not this public form. Remove secrets and unrelated personal data from evidence.
Summary
The ordinary graph resolver computes each matching provider's load address before deciding which binding supplies the relocation. An earlier weak provider whose load base plus symbol value overflows can therefore reject a graph containing a valid later strong provider. Only the selected provider should participate in address arithmetic. Source review also identified an overly broad kind check in the new TLS graph: an unrelated TLS provider can reject a defined ordinary local symbol with the same name.
Reproduction
Use one executable importing
import_symbol, an earlier weak definition with load baseu64::MAXand value 1, and a later strong definition with base 0x500000 and value 0x2000. The weak definition is not selected by the maintained strong-before-weak policy, butresolve_symbol_valuecurrently applies checked addition to it before finding the strong definition. Source-level inspection establishes this control flow; no compiler, test or VM reproduction has been executed under the current testing waiver.For the TLS graph, use a locally defined ordinary symbol and an exported TLS symbol with the same name in another object. The local definition should remain the selected provider; scanning every other provider for TLS kind incorrectly rejects it.
Expected and actual behavior
Expected: select the original defining object and symbol under existing binding policy, then validate that selected provider's kind and arithmetic. The first graph plans the literal address 0x502000; unrelated weak arithmetic or unrelated symbol kinds do not contribute. A selected overflowing provider must still return RelocationOverflow, and a selected TLS/ordinary kind mismatch must still refuse.
Actual source behavior: the ordinary graph returns RelocationOverflow while examining the unused weak candidate. The TLS graph's broad candidate-kind scan can return TlsSymbolMismatch for an unrelated provider. No native mapping or relocation target checks should be weakened to fix either defect.
Environment and identity
Evidence and prior checks
The ordinary resolver source checks each candidate's address before its weak/strong branch. The TLS graph source scans unrelated provider kinds for an ordinary expression. Independent controls will distinguish selected from unselected providers and retain original overflow and target refusal expectations. Tests/builds/lint/VM/profiling/CI observation remain deferred; no pass or measured performance result is claimed.
Tracking
Symbol expression correction, complete TLS, owning review, phase completion. Complete TLS runtime and full EriX/Rust/LLVM guest rebuilding remain open independently of this defect.
Selected original symbol provider correction — 11 October 2026
An unused weak provider cannot cause an unrelated overflow refusal, and an unrelated TLS export cannot reject an ordinary local or selected strong definition. Both ordinary and TLS planning consume this shared selected-provider metadata; no ambient lookup, mapping, native capability or runtime TLS admission is introduced.
Existing TLS parser/image foundations and all original native VM oracles remain; complete native initial/additional TLS initialization, libc, ordinary creation/deployment/lifecycle and required imported consumers remain open.
The source defect is resolved on implementation and authored controls under the testing waiver; complete TLS and native thread acceptance remain open. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.
Tracking: resolved provider defect, complete TLS, native thread acceptance, phase completion.
Related records and contracts
erikinkinen referenced this issue from erix/bootloader2026-10-11 22:38:42 +02:00
erikinkinen referenced this issue from erix/docs2026-10-11 22:38:42 +02:00
erikinkinen referenced this issue from erix/dynlinkd2026-10-11 22:38:43 +02:00
erikinkinen referenced this issue from erix/integration2026-10-11 22:38:45 +02:00
erikinkinen referenced this issue2026-10-11 22:38:45 +02:00
erikinkinen referenced this issue from erix/loaderd2026-10-11 22:38:45 +02:00
erikinkinen referenced this issue from erix/rootd2026-10-11 22:38:46 +02:00