Executive brief
A vulnerability was identified in the Linux kernel's ext4 file system, which is responsible for managing how data is stored on many Linux-based computers and servers. An error in how the system tracks file attributes could allow a malicious actor to cause system instability or potentially gain unauthorized access to data. This issue primarily affects systems where an attacker can trick a user or process into interacting with a specially crafted file or disk image.
Technical details
A reference count underflow vulnerability exists in the ext4 file system within the 'ext4_xattr_inode_update_ref' function in 'fs/ext4/xattr.c'. The root cause is a failure to validate the EA inode reference count before decrementing it; if the count is already zero or negative, the operation proceeds, leading to an underflow and subsequent use of a bogus value. An attacker could exploit this by providing a corrupted filesystem image or manipulating extended attributes to trigger the underflow, potentially leading to a use-after-free or other memory corruption scenarios. The fix introduces explicit checks to treat non-positive refcounts as on-disk corruption (-EFSCORRUPTED) and prevents the underflow. Patches have been backported to various stable kernel branches including 5.4.y, 5.10.y, 5.15.y, 6.1.y, 6.6.y, and 6.12.y.
Affected products
- Linux Linux Kernel versions before 5.4.301, 5.10.246, 5.15.195, 6.1.157, 6.6.113, 6.12.54, 6.17.4
Timeline
- 2025-11-12: disclosed
- 2025-11-12: advisory
References
- https://git.kernel.org/stable/c/1cfb3e4ddbdc8e02e637b8852540bd4718bf4814
- https://git.kernel.org/stable/c/3d6269028246f4484bfed403c947a114bb583631
- https://git.kernel.org/stable/c/440b003f449a4ff2a00b08c8eab9ba5cd28f3943
- https://git.kernel.org/stable/c/505e69f76ac497e788f4ea0267826ec7266b40c8
- https://git.kernel.org/stable/c/57295e835408d8d425bef58da5253465db3d6888
- https://git.kernel.org/stable/c/6b879c4c6bbaab03c0ad2a983953bd1410bb165e
- https://git.kernel.org/stable/c/79ea7f3e11effe1bd9e753172981d9029133a278