FreeBSD-SA-06:03.cpio "Multiple vulnerabilities cpio"

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

  • 未稿

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

I. 背景 - Background

The cpio utility copies files into or out of a cpio or tar archive.
cpioユーティリティはcpioまたはtarアーカイブへ、またはアーカイブからファイルをコピーします。

II. 問題の詳細 - Problem Description

A number of issues has been discovered in cpio:
cpioにいくつかの問題が発見されました。

  • When creating a new file, cpio closes the file before setting its permissions. (CVE-2005-1111)
  • 新しいファイルを作成する時、cpioはパーミッションを設定する前にファイルをクローズします。(CVE-2005-1111)
  • When extracting files cpio does not properly sanitize file names to filter out ".." components, even if the --no-absolute-filenames option is used. (CVE-2005-1229)
  • ファイルを展開する時、cpioは、たとえ--no-absolute-filenamesオプションを使用しても、ファイル名の「..」要素を取り除くサニタイズを適切に行ないません。(CVE-2005-1229)
  • When adding large files (larger than 4 GB) to a cpio archive on 64-bit platforms an internal buffer might overflow. (CVE-2005-4268)
  • 64ビットプラットフォームでcpioアーカイブに(4GBを超える)大きなファイルを加えた場合、内部バッファがオーバーフローします。(CVE-2005-4268)

III. 影響範囲 - Impact

  • The first problem can allow a local attacker to change the permissions of files owned by the user executing cpio providing that they have write access to the directory in which the file is being extracted. (CVE-2005-1111)
  • 最初の問題は、ローカルアタッカーが、ファイルが展開されているディレクトリの書き込み権をもっていると規定されているcpioの実行ユーザが所有しているファイルのパーミッションを変更する事を許します。
  • The lack of proper file name sanitation can allow an attacker to overwrite arbitrary local files when extracting files from a cpio a archive. (CVE-2005-1229)
  • The buffer-overflow on 64-bit platforms could lead cpio to a Denial-of-Service situation (crash) or possibly execute arbitrary code with the permissions of the user running cpio. (CVE-2005-4268)

IV. 回避方法 - Workaround

Use a different utility to create and extract cpio archives, for example pax(1) or (on FreeBSD 5.3 or later) tar(1). If this is not possible, do not extract untrusted archives and when running on 64-bit platforms do not add untrusted files to cpio archives.