FreeBSD-SA-06:10.nfs "Remote denial of service in NFS server"

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

  • 危険度中
  • nfsdの動作するサーバに空のペイロードパケットを送る事により、そのサーバがカーネルパニックをおこします。
  • この脆弱性により攻撃者はリモートからDoSが可能となりますが、通常、攻撃パケットを送るべきRPCポートは信頼できるホストのみに開かれています(べきです)。


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

I. 背景 - Background

The Network File System (NFS) allows a host to export some or all of its filesystems so that other hosts can access them over the network and mount them as if they were on local disks. NFS is built on top of the Sun Remote Procedure Call (RPC) framework.
ネットワークファイルシステム(NFS)はホストがいくつか、またはすべてのファイルシステムを、他のホストがネットワーク越しにそれらにアクセスし、まるでローカルディスクのようにマウントできるようにエクスポートする事を可能にします。NFSはSunリモートプロシージャコール(RPC)フレームワークを基にしています。

II. 問題の詳細 - Problem Description

A part of the NFS server code charged with handling incoming RPC messages via TCP had an error which, when the server received a message with a zero-length payload, would cause a NULL pointer dereference which results in a kernel panic. The kernel will only process the RPC messages if a userland nfsd daemon is running.
TCPにより入ってくるRPCメッセージの取り出しに費やされているNFSサーバコードの一部は、サーバがゼロ長のペイロードをもつメッセージを受信した時、カーネルパニックの生ずるNULLポインターの参照を引き起こすエラーをもっています。kernelはuserlandのnfsdデーモンが走っている時だけにRPCメッセージを処理します。

III. 影響範囲 - Impact

The NULL pointer deference allows a remote attacker capable of sending RPC messages to an affected FreeBSD system to crash the FreeBSD system.

IV. 回避方法 - Workaround

1) Disable the NFS server: set the nfs_server_enable variable to "NO" in /etc/rc.conf, and reboot.
Alternatively, if there are no active NFS clients (as listed by the showmount(8) utility), simply killing the mountd and nfsd processes should suffice.
2) Add firewall rules to block RPC traffic to the NFS server from untrusted hosts.