FreeBSD セキュリティ勧告 日本語版 ============================================================================= FreeBSD-SA-01:58 (2001-08-30) * lpd contains remote root vulnerability ============================================================================= このメールは, announce-jp に流れた Subject: ANNOUNCE: FreeBSD Security Advisory FreeBSD-SA-01:58.lpd From: FreeBSD Security Advisories Date: Thu, 30 Aug 2001 12:15:57 -0700 (PDT) Message-Id: <200108301915.f7UJFv735421@freefall.freebsd.org> X-Sequence: announce-jp 814 を日本語訳したものです. 原文は PGP 署名されていますが, この日本語訳は PGP 署名されていません. 修正パッチ等の内容が改ざんされていないことを確認するために PGP 署名の チェックを行なうには, 原文を参照してください. 日本語訳および, ミラーサイト利用の詳細については, 文末の「A. FreeBSD セキュリティ勧告 日本語版について」をご覧ください. [翻訳者: 佐藤 広生 ] --(ここから) ============================================================================= FreeBSD-SA-01:58 Security Advisory FreeBSD, Inc. トピック: lpd を利用したリモートからの root 権限の不正使用問題 (lpd contains remote root vulnerability) 分類: core モジュール: lpd 告知日: 2001-08-30 クレジット: ISS X-Force 影響範囲: すべての FreeBSD 4.x および 3.x 修正日以前の FreeBSD 4.3-STABLE および 3.5.1-STABLE 修正日: 2001-08-30 09:27:41 UTC (FreeBSD 4.3-STABLE) 2001-08-30 09:28:35 UTC (RELENG_4_3) 2001-08-30 09:46:44 UTC (FreeBSD 3.5.1-STABLE) FreeBSD に固有か: NO I. 背景 - Background lpd is the BSD line printer daemon used to print local and remote print jobs. lpd は, ローカルプリンタやリモートプリンタのプリントジョブを 処理するために使われる BSD ラインプリンタデーモンです. II. 問題の詳細 - Problem Description Users on the local machine or on remote systems which are allowed to access the local line printer daemon may be able to cause a buffer overflow. By submitting a specially-crafted incomplete print job and subsequently requesting a display of the printer queue, a static buffer overflow may be triggered. This may cause arbitrary code to be executed on the local machine as root. ローカルマシンやリモートシステム上でローカルラインプリンタ デーモン (lpd) にアクセスできるユーザは, バッファオーバフローを 引き起こすことができる可能性があります. 特殊な形式を持つ不完全な プリントジョブを送ってから連続してプリンタキューの表示要求を行なうことで, 静的に確保されたバッファのオーバフローが発生します. これを 利用することで, ローカルマシン上の root 権限で任意のコードを実行する ことが可能です. In order to remotely exploit this vulnerability, the remote machine must be given access to the local printer daemon via a hostname entry in /etc/hosts.lpd or /etc/hosts.equiv. lpd is not enabled on FreeBSD by default. この弱点をリモートから悪用するためには, そのリモートマシンのホスト名が ローカルシステムの /etc/hosts.lpd もしくは /etc/hosts.equiv にあって, ローカルプリンタデーモンへアクセス可能である必要があります. FreeBSD の標準インストールでは, lpd は有効化されていません. All versions of FreeBSD prior to the correction date including FreeBSD 4.3 contain this problem. The base system that will ship with FreeBSD 4.4 does not contain this problem since it was corrected before the release. FreeBSD 4.3 を含む, 修正日以前のすべてのバージョンの FreeBSD が この問題の影響を受けます. この問題は FreeBSD 4.4 のリリース前に 修正されたため, FreeBSD 4.4 のベースシステムに対する影響はありません. III. 影響範囲 - Impact Users on the local machine and on remote systems which are allowed to connect to the local printer daemon may be able to trigger a buffer overflow causing arbitrary code to be executed on the local system as root. ローカルマシン, もしくはリモートシステム上から ローカルプリンタデーモン (lpd) にアクセス可能なユーザは, バッファオーバフローを発生させることでローカルシステム上の root 権限で任意のコードを不正に実行できる可能性があります. lpd is not enabled by default. If you have not enabled lpd, your system is not vulnerable. 標準インストールでは, lpd は有効化されていません. もし lpd を 明示的に有効化していなければ, そのシステムにこのセキュリティ上の 弱点はありません. IV. 回避方法 - Workaround Disable lpd by executing the following command as root: 次のコマンドを root 権限で実行し, lpd を停止してください. # killall lpd V. 解決策 - Solution 次のいずれかに従ってください. 1) Upgrade your vulnerable FreeBSD system to 4.3-STABLE or the RELENG_4_3 security branch after the respective correction dates. 1) 弱点を持った FreeBSD システムを修正日以降の FreeBSD 4.3-STABLE もしくは RELENG_4_3 セキュリティブランチにアップグレードする. 2) FreeBSD 3.x, 4.x systems prior to the correction date: 2) 修正日以前の FreeBSD 3.x, 4.x システムの場合: The following patches have been verified to apply to FreeBSD 4.2-RELEASE, 4.3-RELEASE, 4.3-STABLE and 3.5.1-STABLE dated prior to the correction date. It may or may not apply to older, unsupported versions of FreeBSD. この修正パッチは, FreeBSD 4.2-RELEASE, 4.3-RELEASE, 4.3-STABLE および 3.5.1-STABLE に対して適用可能なことが確認されているものです. それよりも古いリリースやサポートされていない FreeBSD リリースに対しては, これらの修正パッチが正しく適用できない可能性があります. Download the relevant patch and the detached PGP signature from the following locations, and verify the signature using your PGP utility. 次の場所から修正パッチをダウンロードし, PGP ユーティリティを使って PGP 署名を確認します. [FreeBSD 4.3-RELEASE, 4.3-STABLE] # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:58/lpd-4.3.patch # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:58/lpd-4.3.patch.asc [FreeBSD 4.2-RELEASE, 3.5.1-STABLE] # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:58/lpd-3.x-4.2.patch # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:58/lpd-3.x-4.2.patch.asc Execute the following commands as root: root 権限で次のコマンドを実行します. # cd /usr/src # patch -p < /path/to/patch # cd /usr/src/usr.sbin/lpr # make depend && make all install 3) FreeBSD 4.3-RELEASE システムの場合: An experimental upgrade package is available for users who wish to provide testing and feedback on the binary upgrade process. This package may be installed on FreeBSD 4.3-RELEASE systems only, and is intended for use on systems for which source patching is not practical or convenient. 実験的なものですが, アップグレードパッケージが用意されています. これはバイナリアップグレード機能の試験および, それに対する意見を 提供していただけるユーザ向けのものです. このパッケージは FreeBSD 4.3-RELEASE システムにのみインストール可能で, ソースへ 修正パッチを適用することが現実的でなかったり, そうすることが ふさわしくないと考えられるシステムでの利用を考慮したものです. If you use the upgrade package, feedback (positive or negative) to security-officer@FreeBSD.org is requested so we can improve the process for future advisories. このアップグレードパッケージを利用する場合は, 将来のセキュリティ勧告を より良いものにするため, (肯定的・否定的のいずれであっても) security-officer@FreeBSD.org までご意見をお寄せください. During the installation procedure, backup copies are made of the files which are replaced by the package. These backup copies will be reinstalled if the package is removed, reverting the system to a pre-patched state. インストール処理の途中で, アップグレードパッケージは 置き換えるファイルのバックアップコピーを作成します. アップグレードパッケージが削除された時, このバックアップコピーは 再インストールされてシステムは修正パッチを適用する前の状態に戻ります. # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:58/security-patch-lpd-01.58.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:58/security-patch-lpd-01.58.tgz.asc PGP ユーティリティを使って PGP 署名を確認します. # pkg_add security-patch-lpd-01.58.tgz Restart lpd after applying the patch by executing the following commands as root: 修正パッチの適用後, root 権限で次のコマンドを実行して lpd を再起動してください. # killall lpd # /usr/sbin/lpd VI. 修正の詳細 - Correction details The following is the $FreeBSD$ revision number of the file that was corrected for the supported branches of FreeBSD. The $FreeBSD$ revision number of the installed source can be examined using the ident(1) command. The patch provided above does not cause these revision numbers to be updated. 次の表は, 保守されている FreeBSD の各ブランチで 修正されたファイルに含まれる $FreeBSD$ リビジョン番号の一覧です. インストール済みソースファイルの $FreeBSD$ リビジョン番号は ident(1) コマンドを使うことで確認できます. これらのリビジョン ID は 上記の修正パッチが適用されても更新されません. [FreeBSD 4.3-STABLE] Revision Path 1.15.2.8 src/usr.sbin/lpr/common_source/displayq.c リビジョン番号 パス名 1.15.2.8 src/usr.sbin/lpr/common_source/displayq.c [RELENG_4_3] Revision Path 1.15.2.3.2.1 src/usr.sbin/lpr/common_source/displayq.c リビジョン番号 パス名 1.15.2.3.2.1 src/usr.sbin/lpr/common_source/displayq.c [FreeBSD 3.5.1-STABLE] Revision Path 1.14.2.2 src/usr.sbin/lpr/common_source/displayq.c リビジョン番号 パス名 1.14.2.2 src/usr.sbin/lpr/common_source/displayq.c VII. 参考資料 - References A. FreeBSD セキュリティ勧告 日本語版について 日本語訳は FreeBSD 日本語ドキュメンテーションプロジェクト (doc-jp) が 参考のために提供するものです. 過去の日本語版セキュリティ勧告は http://www.FreeBSD.org/ja/security/ にまとめられています. ただし, 翻訳者および doc-jp は, その内容についていかなる保証も いたしませんのでご注意ください. 日本語訳についてのご意見, ご要望, お問い合わせ等は doc-jp@jp.FreeBSD.org までお願いします. この勧告の中で紹介されている WWW サイト http://www.FreeBSD.org/ および FTP サイト ftp://ftp.FreeBSD.org/ には, 日本のミラーサイトが存在します. ネットワークの混雑を緩和するため, まずはミラーサイトの利用を 考慮するようお願いします. 日本のミラーサイトを利用するには, http://www.FreeBSD.org/ を http://www.jp.FreeBSD.org/www.freebsd.org/ に, ftp://ftp.FreeBSD.org/ を ftp://ftp.jp.FreeBSD.org/ に, それぞれ置き換えてください. 他の地域を含む, ミラーサイトに関する詳細は, http://www.FreeBSD.org/handbook/mirror.html (英文) http://www.FreeBSD.org/ja/handbook/mirror.html (日本語訳) にまとめられています. $hrs: announce-jp/FreeBSD-SA/01:58,v 1.6 2001/09/24 19:07:01 hrs Exp $