CVE-2025-38701: ext4: do not BUG when INLINE_DATA_FL lacks system.data xattr
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ext4: do not BUG when INLINE_DATA_FL lacks system.data xattr
A syzbot fuzzed image triggered a BUG_ON in ext4_update_inline_data() when an inode had the INLINE_DATA_FL flag set but was missing the system.data extended attribute.
Since this can happen due to a maiciouly fuzzed file system, we shouldn't BUG, but rather, report it as a corrupted file system.
Add similar replacements of BUG_ON with EXT4_ERROR_INODE() ii ext4_create_inline_data() and ext4_inline_data_truncate().
The Linux kernel CVE team has assigned CVE-2025-38701 to this issue.
Affected and fixed versions
===========================
Fixed in 5.4.297 with commit 8085a7324d8ec448c4a764af7853e19bbd64e17a Fixed in 5.10.241 with commit 1199a6399895f4767f0b9a68a6ff47c3f799b7c7 Fixed in 5.15.190 with commit 7f322c12df7aeed1755acd3c6fab48c7807795fb Fixed in 6.1.149 with commit 2817ac83cb4732597bf36853fe13ca616f4ee4e2 Fixed in 6.6.103 with commit d960f4b793912f35e9d72bd9d1e90553063fcbf1 Fixed in 6.12.43 with commit 81e7e2e7ba07e7c8cdce43ccad2f91adbc5a919c Fixed in 6.15.11 with commit 279c87ef7b9da34f65c2e4db586e730b667a6fb9 Fixed in 6.16.2 with commit 8a6f89d42e61788605722dd9faf98797c958a7e5 Fixed in 6.17-rc1 with commit 099b847ccc6c1ad2f805d13cfbcc83f5b6d4bc42
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-38701
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/ext4/inline.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8085a7324d8ec448c4a764af7853e19bbd64e17a https://git.kernel.org/stable/c/1199a6399895f4767f0b9a68a6ff47c3f799b7c7 https://git.kernel.org/stable/c/7f322c12df7aeed1755acd3c6fab48c7807795fb https://git.kernel.org/stable/c/2817ac83cb4732597bf36853fe13ca616f4ee4e2 https://git.kernel.org/stable/c/d960f4b793912f35e9d72bd9d1e90553063fcbf1 https://git.kernel.org/stable/c/81e7e2e7ba07e7c8cdce43ccad2f91adbc5a919c https://git.kernel.org/stable/c/279c87ef7b9da34f65c2e4db586e730b667a6fb9 https://git.kernel.org/stable/c/8a6f89d42e61788605722dd9faf98797c958a7e5 https://git.kernel.org/stable/c/099b847ccc6c1ad2f805d13cfbcc83f5b6d4bc42