Skip to content

update: adopt russh 0.65.1 with staged host-key verification - #353

Merged
inureyes merged 1 commit into
mainfrom
update/upgrade-deps-20261105
Nov 5, 2026
Merged

inureyes merged 1 commit into
mainfrom
update/upgrade-deps-20261105

Conversation

@inureyes

@inureyes inureyes commented Nov 5, 2026

Copy link
Copy Markdown
Member

Summary

Update 10 compatible Rust packages, including russh 0.65.0 → 0.65.1. Its security fix moves kex_done after check_server_key, breaking bssh's reliance on the opposite callback order. Rework initial host verification into two stages: preflight trust/revocation without persistence, then check the negotiated key type and commit trust before russh releases the connected handle for authentication. The raw KEX shared secret remains unused.

  • Defer TOFU files, process pins, verified-key state, and rotation permission; recheck concurrent file/pin changes under the existing locks at commit.
  • Run KnownHostsCommand once, consolidate recording through atomic updates, and preserve existing permissions and configured symlinks.
  • Keep mismatched algorithms/curves/certificate types fail-closed. Existing upstream PRs #764/#766/#767/#794 were already adopted; they do not replace this type check. Rekey verification remains the separate upstream limitation tracked in fix(security): verify the server host key presented on re-key #336.

Dependencies and limits

The sole Rust workspace has no web/pnpm projects. Nine other compatible upgrades: aes, async-compression, cc, compression-codecs, crc32fast, ctutils, finl_unicode, pest_stack_guard, psm. No major upgrade or MSRV change (1.97).

Retain ssh-key =0.7.0-rc.11 to match russh. Transitive holds: generic-array 0.14.7 → 0.14.9 is blocked by crypto-common 0.1.7; pkcs1 rc.4 → stable and rsa rc.18 → rc.20 are pinned by russh. cargo audit retains only the existing unsafe-libyaml maintenance warning and existing RSA advisory suppression.

Validation

cargo test --tests -- --skip integration_test: 2,648 passed, 8 ignored across 54 suites. cargo clippy --all-targets -- -D warnings, formatting, and diff checks pass. Regression coverage checks absent persistence on mismatches, pre-KEX trust rejection, commit-time conflicts, single command execution, symlink preservation, and the real russh authentication/certificate paths. Linux/Windows cross-checks are blocked by missing C compiler/SDK headers in aws-lc-sys, also present before this update; remote Linux/macOS checks run on this PR.

Update ten Rust dependencies. Adapt to russh's security-driven callback order by preflighting host trust without persistence, then checking the negotiated key type and committing trust before authentication. Recheck concurrent TOFU changes and preserve existing file modes and symlinks during atomic writes.

Validation: 2,648 tests passed, 8 ignored; all-target Clippy and formatting pass. Audit retains the existing maintenance warning and RSA suppression. Local Linux/Windows cross-checks remain blocked by missing C toolchains. Rekey trust remains tracked in #336.
@inureyes inureyes added type:enhancement New feature or request status:done Completed priority:high High priority issue labels Nov 5, 2026
@inureyes
inureyes merged commit ae7350d into main Nov 5, 2026
5 checks passed
@inureyes
inureyes deleted the update/upgrade-deps-20261105 branch November 5, 2026 08:38
inureyes added a commit that referenced this pull request Nov 5, 2026
Bump the crate, lockfile, and manpages to 3.1.1 and add release entries to README, CHANGELOG, and debian/changelog covering #349, #350, #352, and #353: the cluster command argument fix, the russh 0.65.1 upgrade with staged host-key verification, session-bind on agent connections, and the dependency refresh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high High priority issue status:done Completed type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant