Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Firecracker backend: distinct TSC per sibling after restore

Open
#3 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start at forkd-vmm::ForkOpts and trace how its options reach Firecracker's snapshot/restore TSC configuration. Check the existing snapshot/restore tests or add coverage there. Done means randomize_tsc: true gives children distinct TSC offsets and the default is true.

Written by the indexing model from the issue text.

Description

backend:firecracker enhancement help wanted needs-verification

Problem

On the Firecracker backend (sandstormd --backend firecracker, crates/sandstorm-core/src/node/firecracker.rs), every child forked from one tag restores the same vmstate. If the vCPUs' TSC state comes back identical too, then sibling sandboxes on one node read the same TSC, and timing side channels between them get easier. Log correlation across siblings also suffers.

This applies only to the Firecracker backend. gVisor, the default, has no guest kernel reading a TSC.

What we know

  • The v0.5 DESIGN.md said Firecracker assigns a fresh tsc_offset on restore. Nothing ever tested it, the upstream snapshot docs do not promise it, and no current doc makes the claim.
  • The backend fixes the guest's wall clock after every restore (sync_clock, date -s through the agent). That covers wall time, not the TSC.
  • ADR 11 already asks whether the clock needs setting after a long cgroup.freeze as well. That belongs in the same test.

To do

  1. Verify first. On a KVM host, fork one tag into at least two children on the same node, and read rdtsc (and CLOCK_MONOTONIC_RAW) in each through exec, at the same host instant. Then do the same after a freeze and thaw, and after a checkpoint and restore.
  2. If the offsets already differ, close this issue with the captured output, and add one line to docs/SECURITY.md saying so.
  3. If they do not, add a per-restore TSC offset in Firecracker::restore, using whatever the installed upstream Firecracker exposes for it. Make the test from step 1 its regression test.

Acceptance

  • A KVM test showing two siblings from one tag read different TSC values at the same host instant, both after fork and after thaw.
  • docs/SECURITY.md states what is guaranteed, with the test as evidence.

Blocked on a KVM host: none of the project's machines has /dev/kvm.

Dominant language
Rust
Stars
2.9k
Forks
227
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deeplethe/forkd

All issues in deeplethe/forkd

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.