Skip to content

[bug] Config load/save hardening bundle (scrollback clamp, unique temp names, quarantine collisions) #11

Description

@damonLL

Severity: low (bundle). Three persistence-layer robustness gaps:

  1. settings::load_from applies no bounds, so a hand-edited scrollback_lines = 5000000 passes straight to vt100::Parser::new and can exhaust memory (the UI caps at 100000). Clamp on load.
  2. save_to always writes a fixed <path>.tmp in all three config modules; two concurrent nerdterm instances can clobber each other's temp file. Use a unique per-process temp name, and fsync file+dir around the rename to deliver the crash-safety the comment claims.
  3. quarantine() uses a whole-second suffix; two corruptions in the same second overwrite each other's backup. Add a collision-proof suffix.

Locations: src/config/settings.rs:60,100, src/config/address_book.rs:104, src/config/known_hosts.rs:136.


Filed from the 2026-07-09 full-repo review (findings adversarially verified before filing).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreliabilityRobustness, resource handling, teardown

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions