LinuxのLinux Kernelにおける競合状態に関する脆弱性
タイトル LinuxのLinux Kernelにおける競合状態に関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました:net/packetのtpacket_snd()内でmmapされたvnet_hdrに対するTOCTOU競合状態を修正しました。tpacket_snd()では、PACKET_VNET_HDRが有効な場合、vnet_hdrはユーザースペースと共有されるmmapされたTXリングバッファを直接指します。カーネルは__packet_snd_vnet_parse()でヘッダーを検証しますが、その後virtio_net_hdr_to_skb()で全フィールドを再読み込みします。この間にユーザースペースのスレッドがvnet_hdrフィールドを変更すると、安全性チェックをすり抜ける可能性があります。非TPACKETパス(packet_snd())では既にvnet_hdrをスタックローカル変数に正しくコピーしています。カーネル内の他のvnet_hdrの利用箇所(tun.c、tap.c、virtio_net.c)もスタックコピーを使用しています。TPACKET TXパスのみがvirtio_net_hdr_to_skb()を呼び出し、ユーザー制御の共有メモリから直接読み取っていました。この問題は、packet_snd()や他の呼び出し元と同様に、検証および使用前にmmapされたリングバッファからvnet_hdrをスタックローカル変数にコピーする方法で修正されました。

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

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

公表日 2026年5月1日0:00
登録日 2026年5月8日12:06
最終更新日 2026年5月8日12:06
CVSS3.0 : 重要
スコア 7.8
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
Linux
Linux Kernel 4.6 以上 6.6.136 未満
Linux Kernel 6.13 以上 6.18.25 未満
Linux Kernel 6.19 以上 7.0.2 未満
Linux Kernel 6.7 以上 6.12.84 未満
Linux Kernel 7.1
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月08日]
  掲載
2026年5月8日12:06

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

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

net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd()

In tpacket_snd(), when PACKET_VNET_HDR is enabled, vnet_hdr points
directly into the mmap'd TX ring buffer shared with userspace. The
kernel validates the header via __packet_snd_vnet_parse() but then
re-reads all fields later in virtio_net_hdr_to_skb(). A concurrent
userspace thread can modify the vnet_hdr fields between validation
and use, bypassing all safety checks.

The non-TPACKET path (packet_snd()) already correctly copies vnet_hdr
to a stack-local variable. All other vnet_hdr consumers in the kernel
(tun.c, tap.c, virtio_net.c) also use stack copies. The TPACKET TX
path is the only caller of virtio_net_hdr_to_skb() that reads directly
from user-controlled shared memory.

Fix this by copying vnet_hdr from the mmap'd ring buffer to a
stack-local variable before validation and use, consistent with the
approach used in packet_snd() and all other callers.

公表日 2026年5月1日23:16
登録日 2026年5月2日4:06
最終更新日 2026年5月7日4:01
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.6 6.6.136
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 6.12.84
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.13 6.18.25
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 7.0.2
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧