-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle unknown pubkeys #68
Conversation
Co-authored-by: Hannes Mehnert <[email protected]> Co-authored-by: Reynir Björnsson <[email protected]>
When a client is offering a public key or a signature we check if the signature algorithm is known to us *and* compatible with the provided public key.
Relevant reading https://www.rfc-editor.org/rfc/rfc8332#section-2 and in section 3.2:
So it seems a client MUST put matching signature algorithms (known as public key algorithms in the RFCs with all its ambiguity). A server MAY reject it. In openssh they seem, for rsa keys, to generally enforce this with the exception of |
When a client tries to authenticate with a public key and a signature we check that the advertised public key algorithm matches what is in the signature.
I don't think it would require much change to support clients that don't probe keys first. I can take a look at implementing that later this week. Otherwise I think this PR is ready. |
thanks a lot |
CHANGES: * FEATURE server: propagate window-change message (mirage/awa-ssh#55 @reynir) * FEATURE server: implement ext-info and server-sig-algs extension (mirage/awa-ssh#56 @reynir) * FEATURE server: support RFC 4419 (group key exchanges) and NIST ECDH key exchanges, and X25519 (mirage/awa-ssh#63 mirage/awa-ssh#67 @hannesm) * FEATURE server: handle unknown public keys (instead of closing the connection, send a message back, allowing other public keys to be probeb) (mirage/awa-ssh#68 @reynir) * BUGFIX server: fix rekey (avoid allocating lots of timeout tasks (mirage/awa-ssh#58 @reynir) * BUGFIX server: filter advertised host key algorithms with used host key (mirage/awa-ssh#62 @hannesm) * server: use logs instead of printf (mirage/awa-ssh#69 @hannesm) * awa-lwt: drop package (unused, mirage/awa-ssh#61 @hannesm) * drop Driver module, embed into awa_test_server.ml (mirage/awa-ssh#64 @hannesm)
This PR delays parsing of public keys offered by clients. This allows clients to offer keys we don't know how to use to the server, and the server can reject them gracefully.
Things to do