Repository navigation
Closed
Labels
Needs ChangelogNeeds MFCThe nature of this issue requires a merge into the stable branchThe nature of this issue requires a merge into the stable branch
Milestone
Description
再現
再現手順1 ECDSA 鍵交換 を使用する
- TTSSH Setup > KEX order "diffie-hellman-group14-sha256" を最優先にする(ecdsa-sha2-* 以外を選択する)
- TTSSH Setup > Host key order "ecdsa-sha2-nistp256" を最優先にする
- 上の方式に対応した SSH サーバに接続する
- handle_SSH2_dh_kex_reply: key_from_blob error
再現手順2 ECDSA サーバホスト鍵を使用する
- TTSSH Setup > KEX order "ecdsa-sha2-nistp256" を最優先にする
- 対応した SSH サーバに接続する
- 上の方式に対応した SSH サーバに接続する
- error occurred @ SSH2_ecdh_kex_init()
再現手順3 aes256-gcm@openssh.com と 固定DH KEX/GEX を組み合わせる
- TTSSH Setup > Cipher order "aes256-gcm@openssh.com" を最優先にする
- TTSSH Setup > KEX order "diffie-hellman-group14-sha256" を最優先にする
- TTSSH Setup > Host key order "ssh-ed25519" を最優先にする(ecdsa-sha2-* 以外を選択する)
- 上の方式に対応した SSH サーバに接続する
組み合わせ
| cipher | KEX | Host key | 結果 |
|---|---|---|---|
| aes-256-ctr | diffie-hellman-group14-sha256 | ecdsa-sha2-nistp256 | key_from_blob error |
| aes-256-ctr | ecdsa-sha2-nistp256 | ssh-ed25519 | error occurred @ SSH2_ecdh_kex_init() |
| aes256-gcm@openssh.com | diffie-hellman-group14-sha256 | ssh-ed25519 | aes256-gcm@openssh.com decrypt error(2) Detected corrupted data: connection terminating. |
| aes256-gcm@openssh.com | diffie-hellman-group14-sha256 | rsa-sha2-512 | 同上 |
| aes256-gcm@openssh.com | diffie-hellman-group16-sha256 | rsa-sha2-512 | 同上 |
| aes256-gcm@openssh.com | diffie-hellman-group-exchange-sha256 | ssh-ed25519 | 同上 |
| aes-256-ctr | diffie-hellman-group14-sha256 | rsa-sha2-512 | OK |
| chacha20-poly1305@openssh.com | mlkem768x25519-sha256 | ssh-ed25519 | OK |
| aes256-gcm@openssh.com | curve25519-sha256 | ssh-ed25519 | OK |
| aes256-gcm@openssh.com | mlkem768x25519-sha256 | ssh-ed25519 | OK |
| aes256-gcm@openssh.com | mlkem768x25519-sha256 | rsa-sha2-512 | OK |
5.7.0 で発生する。5.6.2 では発生しない。
ARM64 で発生する。86, x64 では発生しない。
5.7.0 のコンパイラ(GitHub runner) 14.44 35228 で発生する。
手元のコンパイラ 14.44 35228 で発生する。
原因
libressl/portable#1403
MSVC コンパイラの最適化の問題
対策
Visual Studio 2026(v18.8.2) では問題が出ないらしい
https://developercommunity.visualstudio.com/t/MSVC-ARM64-optimizer-emits-ASR-instead-o/11132989#T-N11133789
Visual Studio 2022 は、手元のコンパイラを Version 17.14.41(19.44.35229)に更新しても発生する。
- Visual C++ の対応 + GitHub runner の更新待ち?
- LibreSSL 4.4.0 or 4.3.3 リリース待ち?
- runner でパッチを適用する?
Metadata
Metadata
Assignees
Labels
Needs ChangelogNeeds MFCThe nature of this issue requires a merge into the stable branchThe nature of this issue requires a merge into the stable branch
Activity
[-]ARM64 で ecdsa が動作しない[/-][+]ARM64 で SSH 接続できないことがある[/+]zmatsuo commentedon Oct 5, 2026
パッチを当ててリリースするのがよさそうだなと思います。
Visual Studio 2022 ARM64 用 patch を取り込んで適応するようにしました。 b3c5fc7
手元にARM機がないので確認は行っていません。
nmaya commentedon Oct 5, 2026
ありがとうございます。
せっかく作っていただきましたが、LibreSSL 4.3.3が出ていて修正が含まれています。
zmatsuo commentedon Oct 5, 2026
対応版出てたんですね。
ブランチ削除します。
nmaya commentedon Oct 6, 2026
こちらをこの Action で確認しましたが、ライブラリのキャッシュが効いたみたいで問題は再現しました。
しかし、パッチの適用はこのように書けばいいというのが分かりましたのでよかったです。
zmatsuo commentedon Oct 6, 2026
うまくパッチできてなかったかもしれないです。
https://github.com/TeraTermProject/teraterm/actions/runs/37455015573
ダウンロードしました。
x86,x64版ともttsshのaboutboxで、LibreSSL 4.3.3 になっていました。
変更履歴に #1554 について追加
nmaya commentedon Oct 6, 2026
https://github.com/TeraTermProject/teraterm/actions/runs/37336010788/job/111852833107#step:6:22
キャッシュされていたようです。