KernelScan.io

HIGH

ocfs2 InlineData OOB

CVE-2026-43075

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

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.

02

Engine v0.2.0

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.

Affectedfs/ocfs2/inode.c (ocfs2 filesystem)

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.

03

BranchFixed inPatch commit
5.105.10.25868f9cc3bbf2a
5.155.15.2092e6a254f9ced
6.16.1.17522df7d4de9c5
6.126.12.83947f953978b0
6.186.18.240c1af902223b
6.196.19.1469d3c69ade1e
6.66.6.136e2c9dc6b6e96
mainline7.07bc5da4842be