LinuxのLinux Kernelにおける境界外書き込みに関する脆弱性
タイトル LinuxのLinux Kernelにおける境界外書き込みに関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。nfsdにおけるNFSv4.0 LOCKリプレイキャッシュのヒープオーバーフローが修正されました。NFSv4.0のリプレイキャッシュは、エンコードされた操作応答を格納するために固定長の112バイトのインラインバッファ(rp_ibuf[NFSD4_REPLAY_ISIZE])を使用しています。このサイズはOPEN応答に基づいて計算されており、最大1024バイトの可変長フィールドを含むLOCK拒否応答の変数長の競合ロック所有者を考慮していません(NFS4_OPAQUE_LIMIT)。既存の大きな所有者を持つロックと競合してLOCK操作が拒否された場合、nfsd4_encode_operation()は境界チェックなしにread_bytes_from_xdr_buf()を介して完全なエンコード応答を不足したリプレイバッファにコピーします。これにより、バッファの終わりから最大944バイトのスラブ外書き込みが発生し、隣接するヒープメモリが破損する恐れがあります。この問題は、2つの協調するNFSv4.0クライアントによってリモートから認証なしで悪用可能です。1つは大きな所有者文字列を持つロックを設定し、もう1つは競合するロックを要求して拒否を引き起こします。NFSD4_REPLAY_ISIZEを増やして完全な不透明フィールドを許容する方法もありますが、多くのロック所有者はそこまで大きくないため、すべてのstateownerのサイズが増加してしまいます。代わりに、リプレイバッファにコピーする前にエンコード応答の長さをNFSD4_REPLAY_ISIZEと比較して検査し、応答が大きすぎる場合はrp_buflenを0に設定してリプレイペイロードのキャッシュをスキップすることで修正しています。ステータスは引き続きキャッシュされ、クライアントは最初のリクエストで正しい応答を既に受け取っています。

想定される影響 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年4月3日0:00
登録日 2026年5月22日10:56
最終更新日 2026年5月22日10:56
CVSS3.0 : 緊急
スコア 9.8
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
Linux
Linux Kernel 2.6.12
Linux Kernel 2.6.12.1 以上 5.10.253 未満
Linux Kernel 5.11 以上 6.1.167 未満
Linux Kernel 6.13 以上 6.18.20 未満
Linux Kernel 6.19 以上 6.19.10 未満
Linux Kernel 6.2 以上 6.6.130 未満
Linux Kernel 6.7 以上 6.12.78 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月22日]
  掲載
2026年5月22日10:56

NVD脆弱性情報
CVE-2026-31402
概要

In the Linux kernel, the following vulnerability has been resolved:

nfsd: fix heap overflow in NFSv4.0 LOCK replay cache

The NFSv4.0 replay cache uses a fixed 112-byte inline buffer
(rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses.
This size was calculated based on OPEN responses and does not account
for LOCK denied responses, which include the conflicting lock owner as
a variable-length field up to 1024 bytes (NFS4_OPAQUE_LIMIT).

When a LOCK operation is denied due to a conflict with an existing lock
that has a large owner, nfsd4_encode_operation() copies the full encoded
response into the undersized replay buffer via read_bytes_from_xdr_buf()
with no bounds check. This results in a slab-out-of-bounds write of up
to 944 bytes past the end of the buffer, corrupting adjacent heap memory.

This can be triggered remotely by an unauthenticated attacker with two
cooperating NFSv4.0 clients: one sets a lock with a large owner string,
then the other requests a conflicting lock to provoke the denial.

We could fix this by increasing NFSD4_REPLAY_ISIZE to allow for a full
opaque, but that would increase the size of every stateowner, when most
lockowners are not that large.

Instead, fix this by checking the encoded response length against
NFSD4_REPLAY_ISIZE before copying into the replay buffer. If the
response is too large, set rp_buflen to 0 to skip caching the replay
payload. The status is still cached, and the client already received the
correct response on the original request.

公表日 2026年4月4日1:16
登録日 2026年4月15日11:24
最終更新日 2026年4月7日22:20
関連情報、対策とツール
共通脆弱性一覧