[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NetBSD Security Advisory 2004-010: Insufficient argumentvalidation in compat code



佐藤@東京理科大学です。

 2004-010 を翻訳しましたので、レビューをお願いします。

--
| 佐藤 広生@東京理科大学
NetBSD セキュリティー勧告 日本語訳
=============================================================================
NetBSD Security Advisory 2004-010 (2004/12/17)
 * Insufficient argument validation in compat code
=============================================================================

 このメールは, netbsd-announce に流れた

  Subject: NetBSD Security Advisory 2004-010: Insufficient argument validation in compat code
  From: NetBSD Security-Officer <security-officer@NetBSD.org>
  Date: Fri, 17 Dec 2004 16:29:54 +1100
  Message-Id: <20041217052954.GN23458@bcd.geek.com.au>

 を、www.NetBSD.ORG 翻訳プロジェクトが日本語訳したものです。

 原文は PGP 署名されていますが、この日本語訳は PGP 署名されていません。
 修正パッチ等の内容が改ざんされていないことを確認するために PGP 署名の
 チェックを行なうには、原文を参照してください。

------------------------------- ここから ------------------------------------


		 NetBSD Security Advisory 2004-010
		 =================================

トピック:	compat コードにおける不十分な引数検証問題
		(Insufficient argument validation in compat code)

バージョン:	NetBSD-current:	2004 年 10 月 27 日より前のソース
		NetBSD 2.0:	影響なし
		NetBSD 1.6.2:	影響あり
		NetBSD 1.6.1:	影響あり
		NetBSD 1.6:	影響あり
		NetBSD 1.5.3:	影響あり
		NetBSD 1.5.2:	影響あり
		NetBSD 1.5.1:	影響あり
		NetBSD 1.5:	影響あり

影響範囲:	ローカルからのサービス妨害 (Local Denial of Service)
		ローカルからの高い権限の不正獲得 (possible Local Privilege
                Escalation)

修正日:		NetBSD-current:		2004 年 10 月 28 日
		NetBSD-2.0 branch:	2004 年 11 月 13 日 (2.0 は修正ずみ)
		NetBSD-1.6 branch:	2004 年 12 月 17 日
						(1.6.3 には修正が含まれる予定)


概要 - Abstract
===============

Kernel syscall implementations must perform appropriate sanity checks on
data passed from userland. The native system calls perform appropriate
checks.

カーネルシステムコールは、ユーザランドから渡されるデータが正常か
どうかの検証を、適切におこなうように実装されていなければなりません。
NetBSD のネイティブシステムコールでは、このようなチェックがおこなわれます。

Some of the functions in /usr/src/sys/compat/* which implement execution
of foreign binaries (such as Linux, FreeBSD, IRIX, OSF1, SVR4, HPUX, and
ULTRIX) used argument data in unsafe ways prior to calling the kernel
syscall.

しかし、/usr/src/sys/compat/* にある、(Linux, FreeBSD, IRIX, OSF1,
SVR4, HPUX, ULTRIX などの) 他の OS 用のバイナリを実行するための
関数群には、カーネルのシステムコールを呼び出す前に、安全でない方法で
引数データを扱っているものがあります。

This issue was reported by Evgeny Demidov.

この問題は Evgeny Demidov 氏によって報告されたものです。


技術的な詳細 - Technical Details
================================

The compat subsystem, in /usr/src/sys/compat/*, allows NetBSD users to
run binaries compiled for other operating systems which run on the same
CPU architecture as the NetBSD host.

/usr/src/sys/compat/* にある compat サブシステムは、
NetBSD とは異なる OS 向けにコンパイルされたバイナリを、
それと同じ CPU アーキテクチャの NetBSD ホストマシンで
実行可能にするためのものです。

Typically, the foreign OS supports a set of system calls which are very
similar to NetBSD's. Native instructions do not need to be translated,
but calls to the operating system do.

NetBSD のネイティブシステムコールセットと、その他の OS の
持っているシステムコールセットは、多くの場合非常に良く似ていますが、
まったく同じではありません。したがって、CPU のネイティブ命令を
変換する必要はありませんが、その他の OS を呼び出すシステムコールは
変換しなければなりません。

A binary's native OS is determined at exec() time. The kernel maps the
syscall table for the native OS so that each syscall is delivered to a
foreign OS -> NetBSD translation function, if needed.

そのバイナリのネイティブな OS、というのは、exec() が実行された時点で
判明します。そこでカーネルは、そのネイティブシステム用の
システムコールテーブルをそのバイナリに割り当てて、バイナリから
システムコールが発行された時、必要ならば「その他の OS → NetBSD」という
変換をおこなう関数が呼び出されるようにします。

These translation functions reorder arguments, reformat them, perform
mapping of constants (such as signal(3) IDs) and call the appropriate
native NetBSD system call to service the application's needs.

これらの変換関数は、引数を並べ変えて形式を合わせ、(signal(3) ID のような)
定数の変換をおこなって、適切な NetBSD ネイティブシステムコールを
呼び出すことで、アプリケーションが要求するサービスを提供します。

Some of the translation functions performed unsafe operations using the
syscall arguments, and were exploitable to cause kernel traps. Some of
the flaws may be exploitable and result in privilege escalation.

一方、このような変換関数の中には、システムコールの引数を使って
安全でない操作をおこなっていたり、カーネルトラップを発生させる目的で
悪用可能なものが存在します。この欠陥には、高い権限を不正に
獲得するために利用することができるものがあるかも知れません。

All of these attacks require local access to the system. A system with
only trusted user accounts is not immediately at risk.

これらの攻撃はすべて、対象システムへのローカルアクセスを
必要とします。信用できるユーザのアカウントしかないシステムであれば、
緊急性が高い危険というわけではありません。

A system running a custom kernel with all 'options COMPAT_' commented
out is not at risk.

'options COMPAT_' をすべてコメントアウトしたカスタムカーネルを
使っているシステムは、この問題の影響はありません。

See also Evgeny Demidov's advisory:

Evgeny Demidov 氏の勧告もご覧ください。

http://gleg.net/advisory_netbsd2.shtml


回避方法と解決策 - Solutions and Workarounds
============================================


The NetBSD 2.0 release already includes the fixes for this
vulnerability.

NetBSD 2.0 リリースには、この問題に対する修正がすでに含まれています。

Since the NetBSD-1-5 branch has reached End of Life, updating to
NetBSD-1-6 or NetBSD-2-0 is recommended.

NetBSD 1-5 ブランチは保守が終了しているため、NetBSD-1-6 もしくは
NetBSD-2-0 へのアップグレードをおすすめします。

netbsd-1-6, netbsd-2-0 (pre-release), netbsd-current:
netbsd-1-6, netbsd-2-0 (リリース以前), netbsd-current の場合:

*** Patching from sources:
*** ソースを使って修正パッチを適用するには:

The fix for this issue is contained in changes to several files, all
within the subdirectory:

この問題に対する修正には、以下のディレクトリにあるファイルへの変更が
含まれています。

	sys/compat

The following instructions describe how to upgrade your kernel
binaries by updating your source tree and rebuilding and installing a
new version of the kernel. In these instructions, replace:

次の手順は、ソースツリーを更新して新しいバージョンのカーネルを
再構築・インストールすることで、カーネルバイナリを
アップグレードする方法を説明したものです。この手順のうち、
以下の部分は適宜読み変えてください。

  BRANCH   with the appropriate CVS branch (netbsd-1-6,
		  netbsd-2-0, HEAD)
  ARCH     with your architecture (from uname -m), and
  KERNCONF with the name of your kernel configuration file.

  BRANCH   対応する CVS ブランチ (netbsd-1-6, netbsd-2-0, HEAD)
  ARCH     (uname -m で表示される) アーキテクチャ
  KERNCONF カーネル設定ファイルのファイル名

To update from CVS, re-build and re-install the kernel:
CVS を使ってファイルを更新し、カーネルを
再構築・再インストールするには、次のコマンドを実行します。
        # cd src
        # cvs update -d -P -r BRANCH sys/compat
        # cd sys/arch/ARCH/conf
        # config KERNCONF
        # cd ../compile/KERNCONF
        # make depend; make
        # mv /netbsd /netbsd.old
        # cp netbsd /
        # shutdown -fr now


謝辞 - Thanks To
================

Evgeny Demidov for notification, review of patches, and considerable patience.

Evgeny Demidov 氏: 情報提供、修正パッチのレビュー、長期にわたる根気強い協力

Christos Zoulas, David Maxwell, and Simon Burge for patches and review.

Christos Zoulas 氏, David Maxwell 氏, Simon Burge 氏: 修正パッチ作成とレビュー


改訂履歴 - Revision History
===========================

	2004-12-16	Initial release
	2004-12-16	初版公開


詳細と参考資料 - More Information
=================================

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at 
新しい情報が判明した場合、セキュリティー勧告は更新されることがあります。
PGP 署名されたこの勧告の最新版は、次の場所から入手できます。
  ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2004-010.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/.

NetBSD および NetBSD のセキュリティーに関する情報は、次の場所から入手できます。
http://www.NetBSD.org/
http://www.NetBSD.org/Security/


Copyright 2004, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2004-010.txt,v 1.3 2004/12/16 16:12:27 david Exp $

$hrs: announce-jp/NetBSD-SA/2004-010,v 1.2 2004/12/19 14:22:14 hrs Exp $

PGP signature