製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける不特定の脆弱性
Title LinuxのLinux Kernelにおける不特定の脆弱性
Summary

Linuxカーネルにおいて、以下の脆弱性が修正されました。btrfsにおいて、ログ再生後にサイズが非ゼロであるにもかかわらず、ゼロサイズのinodeが設定される問題が修正されました。新しい名前のログ記録やディレクトリの新しいエントリのログ記録の一部としてinodeの存在をログ記録する際、ログされたinodeアイテムの世代は常に0に設定されます。これはログ再生時(overwrite_item()内)に、inodeが存在することだけをログしているためにi_sizeを設定すべきではなく、サブボリュームツリー内のinodeのi_sizeを保持する必要があることを示しています(新しい名前やinodeの存在だけをログするときはextentsはログしません)。しかしこれは、すでにフルモードでinodeがログされた場合や、過去のトランザクションで作成されたinodeを初めてログするときに、そのinodeの新しいi_sizeが0になる点に問題があります。新しい名前のログ(新しいハードリンクやリネームによる)を行うと、inodeのi_sizeが0かつ世代が0としてログされ、この場合ログ再生コードはinodeのi_sizeを0に更新しない(overwrite_item()内)という問題が発生します。具体的なシナリオ例は以下の通りです。mkdir /mnt/dir xfs_io -f -c "pwrite 0 64K" /mnt/dir/foo sync xfs_io -c "truncate 0" -c "fsync" /mnt/dir/foo ln /mnt/dir/foo /mnt/dir/bar xfs_io -c "fsync" /mnt/dir 電源断。ログ再生後、ファイルのサイズは64Kのまま残ります。これは最初にinodeをログするとき、fooファイルをfsyncした際に現在のi_sizeである0をログし、その後ハードリンクを作成するとinodeを存在モード(LOG_INODE_EXISTS)で再度ログしますが、ログツリーに追加するinodeアイテムの世代を0に設定しているため、ログ再生中にoverwrite_item()は世代とi_sizeの両方が0であることを検出し、inodeのi_sizeを64Kから0に更新する処理をスキップするためです。修正はfill_inode_item()において、現在のトランザクションでログしたi_sizeとともに実際のinodeの世代を常にログするようにし、過去のトランザクションで作成されたinodeが存在モードのみでログされた場合でも、コミットルートから取得したinodeアイテムのi_sizeをログすることで、複数回inodeの存在をログしても正しいi_sizeを得られるようにしました。fstests用のテストケースは近日中に提供される予定です。

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

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

Publication Date May 6, 2026, midnight
Registration Date May 11, 2026, 11:07 a.m.
Last Update May 11, 2026, 11:07 a.m.
CVSS3.0 : 警告
Score 5.5
Vector CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected System
Linux
Linux Kernel 2.6.30 以上 6.18.24 未満
Linux Kernel 6.19 以上 6.19.14 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年05月11日]
  掲載
May 11, 2026, 11:07 a.m.

NVD Vulnerability Information
CVE-2026-43118
Summary

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

btrfs: fix zero size inode with non-zero size after log replay

When logging that an inode exists, as part of logging a new name or
logging new dir entries for a directory, we always set the generation of
the logged inode item to 0. This is to signal during log replay (in
overwrite_item()), that we should not set the i_size since we only logged
that an inode exists, so the i_size of the inode in the subvolume tree
must be preserved (as when we log new names or that an inode exists, we
don't log extents).

This works fine except when we have already logged an inode in full mode
or it's the first time we are logging an inode created in a past
transaction, that inode has a new i_size of 0 and then we log a new name
for the inode (due to a new hardlink or a rename), in which case we log
an i_size of 0 for the inode and a generation of 0, which causes the log
replay code to not update the inode's i_size to 0 (in overwrite_item()).

An example scenario:

mkdir /mnt/dir
xfs_io -f -c "pwrite 0 64K" /mnt/dir/foo

sync

xfs_io -c "truncate 0" -c "fsync" /mnt/dir/foo

ln /mnt/dir/foo /mnt/dir/bar

xfs_io -c "fsync" /mnt/dir

<power fail>

After log replay the file remains with a size of 64K. This is because when
we first log the inode, when we fsync file foo, we log its current i_size
of 0, and then when we create a hard link we log again the inode in exists
mode (LOG_INODE_EXISTS) but we set a generation of 0 for the inode item we
add to the log tree, so during log replay overwrite_item() sees that the
generation is 0 and i_size is 0 so we skip updating the inode's i_size
from 64K to 0.

Fix this by making sure at fill_inode_item() we always log the real
generation of the inode if it was logged in the current transaction with
the i_size we logged before. Also if an inode created in a previous
transaction is logged in exists mode only, make sure we log the i_size
stored in the inode item located from the commit root, so that if we log
multiple times that the inode exists we get the correct i_size.

A test case for fstests will follow soon.

Publication Date May 6, 2026, 7:16 p.m.
Registration Date May 7, 2026, 4:08 a.m.
Last Update May 9, 2026, 2:30 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 2.6.30 6.18.24
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 6.19.14
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:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List