Executive brief
A vulnerability exists in the Linux kernel's OCFS2 file system, which is used for managing shared storage in clustered environments. An attacker could use a specially crafted, malicious disk image to trigger a system crash or instability. This issue primarily affects the availability of the system rather than the confidentiality of user data.
Technical details
The vulnerability is located in the 'ocfs2_xattr_find_entry()' function within the OCFS2 file system implementation. It stems from a lack of strict bounds checking before performing a memory comparison (memcmp) on extended attributes (xattrs). Specifically, 'non-indexed' xattrs may be saved with additional space, and without proper validation, a crafted malicious filesystem image can cause the kernel to perform an out-of-bounds memory access. This can lead to a kernel panic or system crash. The fix introduces a check to ensure the memory offset and name length do not exceed the allocated buffer end before calling memcmp.
Affected products
- Linux Linux Kernel up to 4.19.323, 4.20 to 5.4.285, 5.5 to 5.10.227, 5.11 to 5.15.168, 5.16 to 6.1.112, 6.2 to 6.6.53, 6.7 to 6.10.12
Timeline
- 2024-05-20: other: Patch authored
- 2024-06-24: patched: Mainline patch committed
- 2024-07-29: disclosed: CVE published
References
- https://git.kernel.org/stable/c/57a3d89831fcaa2cdbe024b47c7c36d5a56c3637
- https://git.kernel.org/stable/c/af77c4fc1871847b528d58b7fdafb4aa1f6a9262
- https://git.kernel.org/stable/c/c031d286eceb82f72f8623b7f4abd2aa491bfb5e
- https://git.kernel.org/stable/c/c726dea9d0c806d64c26fcef483b1fb9474d8c5e
- https://git.kernel.org/stable/c/cfb926051fab19b10d1e65976211f364aa820180
- https://git.kernel.org/stable/c/e2b3d7a9d019d4d1a0da6c3ea64a1ff79c99c090
- https://git.kernel.org/stable/c/e4ffea01adf3323c821b6f37e9577d2d400adbaa