From: Aldo Ariel Panzardo <qwe.aldo@gmail.com>
To: linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>
Cc: "Darrick J . Wong" <djwong@kernel.org>,
linux-kernel@vger.kernel.org,
Aldo Ariel Panzardo <qwe.aldo@gmail.com>
Subject: [PATCH v2 0/2] xfs: fix out-of-range remote xattr value length
Date: Tue, 7 Jul 2026 16:00:36 -0300 [thread overview]
Message-ID: <20260707190038.3811440-1-qwe.aldo@gmail.com> (raw)
In-Reply-To: <20260707140118.3217585-1-qwe.aldo@gmail.com>
v1 tightened only the read-time leaf verifier. Darrick pointed out that
the underlying problem is the signed value-length check in the consumer,
xfs_attr_copy_value(): a remote value length is an on-disk __be32 that is
stored into the signed args->rmtvaluelen, so a crafted length such as
0x80000000 becomes negative and slips past the "buffer too small"
-ERANGE guard, and is then used as a copy length.
v2 fixes both ends:
1/2 rejects a negative or oversized value length in
xfs_attr_copy_value() before it is used, so a bogus length cannot
become a copy length even if it reaches the value copier.
2/2 is the v1 verifier fix, rejecting the malformed remote entry at
read time.
Both are bug fixes and are now cc'd to stable.
v2:
- 1/2 is new: fix the signed value-length check in xfs_attr_copy_value
(the consumer / root cause), per Darrick's review.
- 2/2: cc stable; otherwise unchanged from the v1 verifier patch.
v1: https://lore.kernel.org/linux-xfs/20260707140118.3217585-1-qwe.aldo@gmail.com/
Aldo Ariel Panzardo (2):
xfs: reject out-of-range attribute value lengths in
xfs_attr_copy_value
xfs: reject remote xattr entries with an out-of-range value length
fs/xfs/libxfs/xfs_attr_leaf.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--
2.53.0
next prev parent reply other threads:[~2026-07-07 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 14:01 [PATCH] xfs: reject remote xattr entries with an out-of-range " Aldo Ariel Panzardo
2026-07-07 16:36 ` Darrick J. Wong
2026-07-07 19:00 ` Aldo Ariel Panzardo [this message]
2026-07-07 19:00 ` [PATCH v2 1/2] xfs: reject out-of-range attribute value lengths in xfs_attr_copy_value Aldo Ariel Panzardo
2026-07-07 19:00 ` [PATCH v2 2/2] xfs: reject remote xattr entries with an out-of-range value length Aldo Ariel Panzardo
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=20260707190038.3811440-1-qwe.aldo@gmail.com \
--to=qwe.aldo@gmail.com \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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