FreeBSD-SA-05:04.ifconf "Kernel memory disclosure in ifconf()"

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

  • SIOCGIFCONF ioctlにより呼び出されるifconf()は最初にバッファをゼロクリアしていないため、他の内容の一部をコピーしてしまう脆弱性がある。
  • この脆弱性により権限のないユーザがカーネルメモリを入手できてしまう。
  • 入手したカーネルメモリにはファイルキャッシュやターミナルバッファの一部などを含む可能性があり、これらには他人の機密情報、たとえば他のユーザが入力したパスワードなどを含む可能性がある。

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

I. 背景 - Background

The SIOCGIFCONF ioctl allows a user process to ask the kernel to produce a list of the existing network interfaces and copy it into a buffer provided by the user process.
SIOCGIFCONF ioctlは、既存のネットワークインタフェースのリストを作り出して、ユーザプロセスで提供されたバッファの中にそれをコピーするようにカーネルに頼む事を、ユーザプロセスが出来るようにしています。

II. 問題の詳細 - Problem Description

In generating the list of network interfaces, the kernel writes into a portion of a buffer without first zeroing it. As a result, the prior contents of the buffer will be disclosed to the calling process.
ネットワークインタフェースのリストを生成すると、カーネルはバッファの一部に最初にゼロクリアせずに書きます。その結果、バッファの前回の内容が呼び出したプロセスに公開されるでしょう。

III. 影響範囲 - Impact

Up to 12 bytes of kernel memory may be disclosed to the user process. Such memory might contain sensitive information, such as portions of the file cache or terminal buffers. This information might be directly useful, or it might be leveraged to obtain elevated privileges in some way. For example, a terminal buffer might include a user-entered password.
最大12バイトのカーネルメモリがユーザプロセスに明らかにされるかもしれません。そのようなメモリはファイルキャッシュやターミナルバッファの一部などの機密情報を含むかもしれません。この情報は直接有用かもしれませんし、あるいは、何らかの方法で高い権限を得る手段にされるかもしれません。例えば、ターミナルバッファはユーザによって入力されたパスワードを含むかもしれません。

IV. 回避方法 - Workaround

No known workaround.
既知の回避方法はありません。

><