fix(security): verify the server host key presented on re-key
Les mainteneurs répondent en général sous 1 jour
@inureyes y travaille déjà.
Depuis le 5/11/2026.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
Read docs/openssh-compatibility-status.md and inspect the SSH client handler in src/ssh/tokio_client/connection.rs, along with the russh re-key behavior described in the issue. First determine when a released russh version exposes the re-key host key; then implement the stated verification behavior and add a scripted or in-process server test that changes its host key. Done means the test rejects a changed key until bssh verifies it, and the compatibility status records the upstream version and gap.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Problem
OpenSSH 10.3p1 verifies the host key on every key exchange, re-keys included: kex_verify_host_key (kex.c:1189) is called from kexgen.c:167 and kexgexc.c:169. verify_host_key (sshconnect.c) skips the check only when the key equals previous_host_key (sshconnect.c:1497, cached at 1564-1565). A different key on re-key goes through known_hosts, KnownHostsCommand, RevokedHostKeys and CA rules again.
russh 0.64.1 calls Handler::check_server_key only on the initial exchange (src/client/mod.rs around 2005-2021, the else branch of if session.common.encrypted.is_some()). On a re-key it verifies the exchange signature with the presented key (src/client/kex.rs:337) but never passes that key or certificate to the handler. bssh's handler (src/ssh/tokio_client/connection.rs:3744) never sees it, so the re-key host key is accepted unchecked.
Severity
Low: a re-key runs inside the encrypted transport, so a network attacker cannot inject a key without the session keys. The gap matters for a server that changes or loses its key mid-session, and for parity with OpenSSH policy (RevokedHostKeys, the host-key type match added in #333).
Blocked on upstream
bssh consumes only released upstream russh, with no fork (dependency boundary in docs/openssh-compatibility-status.md). russh must first either call check_server_key (or a new re-key callback) on re-key, or expose the re-key host key to the client. #327 is blocked for the same handler-visibility reason (russh PR #794).
Acceptance Criteria
- A released upstream russh version exposes the re-key host key or certificate to the client handler, and that version is recorded in
docs/openssh-compatibility-status.md. - bssh accepts a re-key whose host key equals the key verified at connection start without re-running verification, and runs the full verification (the
check_server_keypath, including certificates,RevokedHostKeysand the negotiated-algorithm type match) when the key differs, failing the connection on rejection. - A test against a scripted or in-process server that changes its host key on re-key fails before the change and passes after.
- Until upstream lands,
docs/openssh-compatibility-status.mdlists this gap as its own entry (today it is only a sentence in the host-certificate paragraph).
- Langage dominant
- Rust
- Étoiles
- 71
- Forks
- 7
- Merge moyen
- 4 h 51 min
- PR mergées (30 j)
- 14
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de lablup/bssh
-
feat(ssh): add webauthn-sk host-key supportPeut-être pris @inureyes l’a pris il y a 24 jours. Ouvertepriority:low status:blocked type:enhancement
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
lablup/bssh#345 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
fix(security): enforce sk-* UP and UV flags once russh exposes the signaturePeut-être pris @inureyes l’a pris il y a 24 jours. Ouvertepriority:medium status:blocked type:security
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
lablup/bssh#340 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
feat(agent): bind destination-constrained agent keys with [email protected]Peut-être pris @inureyes l’a pris il y a 24 jours. Ouvertepriority:medium status:blocked type:enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
lablup/bssh#327 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
perf(sftp): adopt the russh-sftp borrowed write API in upload dispatchPeut-être pris @inureyes l’a pris il y a 24 jours. Ouvertepriority:medium status:backlog type:performance
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
lablup/bssh#323 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
feat: Implement real-time streaming output with interactive multi-node UIPeut-être pris @inureyes l’a pris il y a 396 jours. Ouvertepriority:medium status:backlog type:enhancement
lablup/bssh#68 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de lablup/bssh
Issues similaires
-
area:ui effort:medium enhancement P7 source:agent
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
marketing
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Read a requested CodeRabbit PR review's findings with `coderabbit pullrequest --show-threads`Ouvertedocumentation priority: low tech-debt
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
nledford/Ladderback#1823 ·
Les mainteneurs répondent en général sous 1 jour
-
psmux-resurrect: restoring a session with a numeric name puts its windows into the wrong session (`new-window -t 4` is read as window 4)Peut-être pris @ealwanlee l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
psmux/psmux-plugins#47 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 87/100
Les mainteneurs répondent en général sous 1 jour