Executive brief
A vulnerability exists in the Linux kernel's ext4 file system, which is widely used for data storage on Linux-based servers and workstations. Under specific conditions involving memory pressure or disk errors, the system may attempt to access memory that has already been released. This can lead to system instability, data corruption, or potentially allow an attacker to gain elevated privileges on the system.
Technical details
A use-after-free (UAF) vulnerability exists in the ext4_split_extent_at() function within the Linux kernel's ext4 file system. The flaw is triggered when ext4_ext_insert_extent() fails due to memory allocation errors (-ENOMEM) or I/O errors (-EIO), causing the extent path to be freed and set to NULL. Subsequent code paths in ext4_split_extent_at() continue to access the freed 'path' pointer, specifically during calls to ext4_ext_dirty() or ext4_ext_show_leaf(). A local attacker could potentially exploit this to cause a kernel panic or achieve arbitrary code execution. The issue has been addressed by ensuring the path is updated via ext4_find_extent() before subsequent use.
Affected products
- Linux Linux Kernel 3.18 to 4.19.323, 4.20 to 5.4.290, 5.5 to 5.10.227, 5.11 to 5.15.168, 5.16 to 6.1.113, 6.2 to 6.6.55, 6.7 to 6.10.14, 6.11 to 6.11.3
Timeline
- 2024-08-22: patched: Initial patch authored by Baokun Li
- 2024-10-21: disclosed: CVE published in NVD
References
- https://git.kernel.org/stable/c/393a46f60ea4f249dc9d496d4eb2d542f5e11ade
- https://git.kernel.org/stable/c/448100a29395b0c8b4c42967155849fe0fbe808f
- https://git.kernel.org/stable/c/5d949ea75bb529ea6342e83465938a3b0ac51238
- https://git.kernel.org/stable/c/8fe117790b37c84c651e2bad9efc0e7fda73c0e3
- https://git.kernel.org/stable/c/915ac3630488af0ca194dc63b86d99802b4f6e18
- https://git.kernel.org/stable/c/a5401d4c3e2a3d25643c567d26e6de327774a2c9
- https://git.kernel.org/stable/c/c26ab35702f8cd0cdc78f96aa5856bfb77be798f