[PATCH v2 0/2] ocfs2: validate xattr metadata bounds

Zhang Cen <[email protected]> Tue, 26 May 2026 11:40:38 +0800
Newsgroups dev.linux.lists.ocfs2-devel
Message-ID <[email protected]>
Hi,

This small series rejects corrupted OCFS2 xattr metadata before the
getxattr and listxattr paths walk filesystem-controlled inline, external
block, or indexed bucket storage.

Patch 1 validates the inline xattr header placement and entry count
before ocfs2_xattr_ibody_get() parses it. Patch 2 builds on that helper
and validates listxattr entry counts and name ranges against the storage
that backs each walk.

Both issues were reproduced with crafted OCFS2 images under KASAN.

v2:
- Resend as a proper two-patch series. The previous send was malformed
  by the transport and appeared as a single combined email.

Zhang Cen (2):
  ocfs2: validate inline xattr metadata in ocfs2_xattr_ibody_get
  ocfs2: validate listxattr entry bounds

 fs/ocfs2/xattr.c | 122 +++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 101 insertions(+), 21 deletions(-)

-- 
2.43.0