[PATCH 5.10/5.15 v2 0/4] ocfs2: backport dinode slot validation fixes

From: Mikhail Dmitrichenko

Date: Mon Nov 23 2026 - 09:02:35 EST


Both orphan-slot fields are read from disk and later used to index
per-slot arrays. Backport the upstream validation fixes for
CVE-2026-90205 and CVE-2026-90204 to 5.10.y and 5.15.y, together with
the suballoc-slot check and its follow-up correction.

Patch 1 provides the suballoc-slot validation that the orphan-slot
commits expect. Patch 2 completes that check: OCFS2_INVALID_SLOT is
valid only for system inodes, and a mismatch between the on-disk system
flag and the requested inode type must report corruption rather than
BUG(). Patch 2 is included to avoid leaving the earlier check
incomplete; the orphan-slot commits can be cherry-picked without it.

Patch 1 carries Stable-dep-of tags for patches 2 and 3. Patch 3 carries
Stable-dep-of for patch 4, which does not cherry-pick cleanly without the
ordinary orphan-slot check. Patch 2 retains its upstream Fixes tag.

The series applies to v5.10.275 and v5.15.226. Patch 1 needs a context
adjustment because the target branches already have other dinode
validation checks: retain them and insert the suballoc-slot check before
i_mode validation. Its added code is unchanged from upstream.
Patches 2-4 cherry-pick without conflicts or code changes after patch 1.

As of 23 November, these four commits are absent from 5.10.y and 5.15.y
and their stable queues. All four are present in the newer active
stable branches (6.1.y, 6.6.y, 6.12.y, 6.18.y and 7.3.y).

Changes in v2:
- Add fe7a283b3916 as a prerequisite and include its follow-up fix
25bf9e549360.
- Add Stable-dep-of tags for the dependencies described above.
- Resolve the patch 1 context conflict with the existing checks.
- Rebase and rebuild on v5.10.275 and v5.15.226.

v1: https://lore.kernel.org/all/20261106104249.1811-1-mdmitrichenko@xxxxxxxxxxxxx/

Dmitry Antipov (1):
ocfs2: add suballoc slot check in ocfs2_validate_inode_block()

Joseph Qi (1):
ocfs2: restrict OCFS2_INVALID_SLOT suballoc slot to system inodes

ZhengYuan Huang (2):
ocfs2: validate orphan slot during inode read
ocfs2: validate DIO orphan slot during inode read

fs/ocfs2/inode.c | 57 ++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 50 insertions(+), 7 deletions(-)