Executive brief
A vulnerability in the Linux kernel's ext4 filesystem could allow a local user to cause a system crash. The issue occurs when the filesystem encounters a specially crafted or corrupted directory structure that lacks essential internal references. This can lead to a denial-of-service condition, impacting the availability of the affected system.
Technical details
The vulnerability exists in the ext4 filesystem component of the Linux kernel, specifically within the directory block handling logic in fs/ext4/namei.c. A local attacker or a specially crafted filesystem image can define a non-inline directory where the first directory block (block 0) is a 'hole' (unallocated space). When the kernel attempts to add an entry or read this directory via ext4_read_dirblock(), it may fail to report an error for DIRENT types, leading to a directory state missing the '.' and '..' entries. Subsequent operations that rely on these entries, such as make_indexed_dir(), can trigger a kernel NULL pointer dereference or similar crash. The fix ensures that a hole in the first directory block is correctly identified as filesystem corruption.
Affected products
- Linux Linux Kernel 4.9.187 to 4.10, 4.14.135 to 4.15, 4.19.62 to 4.19.320, 5.2.4 to 5.4.282, 5.5 to 5.10.224, 5.11 to 5.15.165, 5.16 to 6.1.103, 6.2 to 6.6.44, 6.7 to 6.10.3
Timeline
- 2024-08-17: advisory: Initial disclosure and CVE assignment
- 2024-08-03: patched: Fixes merged into various stable branches
References
- https://git.kernel.org/stable/c/299bc6ffa57e04e74c6cce866d6c0741fb4897a1
- https://git.kernel.org/stable/c/9771e3d8365ae1dd5e8846a204cb9af14e3e656a
- https://git.kernel.org/stable/c/b609753cbbd38f8c0affd4956c0af178348523ac
- https://git.kernel.org/stable/c/c3893d9de8ee153baac56d127d844103488133b5
- https://git.kernel.org/stable/c/d81d7e347d1f1f48a5634607d39eb90c161c8afe
- https://git.kernel.org/stable/c/de2a011a13a46468a6e8259db58b1b62071fe136
- https://git.kernel.org/stable/c/e02f9941e8c011aa3eafa799def6a134ce06bcfa