-
Notifications
You must be signed in to change notification settings - Fork 589
Description
Most runs, the WinCNG openssh test runs on Appveyor fail at least one test. The actual test changes (e.g. test_password_auth_fails_with_wrong_username, test_keyboard_interactive_auth_fails_with_wrong_response, test_hostkey) and sometimes the WinCNG runs complete without failures, but it's pretty common that at least one fails. It's often on the
VS2015, WinCNG, Shared, x86_64 build (but maybe because that's one of the first WinCNG builds and the tests stop after the first error), but it happens on other WinCNG builds, too, including VS2013, Static and x86 builds, but always with WinCNG.
The tests fail with the error 9: libssh2_session_handshake failed (-8): Unable to exchange encryption keys
. Running the tests with FIXTURE_TRACE_ALL=1
showed this log at the time of failure:
[00:05:13] 5: [libssh2] 0.951417 Transport: Packet type 33 received, length=1078
[00:05:13] 5: [libssh2] 0.951417 Transport: Looking for packet of type: 33
[00:05:13] 5: [libssh2] 0.951417 Key Ex: Server's MD5 Fingerprint: 0c:0e:d1:a5:bb:10:27:5f:76:92:4c:e1:87:ce:5c:5e
[00:05:13] 5: [libssh2] 0.951417 Key Ex: Server's SHA1 Fingerprint: f3:cd:59:e2:91:3f:44:22:b8:0f:7b:0a:82:b2:b8:9e:ae:44:93:87
[00:05:13] 5: [libssh2] 0.951417 Key Ex: Server's SHA256 Fingerprint: kuPaSd88f5moKPUF7YI5OXpdH2KRRFl2D4ePdRD1Y6M=
[00:05:13] 5: [libssh2] 1.045165 Failure Event: -11 - Unable to verify hostkey signature
[00:05:13] 5: [libssh2] 1.045165 Failure Event: -8 - Unrecoverable error exchanging keys
[00:05:13] 5: [libssh2] 1.045165 Failure Event: -8 - Unable to exchange encryption keys
[00:05:13] 5: libssh2_session_handshake failed (-8): Unable to exchange encryption keys
[00:05:13] 5: [libssh2] 1.045165 Transport: Disconnecting: reason=11, desc=test ended, lang=
[00:05:13] 5: => libssh2_transport_write plain (23 bytes)
[00:05:13] 5: 0000: 01 00 00 00 0B 00 00 00 0A 74 65 73 74 20 65 6E : .........test en
[00:05:13] 5: 0010: 64 65 64 00 00 00 00 : ded....
I wouldn't expect to see this kind of problem (hostkey verification problem) if it were a timing issue. Could it be a reliance on uninitialized memory? It would be interesting to run this on the Windows equivalent to Valgrind or ASAN/UBSAN to see if something shows up.