fix(security): enforce sk-* UP and UV flags once russh exposes the signature
Maintainer antworten meist innerhalb von 1 Tag
@inureyes arbeitet bereits daran.
Seit 05.11.2026.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- authentication, security
Rechercherichtung
Read docs/UPSTREAM_PR_RUSSH.md and inspect russh’s server/encrypted.rs and src/server/handler.rs to understand the signature handoff; the upstream API change and release are prerequisites. Then trace src/server/auth/publickey.rs and the security key signature code, starting with tests that encode signatures. Done means the real auth flow enforces UP and UV as specified, tests cover both key types and flag failures, and the two security docs are updated.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Depends on #338.
Problem
After #338, bssh-server accepts an [email protected] or [email protected] user key only when its authorized_keys line has no-touch-required and lacks verify-required, because bssh cannot read the signature's flags byte. OpenSSH accepts the other lines too, enforcing user presence (UP, flag 0x01) unless no-touch-required is set and user verification (UV, flag 0x04) when verify-required is set.
Current Behavior
- russh 0.64.1
server/encrypted.rs:1060-1074runsVerifier::verify, then callshandler.auth_publickey(user, key)with the key only, sosrc/server/handler.rs:349never sees the signature. - ssh-key's sk verifiers (
signature.rs:456-490) authenticateSHA256(app) || flags || counter || SHA256(msg)but do not test the flags. The flags byte is the 5th-to-last byte of the decoded signature (flags || u32 countertrailer).
Proposed Solution
- Propose an upstream russh change that passes the verified
Signature(or its sk flags) to the server handler, for example aHandlermethod called after verification with(user, key, signature)whose default delegates toauth_publickey. Record the proposal indocs/UPSTREAM_PR_RUSSH.md. - Once a russh release contains it, bump
russhinCargo.toml. - In
src/server/auth/publickey.rs, for sk keys requireflags & 0x01unless the matching line hasno-touch-required, andflags & 0x04when it hasverify-required. Replace #338's fail-closed rejection with this check.
Acceptance Criteria
- Upstream proposal filed and recorded in
docs/UPSTREAM_PR_RUSSH.md; russh bumped to a release containing it. - UP required by default and relaxed only by
no-touch-required. - UV required when
verify-requiredis set. - Enforced in the real
auth_publickeyflow;docs/security.mdanddocs/openssh-compatibility-status.mdupdated. - Tests sign with
encode_signature(src/ssh/security_key/signature.rs) or fixed vectors, cover both key types, and each fails when its flag check is removed.
Verification
cargo test server::auth
cargo clippy --all-targets -- -D warnings
- Vorherrschende Sprache
- Rust
- Sterne
- 71
- Forks
- 7
- Ø Merge
- 4 Std. 51 Min.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus lablup/bssh
-
feat(ssh): add webauthn-sk host-key supportEvtl. vergeben @inureyes hat das vor 24 Tagen übernommen. Offenpriority:low status:blocked type:enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
lablup/bssh#345 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix(security): verify the server host key presented on re-keyEvtl. vergeben @inureyes hat das vor 24 Tagen übernommen. Offenpriority:low status:blocked type:security
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
lablup/bssh#336 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
feat(agent): bind destination-constrained agent keys with [email protected]Evtl. vergeben @inureyes hat das vor 24 Tagen übernommen. Offenpriority:medium status:blocked type:enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
lablup/bssh#327 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
perf(sftp): adopt the russh-sftp borrowed write API in upload dispatchEvtl. vergeben @inureyes hat das vor 24 Tagen übernommen. Offenpriority:medium status:backlog type:performance
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
lablup/bssh#323 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
feat: Implement real-time streaming output with interactive multi-node UIEvtl. vergeben @inureyes hat das vor 396 Tagen übernommen. Offenpriority:medium status:backlog type:enhancement
lablup/bssh#68 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
area:ui effort:medium enhancement P7 source:agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
marketing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
documentation priority: low tech-debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
nledford/Ladderback#1823 ·
Maintainer antworten meist innerhalb von 1 Tag
-
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)Evtl. vergeben @ealwanlee hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
psmux/psmux-plugins#47 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag