https://www.openssh.com/releasenotes.html#9.6p1 https://twitter.com/sempreff/status/1737072694116647095 でご指摘頂いた誤字を修正しました (2023-12-19 20:35) Changes since OpenSSH 9.5 ========================= OpenSSH 9.5 からの変更点 This release contains a number of security fixes, some small features and bugfixes. このリリースは複数のセキュリティ修正といくつかの小さな機能追加, バグ修正を含んでいる Security ======== セキュリティ This release contains fixes for a newly-discovered weakness in the SSH transport protocol, a logic error relating to constrained PKCS#11 keys in ssh-agent(1) and countermeasures for programs that invoke ssh(1) with user or hostnames containing invalid characters. このリリースは, SSH トランスポートプロトコルで新しく発見された弱点と ssh-agent(1) での制限された PKCS#11 鍵に関連するロジックエラーに対する 修正と, ユーザーないしホスト名に不正な文字を含む場合に ssh(1) を起動する プログラムに対する対抗策を含んでいる. * ssh(1), sshd(8): implement protocol extensions to thwart the so-called "Terrapin attack" discovered by Fabian Bäumer, Marcus Brinkmann and Jörg Schwenk. This attack allows a MITM to effect a limited break of the integrity of the early encrypted SSH transport protocol by sending extra messages prior to the commencement of encryption, and deleting an equal number of consecutive messages immediately after encryption starts. A peer SSH client/server would not be able to detect that messages were deleted. ssh(1), sshd(8): Fabian Bäumer と Marcus Brinkmann, Jörg Schwenk によって発見された いわゆる "Terrapin attack" を妨害する プロトコル拡張を実装する. この攻撃は, 暗号化の開始の前に余分な メッセージを送信し暗号化の開始後すぐに同数の連続したメッセージを 削除することで初期の暗号化された SSH トランスポートプロトコルの 完全性を限定的に破ることで MITM を可能にする. SSH クライアント/サーバー ピアはメッセージが削除されたことを検出できない. While cryptographically novel, the security impact of this attack is fortunately very limited as it only allows deletion of consecutive messages, and deleting most messages at this stage of the protocol prevents user user authentication from proceeding and results in a stuck connection. 暗号的には目新しいものだが, この攻撃のセキュリティへの影響は, 幸運なことに非常に限られている. この攻撃が可能にするのは連続したメッセージの削除のみで, プロトコルの この段階で多くのメッセージを削除するとユーザー認証が妨害されて 結果として接続はスタックする. The most serious identified impact is that it lets a MITM to delete the SSH2_MSG_EXT_INFO message sent before authentication starts, allowing the attacker to disable a subset of the keystroke timing obfuscation features introduced in OpenSSH 9.5. There is no other discernable impact to session secrecy or session integrity. 認識されているもっとも重大な影響は, MITM によって 認証の開始前に送られた SSH2_MSG_EXT_INFO メッセージが削除されることで, 攻撃者は OpenSSH 9.5 で導入された キーストロークのタイミングを 不明瞭にする特徴を無効にできる. これはセッションの秘匿性やセッションの完全性に対してそれ以外の 認識できる影響は及ぼさない. OpenSSH 9.6 addresses this protocol weakness through a new "strict KEX" protocol extension that will be automatically enabled when both the client and server support it. This extension makes two changes to the SSH transport protocol to improve the integrity of the initial key exchange. OpenSSH 9.6 は このプロトコルの弱点に対し, 新しい "strict KEX" プロトコル拡張で対処する. この拡張はクライアントとサーバー両方で サポートされている場合に自動的に有効になる. この拡張は 最初の鍵交換での完全性を向上する 2 点の変更を SSH トランスポート プロトコルに適用する. Firstly, it requires endpoints to terminate the connection if any unnecessary or unexpected message is received during key exchange (including messages that were previously legal but not strictly required like SSH2_MSG_DEBUG). This removes most malleability from the early protocol. まず, この拡張は鍵交換中に不要なメッセージや予測されないメッセージを 受け取った場合に接続を終了することを要求する(SSH2_MSG_DEBUG のように 以前は正当であったが厳密には必須ではないメッセージも含む). これにより 以前のプロトコルから多くの柔軟性を除かれる. Secondly, it resets the Message Authentication Code counter at the conclusion of each key exchange, preventing previously inserted messages from being able to make persistent changes to the sequence number across completion of a key exchange. Either of these changes should be sufficient to thwart the Terrapin Attack. 次に, この拡張は 鍵交換の完了のたびにメッセージ認証コード(MAC) をリセットし, 以前はできた鍵交換の完了にまたがったシーケンス番号の 永続的な変更を可能にするメッセージの挿入を防止する. これらの変更 のどちらかがあれば Terrapin 攻撃を妨害するのに十分と考えられる. More details of these changes are in the PROTOCOL file in the OpenSSH source distribition. OpenSSH のソース配布の PROTOCOL ファイルにこれらの変更のより詳細な 記述がある. * ssh-agent(1): when adding PKCS#11-hosted private keys while specifying destination constraints, if the PKCS#11 token returned multiple keys then only the first key had the constraints applied. Use of regular private keys, FIDO tokens and unconstrained keys are unaffected. ssh-agent(1): 転送先の制限を指定された PKCS#11 形式の秘密鍵を 追加する際, PKCS#11 トークンが複数の鍵を返すと, 最初の鍵のみに 制限が適用されていた. 通常の秘密鍵や FIDO トークン, 制限されていない 鍵の利用には影響しない. * ssh(1): if an invalid user or hostname that contained shell metacharacters was passed to ssh(1), and a ProxyCommand, LocalCommand directive or "match exec" predicate referenced the user or hostname via %u, %h or similar expansion token, then an attacker who could supply arbitrary user/hostnames to ssh(1) could potentially perform command injection depending on what quoting was present in the user-supplied ssh_config(5) directive. ssh(1): シェルのメタ文字を含む不正なユーザー名やホスト名が ssh(1) や ProxyCommand, LocalCommand 設定項目, ユーザーやホスト名を %u, %h で参照する "match exec" 述語や同様の展開トークンに渡されると, 任意のユーザー/ホスト名を ssh(1) に適用できる攻撃者は潜在的に ユーザーが提供する ssh_config(5) の設定項目にある引用を利用して コマンドインジェクションを実行できる. This situation could arise in the case of git submodules, where a repository could contain a submodule with shell characters in its user/hostname. Git does not ban shell metacharacters in user or host names when checking out repositories from untrusted sources. この状況は git レポジトリがそのユーザー/ホスト名にシェル文字を含む submodule を持つ場合に発生しうる. git は信頼していないソースから レポジトリをチェックアウトする際ユーザーやホスト名でのシェル メタ文字を禁止していない. Although we believe it is the user's responsibility to ensure validity of arguments passed to ssh(1), especially across a security boundary such as the git example above, OpenSSH 9.6 now bans most shell metacharacters from user and hostnames supplied via the command-line. This countermeasure is not guaranteed to be effective in all situations, as it is infeasible for ssh(1) to universally filter shell metacharacters potentially relevant to user-supplied commands. ssh(1) に渡す引数の正当性を検証するのはユーザーの責任であると 我々は考えているが, (特に前出の git の例でのセキュリティ境界を越える場合などでは) OpenSSH 9.6ではコマンドラインから提供されるユーザー/ホスト名について ほとんどのシェルメタ文字を禁止する. この対抗策はすべての場合に ついて効果があるとは保証されない. ユーザーが提供するコマンドに関連しうるシェルメタ文字を例外なくフィルター することは ssh(1) には不可能だからだ. User/hostnames provided via ssh_config(5) are not subject to these restrictions, allowing configurations that use strange names to continue to be used, under the assumption that the user knows what they are doing in their own configuration files. ssh_config(5) で提供されるユーザー/ホスト名はこれらの制限の対象外で, ユーザーは自身の設定ファイルで行なわれていることを知っているという仮定に基づき 設定では奇妙な名前を引き続き利用可能だ. Potentially incompatible changes -------------------------------- 潜在的に非互換な変更 * ssh(1), sshd(8): the RFC4254 connection/channels protocol provides a TCP-like window mechanism that limits the amount of data that can be sent without acceptance from the peer. In cases where this limit was exceeded by a non-conforming peer SSH implementation, ssh(1)/sshd(8) previously discarded the extra data. From OpenSSH 9.6, ssh(1)/sshd(8) will now terminate the connection if a peer exceeds the window limit by more than a small grace factor. This change should have no effect of SSH implementations that follow the specification. ssh(1), sshd(8): RFC4254 接続/チャンネルプロトコルはピアからの 受諾なしに送信できるデータ量を制限する TCP 的な window 機構を 提供する. 不適格なピアの SSH 実装がこの制限を越える場合, ssh(1)/sshd(8) はこれまで余分なデータを捨てていた. OpenSSH 9.6 からは, ピアがすこしの慈悲の要素を越えて window の制限を越えてきたら, ssh(1)/sshd(8) は接続を終了する. この変更は仕様に従う SSH の実装には 影響がないはずだ. New features ------------ 新機能 * ssh(1): add a %j token that expands to the configured ProxyJump hostname (or the empty string if this option is not being used) that can be used in a number of ssh_config(5) keywords. bz3610 ssh(1): ssh_config(5) のキーワードとして利用できる 設定された ProxyJump ホスト名 (ないしこのオプションが設定されていなければ空文字列)を展開する %j トークンを追加する. * ssh(1): add ChannelTimeout support to the client, mirroring the same option in the server and allowing ssh(1) to terminate quiescent channels. ssh(1): ChannelTimeout サポートをクライアントに追加する. サーバー側の同じオプションに対応するもので, ssh(1) が 利用されていないチャンネルを停止できる. * ssh(1), sshd(8), ssh-add(1), ssh-keygen(1): add support for reading ED25519 private keys in PEM PKCS8 format. Previously only the OpenSSH private key format was supported. ssh(1), sshd(8), ssh-add(1), ssh-keygen(1): PEM PKCS8 形式の ED25519 秘密鍵の読み取りのサポートを追加する. 以前は OpenSSH 秘密鍵形式のみをサポートしていた. * ssh(1), sshd(8): introduce a protocol extension to allow renegotiation of acceptable signature algorithms for public key authentication after the server has learned the username being used for authentication. This allows varying sshd_config(5) PubkeyAcceptedAlgorithms in a "Match user" block. ssh(1), sshd(8): サーバーが認証で使われたユーザー名を認識したあとで 公開鍵認証で受け入れる署名のアルゴリズムを再交渉できるプロトコル 拡張を導入する. これにより, sshd_config(5) の "Match user" ブロックで PubkeyAcceptedAlgorithms を可変にできる. * ssh-add(1), ssh-agent(1): add an agent protocol extension to allow specifying certificates when loading PKCS#11 keys. This allows the use of certificates backed by PKCS#11 private keys in all OpenSSH tools that support ssh-agent(1). Previously only ssh(1) supported this use-case. ssh-add(1), ssh-agent(1): PKCS#11 鍵のロードの際に証明書を指定できる エージェントプロトコルの拡張を追加する. ssh-agent(1) をサポートする すべての OpenSSH ツールで PKCS#11 秘密鍵を使う証明書の利用を可能にする 以前は ssh(1) のみがこのユースケースをサポートしていた. Bugfixes -------- バグ修正 * ssh(1): when deciding whether to enable the keystroke timing obfuscation, enable it only if a channel with a TTY is active. ssh(1): キーストロークのタイミングの不明瞭化を有効にするかを 決定する際に, TTY が有効なチャンネルのみで有効にする. * ssh(1): switch mainloop from poll(3) to ppoll(3) and mask signals before checking flags set in signal handler. Avoids potential race condition between signaling ssh to exit and polling. bz3531 ssh(1): メインループを poll(3) から ppoll(3) に変更し, シグナルハンドラーで設定されるフラグをチェックする前にシグナルを マスクする. ssh へのシグナルでの終了とポーリング間でありえた レースコンディションを避ける. bz3531 * ssh(1): when connecting to a destination with both the AddressFamily and CanonicalizeHostname directives in use, the AddressFamily directive could be ignored. bz5326 ssh(1): AddressFamily と CanonicalizeHostname 設定項目の両方が 設定されている接続先に接続する際 AddressFamily が無視される bz5326(訳注: bz3526 が正しい) * sftp(1): correct handling of the limits@openssh.com option when the server returned an unexpected message. sftp(1): サーバーが予期せぬメッセージを返した場合の limits@openssh.com の扱いを修正する. * A number of fixes to the PuTTY and Dropbear regress/integration tests. PuTTY と Dropbear の回帰/結合テストを多数修正 * ssh(1): release GSS OIDs only at end of authentication, avoiding unnecessary init/cleanup cycles. bz2982 ssh(1): 認証の最後にのみ GSS OID を解放する. 不要な初期化/クリーンアップサイクルを行なわないようにするため. bz2982 * ssh_config(5): mention "none" is a valid argument to IdentityFile in the manual. bz3080 ssh_config(5): マニュアルでの IdentityFile の正当な引数として "none" を記述する. bz3080 * scp(1): improved debugging for paths from the server rejected for not matching the client's glob(3) pattern in old SCP/RCP protocol mode. scp(1): 古い SCP/RCP プロトコルモードでのクライアントの glob(3) パターンにマッチしないためにサーバーから拒否されたパスの デバッグを改良する. * ssh-agent(1): refuse signing operations on destination-constrained keys if a previous session-bind operation has failed. This may prevent a fail-open situation in future if a user uses a mismatched ssh(1) client and ssh-agent(1) where the client supports a key type that the agent does not support. ssh-agent(1): 以前のセッションに束縛された操作が失敗した場合, 接続先が制限された鍵での署名操作を拒否する. エージェントがサポートしていない鍵のタイプをクライアントがサポートしている バージョンが一致しない ssh(1) と ssh-agent(1) をユーザーが利用する場合に fail-open を防ぐことができる. Portability ----------- 移植性 * Better identify unsupported and unstable compiler flags, such as -fzero-call-used-regs which has been unstable across a several clang releases. サポートされていないかつ不安定なコンパイラのフラグを識別しやすくした. いくつかの clang のリリースで不安定となっている -fzero-call-used-regs など. * A number of fixes to regression test reliability and log collection. 回帰テストの信頼性とログの回収での多くの修正 * Update the OpenSSL dependency in the RPM specification. RPM 仕様での OpenSSL 依存性を更新する * sshd(8): for OpenSolaris systems that support privilege limitation via the getpflags() interface, prefer using the newer PRIV_XPOLICY to PRIV_LIMIT. bz2833 sshd(8): OpenSolaris システムで getpflags() インターフェイスを利用する特権制限をサポートする. PRIV_LIMIT よりも より新しい PRIV_XPOLICY を利用する .