LinuxのLinux KernelにおけるTime-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
タイトル LinuxのLinux KernelにおけるTime-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
概要

Linuxカーネルにおいて、btrfs_ioctl_space_info() の slot_count TOCTOU レースコンディションによる情報漏洩の脆弱性が修正されました。btrfs_ioctl_space_info() には、ブロックグループの RAID タイプリストに対する2回のパス間で TOCTOU レースが存在します。最初のパスはエントリ数をカウントして割り当てサイズを決定し、2回目のパスでバッファを埋めます。両パスの間で groups_sem の rwlock が解放されるため、同時にブロックグループが削除されてエントリ数が減少する可能性があります。2回目のパスで最初のパスより少ないエントリ数しか埋められなかった場合、copy_to_user() は未初期化の kmalloc バイトを含む割り当てサイズ全体をユーザ空間にコピーしてしまいます。修正は、実際に埋められた2回目のパスでの total_spaces エントリ数だけをコピーし、コピーサイズの不一致によるヒープデータ漏洩を防ぐために kzalloc に切り替えたものです。

想定される影響 ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う情報について、書き換えは発生しません。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

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

公表日 2026年5月28日0:00
登録日 2026年6月10日14:27
最終更新日 2026年6月10日14:27
CVSS3.0 : 警告
スコア 4.7
ベクター CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Linux
Linux Kernel 2.6.34
Linux Kernel 2.6.34.1 以上 6.6.140 未満
Linux Kernel 6.13 以上 6.18.32 未満
Linux Kernel 6.19 以上 7.0.7 未満
Linux Kernel 6.7 以上 6.12.90 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年06月10日]
  掲載
2026年6月10日14:27

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

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

btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak

btrfs_ioctl_space_info() has a TOCTOU race between two passes over the
block group RAID type lists. The first pass counts entries to determine
the allocation size, then the second pass fills the buffer. The
groups_sem rwlock is released between passes, allowing concurrent block
group removal to reduce the entry count.

When the second pass fills fewer entries than the first pass counted,
copy_to_user() copies the full alloc_size bytes including trailing
uninitialized kmalloc bytes to userspace.

Fix by copying only total_spaces entries (the actually-filled count from
the second pass) instead of alloc_size bytes, and switch to kzalloc so
any future copy size mismatch cannot leak heap data.

公表日 2026年5月28日19:16
登録日 2026年5月29日4:13
最終更新日 2026年5月28日22:44
関連情報、対策とツール
共通脆弱性一覧