製品・ソフトウェアに関する情報
LinuxのLinux KernelにおけるTime-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
Title LinuxのLinux KernelにおけるTime-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
Summary

Linuxカーネルにおいて、以下の脆弱性が修正されました:f2fsにおけるextentノードの破棄と書き戻し処理間で発生するnode_cntの競合状態の修正です。f2fs_destroy_extent_node()はextentノードをクリアする前にFI_NO_EXTENTを設定していません。I_SYNCが設定された状態でf2fs_drop_inode()から呼び出されると、同時に動作するkworkerの書き戻し処理が同じextentツリーに新しいextentノードを挿入し、破棄処理と競合して__destroy_extent_node()内でf2fs_bug_on()が発生します。シナリオは以下の通りです。drop inodeからwriteback処理へ進み、iputでf2fs_drop_inodeが呼び出され(I_SYNCが設定された状態)、f2fs_destroy_extent_node内で__destroy_extent_nodeが実行されます。その中でnode_cntが存在する間、write_lock(&et-lock)を取得して__free_extent_treeを実行し、write_unlock(&et-lock)でロックを解除します。その後、__writeback_single_inodeおよびf2fs_outplace_write_data、f2fs_update_read_extent_cache、__update_extent_tree_rangeが順に呼ばれます。しかし、FI_NO_EXTENTが未設定のまま新しいextentノードが挿入されるため、node_cntが0になるまでのループが終了し、f2fs_bug_on(node_cnt)がnode_cnt 0となり失敗します。また、__update_extent_tree_range()はEX_READタイプにのみFI_NO_EXTENTをチェックし、EX_BLOCK_AGEの更新は保護されていません。このパッチでは、__destroy_extent_node()内でet-lockの下でFI_NO_EXTENTを設定し、他の呼び出し元(__update_extent_tree_rangeおよび__drop_extent_tree)と一貫性を保ち、EX_READおよびEX_BLOCK_AGEの両方のツリーに対してFI_NO_EXTENTをチェックするようにしています。

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

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

Publication Date May 28, 2026, midnight
Registration Date June 11, 2026, 4:22 p.m.
Last Update June 11, 2026, 4:22 p.m.
CVSS3.0 : 警告
Score 4.7
Vector CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected System
Linux
Linux Kernel 6.12.5 以上 6.12.88 未満
Linux Kernel 6.13 以上 6.18.30 未満
Linux Kernel 6.19 以上 7.0.7 未満
Linux Kernel 6.6.66 以上 6.6.140 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年06月11日]
  掲載
June 11, 2026, 4:22 p.m.

NVD Vulnerability Information
CVE-2026-46194
Summary

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

f2fs: fix node_cnt race between extent node destroy and writeback

f2fs_destroy_extent_node() does not set FI_NO_EXTENT before clearing
extent nodes. When called from f2fs_drop_inode() with I_SYNC set,
concurrent kworker writeback can insert new extent nodes into the same
extent tree, racing with the destroy and triggering f2fs_bug_on() in
__destroy_extent_node(). The scenario is as follows:

drop inode writeback
- iput
- f2fs_drop_inode // I_SYNC set
- f2fs_destroy_extent_node
- __destroy_extent_node
- while (node_cnt) {
write_lock(&et->lock)
__free_extent_tree
write_unlock(&et->lock)
- __writeback_single_inode
- f2fs_outplace_write_data
- f2fs_update_read_extent_cache
- __update_extent_tree_range
// FI_NO_EXTENT not set,
// insert new extent node
} // node_cnt == 0, exit while
- f2fs_bug_on(node_cnt) // node_cnt > 0

Additionally, __update_extent_tree_range() only checks FI_NO_EXTENT for
EX_READ type, leaving EX_BLOCK_AGE updates completely unprotected.

This patch set FI_NO_EXTENT under et->lock in __destroy_extent_node(),
consistent with other callers (__update_extent_tree_range and
__drop_extent_tree) and check FI_NO_EXTENT for both EX_READ and
EX_BLOCK_AGE tree.

Publication Date May 28, 2026, 7:16 p.m.
Registration Date May 29, 2026, 4:13 a.m.
Last Update May 28, 2026, 10:44 p.m.
Related information, measures and tools
Common Vulnerabilities List