From: Cen Zhang <zzzccc427@gmail.com>
To: Joseph Qi <joseph.qi@linux.alibaba.com>,
Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>
Cc: ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
zzzccc427@gmail.com
Subject: [PATCH v5 0/2] ocfs2: validate xattr entry bounds
Date: Thu, 25 Jun 2026 17:00:58 +0800 [thread overview]
Message-ID: <20260625090100.202881-1-zzzccc427@gmail.com> (raw)
In-Reply-To: <20260622130332.2094018-1-zzzccc427@gmail.com>
Hi,
This series validates OCFS2 xattr entry name/value bounds when xattr
metadata is read and validated, before getxattr() or listxattr() can
walk out-of-range entry arrays or offsets from corrupted metadata.
Patch 1 validates inline xattrs from ocfs2_validate_inode_block().
Patch 2 reuses the same entry validator for non-indexed xattr blocks
and indexed xattr buckets.
Changes since v4:
- Replace the descriptive string argument with enum
ocfs2_xattr_entry_type.
- Drop the new per-operation full inline-xattr re-check; operation
paths keep their existing ibody header/count lookup, and full
entry bounds validation now runs at inode block read time.
- Simplify corruption messages to rely on the corrupt block number
instead of also naming the xattr storage kind.
Cen Zhang (2):
ocfs2: validate inline xattrs during inode block validation
ocfs2: validate external xattr entries when reading metadata
fs/ocfs2/inode.c | 4 +
fs/ocfs2/xattr.c | 194 +++++++++++++++++++++++++++++++++++++++++++----
fs/ocfs2/xattr.h | 2 +
3 files changed, 187 insertions(+), 13 deletions(-)
--
2.43.0
next prev parent reply other threads:[~2026-06-25 9:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 13:03 [PATCH v4 0/2] ocfs2: validate xattr metadata bounds Cen Zhang
2026-06-22 13:03 ` [PATCH v4 1/2] ocfs2: validate inline xattrs during inode block validation Cen Zhang
2026-06-23 8:57 ` Joseph Qi
2026-06-24 10:25 ` Cen Zhang
2026-06-22 13:03 ` [PATCH v4 2/2] ocfs2: validate external xattr entries when reading metadata Cen Zhang
2026-06-25 9:00 ` Cen Zhang [this message]
2026-06-25 9:00 ` [PATCH v5 1/2] ocfs2: validate inline xattrs during inode block validation Cen Zhang
2026-06-25 9:01 ` [PATCH v5 2/2] ocfs2: validate external xattr entries when reading metadata Cen Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260625090100.202881-1-zzzccc427@gmail.com \
--to=zzzccc427@gmail.com \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®