[pull] master from erlang:master#830
Merged
Merged
Conversation
Tighten e/f validation from inclusive [1, p-1] to strict (1 < e < p-1)
on all plain-DH and GEX paths. Add missing 1 < K < p-1 check on the
plain-DH client path (handle_kexdh_reply), matching what the GEX code
already enforced.
The RFCs (4253 §8, 4419 §3) only require inclusive bounds for e/f, but
OpenSSH and Go both enforce strict bounds. The K check on plain DH is
defense-in-depth — with safe primes and strict e/f, K ∈ {1, p-1} cannot
occur, but the check guards against crypto backend bugs at zero cost.
No interop risk: no legitimate peer sends e ∈ {0, 1, p-1, p}.
The "duplicated ssh_msg_kexdh_init" sub-flow expected disconnect
immediately after kexdh_reply, but the server sends newkeys as part
of normal first-kexdh_init processing before it detects the duplicate
in {new_keys,server,init} state. On debug/lock-counting builds the
timing makes newkeys (or tcp_closed) arrive before disconnect.
Accept any of newkeys, disconnect, or tcp_closed after kexdh_reply.
The actual violation assertion is already verified through
event_logged(server, Events, "KEX strict violation") in
kex_strict_helper/3.
The interrupted_send test calls ssh:close/1 after the listener
collects its expected echo data, while the sender is still pushing
the remaining 6 MB. The connection teardown can race with the
ongoing send, causing {error, closed} instead of ok.
Accept both outcomes since the test's purpose is to verify the
listener received correct data, not that the full send completes.
* raimo/test-cuddle: Relax test for Knot nameserver start to accomodate new versions Fix obvious misspelling bug Figure out why subsequent suites sometimes fail
* maint: Relax test for Knot nameserver start to accomodate new versions Fix obvious misspelling bug Figure out why subsequent suites sometimes fail
* kuba/ssh/kpef_limits/OTP-20229: ssh: tighten DH bounds to 1<e<p-1 and add K check
…' into maint * u3s_otp/kuba/ssh/fix_flaky_ssh_protocol: fixup: Use record syntax ssh: Fix kex_strict_violation test race on debug builds
* kuba/ssh/fix_flaky_ssh_connection_test: ssh test: Fix flaky interrupted_send race condition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )