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

Linuxカーネルにおいて、以下の脆弱性が修正されました。xfsにおけるattr dabtreeの非アクティブ化に伴うクラッシュウィンドウの閉鎖問題です。ノード形式の拡張属性を持つinodeを非アクティブ化する際、xfs_attr3_node_inactive()はxfs_trans_binval()を用いてすべての子のリーフおよびノードブロックを無効化しますが、親ノードブロックから対応するエントリを削除しません。この暗黙の前提は、xfs_attr_inactive()がその後attrフォーク全体をゼロエクステントに切り詰めるため、ログ回復時にルートノードに到達して古いポインタを追跡しないというものです。しかし、リーフおよびノードブロックの取消がコミットされた後、attr bmapの切り詰めがコミットされる前にログシャットダウンが発生した場合、この前提は崩れます。回復処理はattr bmapをそのまま再生します(inodeはまだattrフォークのエクステントを持っています)が、すべての取消されたリーフおよびノードブロックの再生を抑制し、それらがディスク上に古いデータとして残る可能性があります。次回のマウント時に、xlog_recover_process_iunlinks()は非アクティブ化を再試行し、attr bmap経由でルートノードを読み込もうとします。もしルートノードが再生されていなければ、読み込み時にすぐにメタデータ検証エラーが発生し、再生されていた場合でも、子ポインタをたどって未再生の子ブロックを読み込もうとして同じエラーが発生します。エラー例としては、XFS (pmem0): Metadata corruption detected at xfs_da3_node_read_verify+0x53/0x220, xfs_da3_node block 0x78、XFS (pmem0): Unmount and run xfs_repair、XFS (pmem0): First 128 bytes of corrupted metadata buffer: ...、XFS (pmem0): metadata I/O error in "xfs_da_read_buf+0x104/0x190" at daddr 0x78 len 8 error 117があります。修正点は2箇所あります。1つ目は、xfs_attr3_node_inactive()内で子ブロックに対してxfs_trans_binval()を呼び出した後、同一トランザクション内で直ちに親ノードからその子ブロックを参照するエントリを削除し、親が取消されたブロックを指し示す期間を排除します。すべての子が削除された後、空になったルートノードは同じトランザクション内でリーフブロックに変換されます。このノードからリーフへの変換はクラッシュ安全性のために必要です。空のノードがログに書き込まれた後、第二段階のbmap切り詰めがコミットされる前にシステムシャットダウンが発生した場合、ログ回復はディスク上のルートブロックを検証しようとします。xfs_da3_node_verify()はcount == 0のノードブロックを許容しないため、そのようなブロックは検証に失敗しメタデータ破損シャットダウンを引き起こします。一方で、リーフブロックはこの一時的な状態を許容します。2つ目は、xfs_attr_inactive()内でattrフォークの切り詰めを2段階の明示的なフェーズに分割しました。まずルートブロックを超えるすべてのエクステント(親参照がすでに削除された子エクステント)を切り詰めます。次に、ルートブロックを無効化しattr bmapをゼロに切り詰める操作を単一トランザクションで行います。第二段階の2つの操作は原子で実行する必要があります。attr bmapに非ゼロ長が存在する限り、回復処理はそれを追跡してルートブロックに到達できるため、ルートブロックの無効化はbmapのゼロ切り詰めと同時にコミットされなければなりません。

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

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

公表日 2026年5月1日0:00
登録日 2026年5月11日10:56
最終更新日 2026年5月11日10:56
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.12
Linux Kernel 2.6.12.1 以上 6.19.12 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月11日]
  掲載
2026年5月11日10:56

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

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

xfs: close crash window in attr dabtree inactivation

When inactivating an inode with node-format extended attributes,
xfs_attr3_node_inactive() invalidates all child leaf/node blocks via
xfs_trans_binval(), but intentionally does not remove the corresponding
entries from their parent node blocks. The implicit assumption is that
xfs_attr_inactive() will truncate the entire attr fork to zero extents
afterwards, so log recovery will never reach the root node and follow
those stale pointers.

However, if a log shutdown occurs after the leaf/node block cancellations
commit but before the attr bmap truncation commits, this assumption
breaks. Recovery replays the attr bmap intact (the inode still has
attr fork extents), but suppresses replay of all cancelled leaf/node
blocks, maybe leaving them as stale data on disk. On the next mount,
xlog_recover_process_iunlinks() retries inactivation and attempts to
read the root node via the attr bmap. If the root node was not replayed,
reading the unreplayed root block triggers a metadata verification
failure immediately; if it was replayed, following its child pointers
to unreplayed child blocks triggers the same failure:

XFS (pmem0): Metadata corruption detected at
xfs_da3_node_read_verify+0x53/0x220, xfs_da3_node block 0x78
XFS (pmem0): Unmount and run xfs_repair
XFS (pmem0): First 128 bytes of corrupted metadata buffer:
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
XFS (pmem0): metadata I/O error in "xfs_da_read_buf+0x104/0x190" at daddr 0x78 len 8 error 117

Fix this in two places:

In xfs_attr3_node_inactive(), after calling xfs_trans_binval() on a
child block, immediately remove the entry that references it from the
parent node in the same transaction. This eliminates the window where
the parent holds a pointer to a cancelled block. Once all children are
removed, the now-empty root node is converted to a leaf block within the
same transaction. This node-to-leaf conversion is necessary for crash
safety. If the system shutdown after the empty node is written to the
log but before the second-phase bmap truncation commits, log recovery
will attempt to verify the root block on disk. xfs_da3_node_verify()
does not permit a node block with count == 0; such a block will fail
verification and trigger a metadata corruption shutdown. on the other
hand, leaf blocks are allowed to have this transient state.

In xfs_attr_inactive(), split the attr fork truncation into two explicit
phases. First, truncate all extents beyond the root block (the child
extents whose parent references have already been removed above).
Second, invalidate the root block and truncate the attr bmap to zero in
a single transaction. The two operations in the second phase must be
atomic: as long as the attr bmap has any non-zero length, recovery can
follow it to the root block, so the root block invalidation must commit
together with the bmap-to-zero truncation.

公表日 2026年5月2日0:16
登録日 2026年5月2日4:07
最終更新日 2026年5月8日3:24
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 2.6.12.1 6.19.12
cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧