Skip to content

Hardening gVisor sandbox configuration against CPU side-channel risks and binary mismatches #2136

Closed

Description

@destijl

Moving some internal security review bugs to github.

Summary

Untrusted workloads executing within the Substrate environment rely on the gVisor sandbox (runsc) for guest isolation. To prevent cross-tenant and host-level leakage and maintain sandbox integrity across upgrades, the sandbox runtime configuration should be hardened against CPU side-channel attacks and auxiliary binary version divergence.

Technical Details

  1. CPU Core-Sharing Side Channels (SMT):
    Processors utilizing Simultaneous Multithreading (SMT / Hyper-Threading) are susceptible to CPU core-sharing side-channel attacks (e.g., L1TF, MDS) when untrusted code co-locates on sibling logical cores. runsc supports the enable-core-tags flag to isolate guest execution using core scheduling tags. On hardware architectures with SMT enabled, enabling core tagging prevents information leakage across sibling threads.

  2. Sandbox Component Version Alignment:
    runsc resolves auxiliary sidecar binaries located in adjacent directories. If underlying host files or sidecar binaries diverge across upgrades, protocol mismatches or partial patching can weaken sandbox boundaries. Setting --sidecar-release-enforcement-policy=ALWAYS ensures that all spawned auxiliary helper binaries match the exact release build of the main runsc binary.

Code Context

  • cmd/ateom-gvisor/runsc.go: Spawns and configures runsc execution flags for container creation, startup, checkpoint, and restore.

Proposed Mitigations

  1. Evaluate and conditionally set enable-core-tags=true in cmd/ateom-gvisor/runsc.go when running on platforms with hyperthreading / SMT enabled.
  2. Configure --sidecar-release-enforcement-policy=ALWAYS for runsc invocations to guarantee atomic version alignment across runtime binaries.

Activity

  1. added this to the M3 milestone on Oct 2, 2026
  2. zlammerts-svg commented on Oct 12, 2026

    @zlammerts-svg
    Collaborator

    Fabricio Voznika (@fvoznika) checking on this one, do you have more planned changes to close this out? Thank you!

  3. zlammerts-svg commented on Oct 13, 2026

    @zlammerts-svg
    Collaborator

    PR: #2361

  4. BenTheElder commented on Oct 17, 2026

    @BenTheElder
    Collaborator

    #2361 is merged

  5. zlammerts-svg commented on Oct 19, 2026

    @zlammerts-svg
    Collaborator
  6. fvoznika commented on Oct 20, 2026

    @fvoznika
    Collaborator

    Benjamin Elder (@BenTheElder) there is one more PR to enable core tags (#2887).

  7. destijl commented on Oct 21, 2026

    @destijl
    CollaboratorAuthor

    🤖 Reopening: neither of the two mitigations from the issue description has landed on main yet:

    1. SMT core tagging (--enable-core-tags): Pending in open PR Enable runsc core tagging when supported by the kernel #2887 (Fabricio Voznika (@fvoznika)).
    2. Sidecar binary version alignment (--sidecar-release-enforcement-policy=ALWAYS): PR Update default runsc flags configuration #2361 added allow-suid and host-settings=ignore to cmd/ateworker-gvisor/kodata/internal_flags.json, but omitted "sidecar-release-enforcement-policy": "ALWAYS", and PR Enable runsc core tagging when supported by the kernel #2887 does not include it either.

    cc Fabricio Voznika (@fvoznika) Benjamin Elder (@BenTheElder)

  8. fvoznika commented on Oct 21, 2026

    @fvoznika
    Collaborator

    Quick update:

    Core tags: Changes are ready in PR #2887

    Sidecar version check: while the policy verifies that the reported runsc version string is consistent, a version check is not an integrity check—it does not verify that the runsc binary itself is unmodified, nor does it protect any other binaries in the container image from tampering. Because this check executes on every runsc invocation, it introduces a recurring performance penalty without meaningfully improving security.

  9. bootsieh commented on Oct 21, 2026

    @bootsieh
    Collaborator

    Greg Castle (@destijl) if there isn't a cross tenant attack risk here, do we need the version check for M3? Or is there an exploit you are concerned about?

  10. BenTheElder commented on Oct 23, 2026

    @BenTheElder
    Collaborator

    #2887 got kicked from the queue repeatedly for test failures, they're for the egress tests so asked networking team to follow up just as a way to load-shed making progress here.

  11. EItanya commented on Oct 27, 2026

    @EItanya
    Collaborator

    bump Greg Castle (@destijl), getting to the wire in terms of M3 requirements

  12. added a commit that references this issue on Oct 29, 2026
    f315318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/gvisorarea/securitySecurity related issue/prkind/featureAn enhancement / feature request or implementation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions