Skip to content

Harden PKIX load before production load/save use #539

Description

@lodekeeper

Parent tracker: ChainSafe/lodestar#9647
Origin: follow-up from the 2026-08-04 blst-z/lodestar-z audit comment on ChainSafe/lodestar#9647.

Problem

pkix.load / pkix.save are intended for an application-owned local cache snapshot, not operator-provided or cross-network input. The loader already checks framing, ABI compatibility, file size, capacity bounds, and checksum. Because the whole file is checksummed, restored affine points do not need separate semantic validation as long as the file remains inside that application-owned cache boundary.

This is acceptable while Lodestar does not call pubkeyCache.load/save today, and remains acceptable if future production use keeps the file under an application-owned, network-scoped cache path. Before wiring PKIX snapshots into production, the application should make that trust boundary explicit and avoid treating the file as generic user input.

Acceptance Criteria

  • Document the production trust boundary as application-owned local cache only.
  • Keep the current capacity/file-size bounds, and add tests that crafted headers cannot force excessive allocation.
  • Add malformed/corrupt/checksum fixture coverage for the chosen behavior.
  • Ensure the application owns network scoping for the cache path; no separate "wrong-network" PKIX fixture is required.
  • Link the Lodestar PR/commit that first wires production load/save usage, if any.

Notes

This is not a current Lodestar #9728 blocker because Lodestar does not call pubkeyCache.load/save today. It is a gate before making PKIX snapshots part of a production startup path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions