[BUG] Unselected weak symbol arithmetic rejects a valid strong provider #5

Closed
opened 2026-10-11 22:34:27 +02:00 by erikinkinen · 0 comments
Owner

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 base u64::MAX and 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, but resolve_symbol_value currently 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

  • Component repository/revision and Integration source graph: LibDynlink f5ccc74f, Integration 80fc4fa3.
  • Image profile, digest and build/runtime configuration: pure caller-supplied graph metadata; no image has been built or booted for this observation.
  • Hardware or VM, architecture, firmware and toolchain versions: no hardware/VM execution; prospective ELF64 x86-64 graph planning.
  • Input/session route and granted authority relevant to reproduction: explicit original table/graph slices and writable-target metadata only; no service, mapping, filesystem or native process authority.
  • Last known working revision, if known: unknown; this report does not infer a runtime regression date.

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
Repository Links
bootloader PR 3
docs PR 4
dynlinkd PR 3
integration PR 12
loaderd PR 2
rootd PR 2
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 base `u64::MAX` and 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, but `resolve_symbol_value` currently 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 - Component repository/revision and Integration source graph: [LibDynlink f5ccc74f](https://git.erikinkinen.fi/erix/lib-dynlink/commit/f5ccc74faac2582981c749def03a3d56911ee822), [Integration 80fc4fa3](https://git.erikinkinen.fi/erix/integration/commit/80fc4fa37eac676414c2d67b7b8c8857789db23d). - Image profile, digest and build/runtime configuration: pure caller-supplied graph metadata; no image has been built or booted for this observation. - Hardware or VM, architecture, firmware and toolchain versions: no hardware/VM execution; prospective ELF64 x86-64 graph planning. - Input/session route and granted authority relevant to reproduction: explicit original table/graph slices and writable-target metadata only; no service, mapping, filesystem or native process authority. - Last known working revision, if known: unknown; this report does not infer a runtime regression date. ## Evidence and prior checks The [ordinary resolver source](https://git.erikinkinen.fi/erix/lib-dynlink/src/commit/f5ccc74faac2582981c749def03a3d56911ee822/src/graph.rs) checks each candidate's address before its weak/strong branch. The [TLS graph source](https://git.erikinkinen.fi/erix/lib-dynlink/src/commit/f5ccc74faac2582981c749def03a3d56911ee822/src/graph/tls.rs) 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](https://git.erikinkinen.fi/erix/lib-dynlink/issues/2), [complete TLS](https://git.erikinkinen.fi/erix/lib-dynlink/issues/4), [owning review](https://git.erikinkinen.fi/erix/lib-dynlink/pulls/3), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). 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](https://git.erikinkinen.fi/erix/lib-dynlink/issues/5), [complete TLS](https://git.erikinkinen.fi/erix/lib-dynlink/issues/4), [native thread acceptance](https://git.erikinkinen.fi/erix/kernel/issues/47), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | bootloader | [PR 3](https://git.erikinkinen.fi/erix/bootloader/pulls/3) | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | dynlinkd | [PR 3](https://git.erikinkinen.fi/erix/dynlinkd/pulls/3) | | integration | [PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12) | | loaderd | [PR 2](https://git.erikinkinen.fi/erix/loaderd/pulls/2) | | rootd | [PR 2](https://git.erikinkinen.fi/erix/rootd/pulls/2) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:43 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/lib-dynlink#5
No description provided.