FreeBSD-SA-06:01.texindex "Texindex temporary file privilege escalation"

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

  • 未稿

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

0. 改訂履歴 - Revision History.

v1.0 2006-01-11
Initial release.
v1.1 2006-01-11
Corrected instructions for rebuilding texindex.

I. 背景 - Background

TeX is a document typesetting system which is popular in the mathematics, physics, and computer science realms because of its ability to typeset complex mathematical formulas. texindex(1) is a utility which is often used to generate a sorted index of a TeX file.
TeXは、複雑な数学の公式を植字できる能力をもっているため、数学、物理学、そしてコンピュータサイエンス分野で一般的な文章植字システムです。texindex(1)はTeXファイルのソートされたインデックスを生成するためにしばしば使用されるユーティリティーです。

II. 問題の詳細 - Problem Description

The "sort_offline" function used by texindex(1) employs the "maketempname" function, which produces predictable file names and fails to validate that the paths do not exist.
texindex(1)により使用される「sort_offline」関数は、予期できるファイル名を作り、パスが存在しない事の検証に失敗する「maketempname」関数を使います。

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 enable them to overwrite files on the system in the context of the user running the texindex(1) utility.
これらの予測できる一時ファイル名は、texindex(1)ユーティリティを実行するユーザの権限によりシステムのファイルを上書きする事を可能にする、symlinkアタックの実行をするために競合状態を利用する事をアタッカーに許すため、問題があります。

IV. 回避方法 - Workaround

No workaround is available, but the problematic code is only executed if the input file being processed is 500kB or more in length; as a result, users working with documents of less than several hundred pages are very unlikely to be affected.
回避法方はありませんが、しかし、問題のコードは、処理される入力ファイルが500kBかそれ以上の長さがある場合にのみ実行されます;そのため、それぞれが100ページ以下の文章で作業するユーザはほとんど影響しそうにありません。