OpenSSH 8.9 がリリースされました

2022/02/23, OpenSSH 8.9 がリリースされました.

ssh-agent に鍵を追加する際に転送の制限を可能にする SSH agent restriction が入ります.

https://www.openssh.com/txt/release-8.9

Future deprecation notice
=========================

将来廃止される機能の告知

A near-future release of OpenSSH will switch scp(1) from using the
legacy scp/rcp protocol to using SFTP by default.

OpenSSH の近い将来のリリースで scp(1) を伝統的な scp/rcp プロトコルの利用から
デフォルトで SFTP の利用に変更する.

Legacy scp/rcp performs wildcard expansion of remote filenames (e.g.
"scp host:* .") through the remote shell. This has the side effect of
requiring double quoting of shell meta-characters in file names
included on scp(1) command-lines, otherwise they could be interpreted
as shell commands on the remote side.

伝統的な scp/rcp はリモートのファイル名の展開 (例えば scp host:* .*) を
リモートのシェルを通して行なう. これは, scp(1) のコマンドラインに含まれる
ファイル名のシェルメタ文字のダブルクオートを必要とする副作用があり, 一方で
それらはリモートサイドのシェルコマンドとして解釈される可能性がある.

This creates one area of potential incompatibility: scp(1) when using
the SFTP protocol no longer requires this finicky and brittle quoting,
and attempts to use it may cause transfers to fail. We consider the
removal of the need for double-quoting shell characters in file names
to be a benefit and do not intend to introduce bug-compatibility for
legacy scp/rcp in scp(1) when using the SFTP protocol.

これは, 潜在的な非互換性の領域を作成する: SFTP プロトコルを用いる scp(1) は
このような気難しく不安定なクオートを必要せず, 利用しようとすると転送に失敗する
ことがある. ファイル名でのシェル文字のダブルクオートの必要の除去は利益となり
SFTP プロトコルの利用時に scp(1) の伝統的な scp/rcp のバグのある互換性を
導入しないことを我々は考慮した.

Another area of potential incompatibility relates to the use of remote
paths relative to other user's home directories, for example -
"scp host:~user/file /tmp". The SFTP protocol has no native way to
expand a ~user path. However, sftp-server(8) in OpenSSH 8.7 and later
support a protocol extension "expand-path@openssh.com" to support
this.

潜在的な非互換性の他の領域は, 他のユーザのホームディレクトリの相対リモートパス,
例えば, "scp host:~user/file /tmp" に関連する. SFTP プロトコルは, ~user パスの
展開をネイティブに行なう方法を持たない. しかし, OpenSSH 8.7 以降の sftp-server(8)
は,  これをサポートする "expand-path@openssh.com" プロトコル拡張で
サポートする.

Security Near Miss
==================

セキュリティでのニアミス

 * sshd(8): fix an integer overflow in the user authentication path
   that, in conjunction with other logic errors, could have yielded
   unauthenticated access under difficult to exploit conditions.

   sshd(8): 悪用することが困難な状況ではあるが認証されていないアクセスを
   得ることができる, ユーザ認証パスでの整数オーバーフローを, 他の論理
   エラーと合わせて, 修正する.

   This situation is not exploitable because of independent checks in
   the privilege separation monitor. Privilege separation has been
   enabled by default in since openssh-3.2.2 (released in 2002) and
   has been mandatory since openssh-7.5 (released in 2017). Moreover,
   portable OpenSSH has used toolchain features available in most
   modern compilers to abort on signed integer overflow since
   openssh-6.5 (released in 2014).

   この状況は, 特権分離のモニターの独立したチェックのために,
   悪用できない. 特権分離は, (2002 年にリリースした) openssh-3.2.2
   からデフォルトで有効で, (2017 年にリリースした) openssh-7.5 で
   必須となっている. さらに, 移植版 OpenSSH は, (2014 年にリリースした)
   openssh-6.5 以降で たいがいの現代的なコンパイラで
   符号付き整数オーバーフローで abort する toolchain の特徴を利用している.

   Thanks to Malcolm Stagg for finding and reporting this bug.

Potentially-incompatible changes
================================

潜在的に非互換な変更

 * sshd(8), portable OpenSSH only: this release removes in-built
   support for MD5-hashed passwords. If you require these on your
   system then we recommend linking against libxcrypt or similar.

   sshd(8), 移植版 OpenSSH のみ: このリリースで MD5 ハッシュされた
   パスワードの組込みサポートを除く. システムで必要ならば,
   libxcrypt や同様なものをリンクするのを推奨する.

 * This release modifies the FIDO security key middleware interface
   and increments SSH_SK_VERSION_MAJOR.

   このリリースは, FIDO セキュリティキーミドルウェアを変更し,
   SSH_SK_VERSION_MAJOR を増加する.

Changes since OpenSSH 8.8
=========================

OpenSSH 8.8 からの変更点

This release includes a number of new features.

このリリースはいくつかの新機能を含んでいる.

New features
------------

新機能

 * ssh(1), sshd(8), ssh-add(1), ssh-agent(1): add a system for
   restricting forwarding and use of keys added to ssh-agent(1)
   A detailed description of the feature is available at
   https://www.openssh.com/agent-restrict.html and the protocol
   extensions are documented in the PROTOCOL and PROTOCOL.agent
   files in the source release.

   ssh(1), sshd(8), ssh-add(1), ssh-agent(1): ssh-agent(1) に追加
   される鍵の転送と利用を制限するシステムを追加する. この昨日の
   詳細な記述は https://www.openssh.com/agent-restrict.html で
   利用可能で, プロトコル拡張は ソースリリース中の
   PROTOCOL と PROTOCOL.agent ファイルに記述される.

 * ssh(1), sshd(8): add the sntrup761x25519-sha512@openssh.com hybrid
   ECDH/x25519 + Streamlined NTRU Prime post-quantum KEX to the
   default KEXAlgorithms list (after the ECDH methods but before the
   prime-group DH ones). The next release of OpenSSH is likely to
   make this key exchange the default method.

   ssh(1), sshd(8): sntrup761x25519-sha512@openssh.com ハイブリッド
   ECDH/x25519 + Streamlined NTRU Prime post-quantum 鍵交換を
   デフォルトの KEXAlgorithms リストに (EDCH 法の後で素数群 DH
   のものの前) に追加する. OpenSSH の次のリリースで, この鍵交換を
   デフォルトの方法にするだろう.

 * ssh-keygen(1): when downloading resident keys from a FIDO token,
   pass back the user ID that was used when the key was created and
   append it to the filename the key is written to (if it is not the
   default). Avoids keys being clobbered if the user created multiple
   resident keys with the same application string but different user
   IDs.

   ssh-keygen(1): FIDO トークンから resident key をダウンロードする際,
   鍵が作成された時に利用されたユーザ ID を渡し, 鍵が書き込まれるファイル名に
   追記する (もしそれがデフォルトでないなら). ユーザーが複数の resident
   鍵を同じアプリケーション文字列だが異なるユーザ ID で作成した場合に
   鍵を破壊するのを防ぐ.

 * ssh-keygen(1), ssh(1), ssh-agent(1): better handling for FIDO keys
   on tokens that provide user verification (UV) on the device itself,
   including biometric keys, avoiding unnecessary PIN prompts.

 * ssh-keygen(1), ssh(1), ssh-agent(1): 不必要な PIN の入力を避けるために
   生体キーを含むデバイス自身でユーザ検証 (UV) を提供するトークン上の
   FIDO 鍵をよりよく扱う.

 * ssh-keygen(1): add "ssh-keygen -Y match-principals" operation to
   perform matching of principals names against an allowed signers
   file. To be used towards a TOFU model for SSH signatures in git.

   ssh-keygen(1): "ssh-keygen -Y match-principals" 操作を追加する.
   許可された署名者に対し principals 名でのマッチを実行する.
   git での SSH 署名の TOFU モデルに対して利用される.

 * ssh-add(1), ssh-agent(1): allow pin-required FIDO keys to be added
   to ssh-agent(1). $SSH_ASKPASS will be used to request the PIN at
   authentication time.

   ssh-add(1), ssh-agent(1): PIN が必要な FIDO 鍵を ssh-agent(1) に
   追加できるようにする. $SSH_ASKPASS が認証時の PIN を要求するのに
   用いられる.

 * ssh-keygen(1): allow selection of hash at sshsig signing time
   (either sha512 (default) or sha256).

   ssh-keygen(1): sshsig の署名時にハッシュを選択できる
   (sha512 (デフォルト) か sha256).

 * ssh(1), sshd(8): read network data directly to the packet input
   buffer instead indirectly via a small stack buffer. Provides a
   modest performance improvement.

   ssh(1), sshd(8): 小さなスタックバッファから非直接にではなく,
   パケット入力バッファから直接ネットワークデータを読み込む.
   ちょっとしたパフォーマンスの向上を提供する.

 * ssh(1), sshd(8): read data directly to the channel input buffer,
   providing a similar modest performance improvement.

   ssh(1), sshd(8): チャンネル入力バッファから直接データを読み込む.
   同様にちょっとしたパフォーマンスの向上を提供する.

 * ssh(1): extend the PubkeyAuthentication configuration directive to
   accept yes|no|unbound|host-bound to allow control over one of the
   protocol extensions used to implement agent-restricted keys.

   ssh(1): PubkeyAuthentication 設定項目を拡張し, yes|no|unbound|host-bound
   を受けとるようになる. agent に制限された鍵を実装するのに用いられる
   プロトコル拡張のうちの 1 つを指定して制御できるようになる.

Bugfixes
--------

バグ修正

 * sshd(8): document that CASignatureAlgorithms, ExposeAuthInfo and
   PubkeyAuthOptions can be used in a Match block. PR#277.

   sshd(8): CASignatureAlgorithms と ExposeAuthInfo, PubkeyAuthOptions が
   Match ブロック内で利用できることを文書化. PR#277.

 * sshd(8): fix possible string truncation when constructing paths to
   .rhosts/.shosts files with very long user home directory names.

   sshd(8): とても長いホームディレクトリ名の場合に .rhosts/.shosts への
   パスを構築する際に文字列の切り詰めが発生するのを修正する.

 * ssh-keysign(1): unbreak for KEX algorithms that use SHA384/512
   exchange hashes

   ssh-keysign(1): SHA384/512 交換ハッシュを用いる鍵交換アルゴリズムを
   について修正する.

 * ssh(1): don't put the TTY into raw mode when SessionType=none,
   avoids ^C being unable to kill such a session. bz3360

   ssh(1): SessionType=none の場合に raw モードに TTY が入らないようにし,
   そのようなセッションを ^C で kill できないのを防ぐ. bz3360

 * scp(1): fix some corner-case bugs in SFTP-mode handling of
   ~-prefixed paths.

   scp(1): SFTP モードでの ~ が先頭のパスの扱いのいくつかの
   コーナーケースのバグを修正する.

 * ssh(1): unbreak hostbased auth using RSA keys. Allow ssh(1) to
   select RSA keys when only RSA/SHA2 signature algorithms are
   configured (this is the default case). Previously RSA keys were
   not being considered in the default case.

   ssh(1): RSA 鍵を用いるホストベース認証を直す. ssh(1) で
   RSA/SHA2 署名アルゴリズムのみが設定された場合に (これがデフォルトの場合)
   RSA 鍵を選択できるようにする. 以前は RSA 鍵はデフォルトの場合に
   考慮されていなかった.

 * ssh-keysign(1): make ssh-keysign use the requested signature
   algorithm and not the default for the key type. Part of unbreaking
   hostbased auth for RSA/SHA2 keys.

   ssh-keysign(1): ssh-keysign が要求された署名アルゴリズムを用い,
   鍵タイプのデフォルトを用いないようにする. RSA/SHA2 鍵に対する
   ホストベース認証の修正の一部.

 * ssh(1): stricter UpdateHostkey signature verification logic on
   the client- side. Require RSA/SHA2 signatures for RSA hostkeys
   except when RSA/SHA1 was explicitly negotiated during initial
   KEX; bz3375

   ssh(1): クライアント側での UpdateHostkey 署名検証の論理を
   より厳密にする. RSA/SHA1 が最初の鍵交換で明示的に交渉された場合
   を除き, RSA ホスト鍵には RSA/SHA2 署名を必要とする. bz3375

 * ssh(1), sshd(8): fix signature algorithm selection logic for
   UpdateHostkeys on the server side. The previous code tried to
   prefer RSA/SHA2 for hostkey proofs of RSA keys, but missed some
   cases. This will use RSA/SHA2 signatures for RSA keys if the
   client proposed these algorithms in initial KEX. bz3375

   ssh(1), sshd(8): サーバ側での UpdateHostkeys の署名アルゴリズム
   選択の論理を修正する. 以前のコードは RSA 鍵のホスト鍵の証明に
   RSA/SHA2 を優先しようとしていたが, いくつかの場合に失敗していた.
   最初の鍵交換でクライアントがこれらのアルゴリズムを提案をしたら,
   RSA 鍵に対して RSA/SHA2 署名を利用するようになる. bz3375

 * All: convert all uses of select(2)/pselect(2) to poll(2)/ppoll(2).
   This includes the mainloops in ssh(1), ssh-agent(1), ssh-agent(1)
   and sftp-server(8), as well as the sshd(8) listen loop and all
   other FD read/writability checks. On platforms with missing or
   broken poll(2)/ppoll(2) syscalls a select(2)-based compat shim is
   available.

   すべて: select(2)/pselect(2) のすべての利用を poll(2)/ppoll(2) に
   変換する. これは, ssh(1) と ssh-agent(1), sftp-server(8) の
   メインループと sshd(8) の listen ループや他のファイルデスクリプタ
   読み込み/書き込み可能チェックを含む. poll(2) や ppoll(2) システムコールが
   なかったり壊れているプラットフォームでは, select(2) ベースの互換コードが
   利用できる.

 * ssh-keygen(1): the "-Y find-principals" command was verifying key
   validity when using ca certs but not with simple key lifetimes
   within the allowed signers file.

   ssh-keygen(1): "-Y find-principals" コマンドは ca 証明書を用いているが
   許可された署名者のファイル中に単純な鍵の寿命がない場合に
   鍵の正当性を検証していた.

 * ssh-keygen(1): make sshsig verify-time argument parsing optional

   ssh-keygen(1): sshsig verify-time 引数のパースをオプションにする

 * sshd(8): fix truncation in rhosts/shosts path construction.

   sshd(8): rhosts/shosts のパス構築での切り詰めを修正する.

 * ssh(1), ssh-agent(1): avoid xmalloc(0) for PKCS#11 keyid for ECDSA
   keys (we already did this for RSA keys). Avoids fatal errors for
   PKCS#11 libraries that return empty keyid, e.g. Microchip ATECC608B
   "cryptoauthlib"; bz#3364

   ssh(1), ssh-agent(1): ECDSA 鍵の PKCS#11 keyid に対して xmalloc(0)
   を避ける (すでに RSA 鍵についてはそうしている). Microchip ATECC608B
   "cryptoauthlib" のような空の keyid を返す PKCS#11 ライブラリによる
   致命的エラーを避ける; bz#3364

 * ssh(1), ssh-agent(1): improve the testing of credentials against
   inserted FIDO: ask the token whether a particular key belongs to
   it in cases where the token supports on-token user-verification
   (e.g. biometrics) rather than just assuming that it will accept it.

   Will reduce spurious "Confirm user presence" notifications for key
   handles that relate to FIDO keys that are not currently inserted in at
   least some cases. bz3366

   ssh(1), ssh-agent(1): 挿入された FIDO に対する認証情報のテストを改善する:
   トークンがトークン上でのユーザ検証をサポートしている場合 (例えば 生体認証)
   トークンが鍵を受けつけるか推定するだけではなく,
   特定の鍵がトークン内にあるかをトークンに尋ねる.

   少なくともいくつかの場合で, 現在挿入されていない FIDO 鍵に関連する
   鍵の扱いでの偽の "ユーザの存在確認" 通知を減らす.

 * ssh(1), sshd(8): correct value for IPTOS_DSCP_LE. It needs to
   allow for the preceding two ECN bits. bz#3373

   ssh(1), sshd(8): IPTOS_DSCP_LE の値を修正する. 先行する 2 つの
   ECN ビットを許容する必要がある. bz#3373

 * ssh-keygen(1): add missing -O option to usage() for the "-Y sign"
   option.

   ssh-keygen(1): "-Y sign" オプションの usage() に -O オプションが
   なかったので追加する.

 * ssh-keygen(1): fix a NULL deref when using the find-principals
   function, when matching an allowed_signers line that contains a
   namespace restriction, but no restriction specified on the
   command-line

   ssh-keygen(1): find-principals 機能を用いる場合と名前空間制限を含む
   allowed_signers 行に一致するがコマンドラインで制限が指定されていない場合の
   NULL 逆参照を修正する.

 * ssh-agent(1): fix memleak in process_extension(); oss-fuzz
   issue #42719

   ssh-agent(1): process_extension() でのメモリリークを修正する.
   oss-fuzz の issue #42719

 * ssh(1): suppress "Connection to xxx closed" messages when LogLevel
   is set to "error" or above. bz3378

   ssh(1): LogLevel が "error" 以上に設定されている場合に
   "Connection to xxx closed" メッセージを抑制する.

 * ssh(1), sshd(8): use correct zlib flags when inflate(3)-ing
   compressed packet data. bz3372

   ssh(1), sshd(8): 圧縮されたパケットデータを inflate(3) する場合に
   正しい zlib のフラグを利用する. bz3372

 * scp(1): when recursively transferring files in SFTP mode, create the
   destination directory if it doesn't already exist to match scp(1) in
   legacy RCP mode behaviour.

   scp(1): SFTP モードでファイルを再帰的に転送する場合, scp(1) の
   伝統的な RCP モードの振舞に一致するよう, 転送先のディレクトリが存在
   しなけば作成する.

 * scp(1): many improvements in error message consistency between scp(1)
   in SFTP mode vs legacy RCP mode.

   scp(1): scp(1) の SFTP モードと伝統的な RCP モードの間でエラーメッセージの
   一貫性を上げる大くの修正をする.

 * sshd(8): fix potential race in SIGTERM handling PR#289

   sshd(8): SIGTERM の扱いでの潜在的な競合状態を修正する PR#289

 * ssh(1), ssh(8): since DSA keys are deprecated, move them to the
   end of the default list of public keys so that they will be tried
   last. PR#295

   ssh(1), ssh(8): DSA 鍵が非推奨になったので, 最後に試行されるように
   公開鍵のデフォルトリストの末尾に移動する. PR#295

 * ssh-keygen(1): allow 'ssh-keygen -Y find-principals' to match
   wildcard principals in allowed_signers files

   ssh-keygen(1): 'ssh-keygen -Y find-principals' で
   allowed_signers ファイルのワイルドカード principals に一致するようにする.

Portability
-----------

移植性

 * ssh(1), sshd(8): don't trust closefrom(2) on Linux. glibc's
   implementation does not work in a chroot when the kernel does not
   have close_range(2). It tries to read from /proc/self/fd and when
   that fails dies with an assertion of sorts. Instead, call
   close_range(2) directly from our compat code and fall back if
   that fails.  bz#3349,

   ssh(1), sshd(8): Linux の closefrom(2) を信用しない. glibc の実装は
   あーねるガ close_range(2) を持たない場合chroot 内で動作しない.
   /proc/self/fd から読み取ろうとし, 失敗したら assertion 付きで
   失敗する. 代わりに 我々の互換コードから close_range(2) を直接呼び
   失敗したらフォールバックする.

 * OS X poll(2) is broken; use compat replacement. For character-
   special devices like /dev/null, Darwin's poll(2) returns POLLNVAL
   when polled with POLLIN. Apparently this is Apple bug 3710161 -
   not public but a websearch will find other OSS projects
   rediscovering it periodically since it was first identified in
   2005.

   OS X poll(2) は請われている; 互換コードを利用する. /dev/null
   のようなキャラクター特殊デバイスに対して POLLIN 付きで poll されると
   Darwin の poll(2) は POLLNVAL を返す. どうやら Apple のバグ
   3710161 らしい - 公開されていないが, web検索で他の OSS プロジェクト
   再発見されているのが最初に識別された 2005 年以降定期的にみつかる.

 * Correct handling of exceptfds/POLLPRI in our select(2)-based
   poll(2)/ppoll(2) compat implementation.

   我々の select(2) ベースの poll(2)/ppoll(2) 互換実装で exceptfds/POLLPRI
   の扱いを修正する.

 * Cygwin: correct checking of mbstowcs() return value.

   Cygwin: mbstowcs() の返り値のチェックを修正する.

 * Add a basic SECURITY.md that refers people to the openssh.com
   website.

   openssh.com のウェブサイトを人々に示す簡単な SECURITY.md を追加する

 * Enable additional compiler warnings and toolchain hardening flags,
   including -Wbitwise-instead-of-logical, -Wmisleading-indentation,
   -fzero-call-used-regs and -ftrivial-auto-var-init.

   -Wbitwise-instead-of-logical と -Wmisleading-indentation,
   -fzero-call-used-regs, -ftrivial-auto-var-init を含む
   追加のコンパイラの警告と toolchain を強固にするフラグを有効にする.

 * HP/UX. Use compat getline(3) on HP-UX 10.x, where the libc version
   is not reliable.

   HP/UX. libc バージョンが信頼できないので HP-UX 10.x で互換の getline(3)
   を利用する