HIGH
ocfs2 InlineData OOB
CVE-2026-43075
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix out-of-bounds write in ocfs2_write_end_inline KASAN reports a use-after-free write of 4086 bytes in ocfs2_write_end_inline, called from ocfs2_write_end_nolock during a copy_file_range splice fallback on a corrupted ocfs2 filesystem mounted on a loop device. The actual bug is an out-of-bounds write past the inode block buffer, not a true use-after-free. The write overflows into an adjacent freed page, which KASAN reports as UAF. The root cause is that ocfs2_try_to_write_inline_data trusts the on-disk id_count field to determine whether a write fits in inline data. On a corrupted filesystem, id_count can exceed the physical maximum inline data capacity, causing writes to overflow the inode block buffer. Call trace (crash path): vfs_copy_file_range (fs/read_write.c:1634) do_splice_direct splice_direct_to_actor iter_file_splice_write ocfs2_file_write_iter generic_perform_write ocfs2_write_end ocfs2_write_end_nolock (fs/ocfs2/aops.c:1949) ocfs2_write_end_inline (fs/ocfs2/aops.c:1915) memcpy_from_folio <-- KASAN: write OOB So add id_count upper bound check in ocfs2_validate_inode_block() to alongside the existing i_size check to fix it.
02KernelScan AI Analysis
Risk summary
Local attackers with access to a corrupted OCFS2 filesystem can trigger an out-of-bounds write in kernel memory during inline data write operations. This can lead to kernel memory corruption, privilege escalation, or system crashes on systems with OCFS2 support enabled.
Vulnerability analysis
The vulnerability occurs because ocfs2_try_to_write_inline_data trusts the on-disk id_count field without sufficient validation. On a corrupted filesystem, id_count can exceed the physical maximum inline data capacity, causing ocfs2_write_end_inline to perform a memcpy_from_folio that writes past the inode block buffer boundary into adjacent kernel memory. The fix adds an upper-bound check in ocfs2_validate_inode_block() to ensure id_count does not exceed ocfs2_max_inline_data_with_xattr(). The attack surface is local: an attacker must supply or access a corrupted OCFS2 image and perform file operations (e.g., copy_file_range via splice) that exercise the inline data write path.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.10 | 5.10.258 | 68f9cc3bbf2a |
| 5.15 | 5.15.209 | 2e6a254f9ced |
| 6.1 | 6.1.175 | 22df7d4de9c5 |
| 6.12 | 6.12.83 | 947f953978b0 |
| 6.18 | 6.18.24 | 0c1af902223b |
| 6.19 | 6.19.14 | 69d3c69ade1e |
| 6.6 | 6.6.136 | e2c9dc6b6e96 |
| mainline | 7.0 | 7bc5da4842be |