FreeBSD-SA-06:02.ee "ee temporary file privilege escalation"

The FreeBSD Project よりセキュリティ勧告が出ました。要点を以下にまとめます。

  • 未稿

セキュリティ勧告は ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-06:02.ee.asc にあります。
以下は上記のセキュリティ勧告の一部とその訳文です。ただし品質は保証致しません。

I. 背景 - Background

The ee utility is a simple screen oriented text editor. This editor is popular with a lot of users due to its ease of use.
eeはシンプルなスクリーン指向のテキストエディタです。このエディタは簡単に使用できるため、多くのユーザに使用されています。

II. 問題の詳細 - Problem Description

The ispell_op function used by ee(1) while executing spell check operations employs an insecure method of temporary file generation. This method produces predictable file names based on the process ID and fails to confirm which path will be over written with the user.
eeにより使用されているispell_op関数はスペルチェックを実施している間に一時ファイルの生成を安全ではない方法で行ないます。
It should be noted that ispell does not have to be installed in order for this to be exploited. The option simply needs to be selected.
注意しなければならないのは、これを利用するためにispellはインストールされている必要がありません。単にオプションが選ばれている必要があるだけです。

III. 影響範囲 - Impact

These predictable temporary file names are problematic because they allow an attacker to take advantage of a race condition in order to execute a symlink attack, which could allow them to overwrite files on the system in the context of the user running the ee(1) editor.
これらの予測できる一時ファイル名は、ee(1)ユーティリティを実行するユーザの権限によりシステムのファイルを上書きする事を可能にする、symlinkアタックの実行をするために競合状態を利用する事をアタッカーに許すため、問題があります。

IV. 回避方法 - Workaround

Instead of invoking ispell through ee(1), invoke it directly.
eeによりispellを呼び出す代わりに、じかに呼び出します。