製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける境界外書き込みに関する脆弱性
Title LinuxのLinux Kernelにおける境界外書き込みに関する脆弱性
Summary

Linuxカーネルにおいて、以下の脆弱性が修正されました。ext4ファイルシステムで、truncate操作によりファイルサイズがインラインデータの容量を超えた場合に、インラインデータからextentベースのストレージへ変換する処理をext4_setattr()に追加しました。これにより、インラインデータフラグが設定されたままファイルサイズがインラインで格納可能な容量を超える不整合な状態になることを防ぎます。修正前は、以下の手順でカーネルがBUG_ON()を発生させてクラッシュしていました。1. インラインフラグがセットされていて小さいサイズのinodeを持つファイルシステムをマウントする。2. truncate(file, 50MB)でサイズを拡張するがインラインフラグは解除されなかった。3. sendfile()がデータ書き込みを試みる。4. ext4_write_inline_data()はwrite_sizeがinline_capacityを超えたためBUG_ON()を引き起こしていました。クラッシュは、ext4_write_inline_data()がインラインストレージ内への書き込みを前提としている一方で、実際のインライン容量(i_blockで約60バイト、xattrsで約96バイト)よりもファイルサイズと書き込み要求が大幅に大きいために発生していました。修正では、setattrによる新しいファイルサイズがinodeの実際のインライン容量(EXT4_I(inode)-i_inline_size)を超えた場合に、サイズ変更前にファイルをextentベースのストレージに変換し不整合を防止します。これにより、truncate操作中にインラインデータフラグとファイルサイズの整合性が維持され、根本的な問題が解決されました。

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

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

Publication Date April 22, 2026, midnight
Registration Date May 8, 2026, 12:07 p.m.
Last Update May 8, 2026, 12:07 p.m.
CVSS3.0 : 重要
Score 7.8
Vector CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected System
Linux
Linux Kernel 3.8 以上 5.10.253 未満
Linux Kernel 5.11 以上 5.15.203 未満
Linux Kernel 5.16 以上 6.1.168 未満
Linux Kernel 6.13 以上 6.18.21 未満
Linux Kernel 6.19 以上 6.19.11 未満
Linux Kernel 6.2 以上 6.6.131 未満
Linux Kernel 6.7 以上 6.12.80 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年05月08日]
  掲載
May 8, 2026, 12:07 p.m.

NVD Vulnerability Information
CVE-2026-31452
Summary

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

ext4: convert inline data to extents when truncate exceeds inline size

Add a check in ext4_setattr() to convert files from inline data storage
to extent-based storage when truncate() grows the file size beyond the
inline capacity. This prevents the filesystem from entering an
inconsistent state where the inline data flag is set but the file size
exceeds what can be stored inline.

Without this fix, the following sequence causes a kernel BUG_ON():

1. Mount filesystem with inode that has inline flag set and small size
2. truncate(file, 50MB) - grows size but inline flag remains set
3. sendfile() attempts to write data
4. ext4_write_inline_data() hits BUG_ON(write_size > inline_capacity)

The crash occurs because ext4_write_inline_data() expects inline storage
to accommodate the write, but the actual inline capacity (~60 bytes for
i_block + ~96 bytes for xattrs) is far smaller than the file size and
write request.

The fix checks if the new size from setattr exceeds the inode's actual
inline capacity (EXT4_I(inode)->i_inline_size) and converts the file to
extent-based storage before proceeding with the size change.

This addresses the root cause by ensuring the inline data flag and file
size remain consistent during truncate operations.

Publication Date April 22, 2026, 11:16 p.m.
Registration Date April 25, 2026, 4:05 a.m.
Last Update April 24, 2026, 1:17 a.m.
Related information, measures and tools
Common Vulnerabilities List