mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 RESEND 0/2] xfs: fix out-of-range remote xattr value length
@ 2026-09-23 11:58 Aldo Ariel Panzardo
  2026-09-23 11:58 ` [PATCH v2 RESEND 1/2] xfs: reject out-of-range attribute value lengths in xfs_attr_copy_value Aldo Ariel Panzardo
  2026-09-23 11:58 ` [PATCH v2 RESEND 2/2] xfs: reject remote xattr entries with an out-of-range value length Aldo Ariel Panzardo
  0 siblings, 2 replies; 5+ messages in thread
From: Aldo Ariel Panzardo @ 2026-09-23 11:58 UTC (permalink / raw)
  To: linux-xfs, Carlos Maiolino
  Cc: Darrick J . Wong, linux-kernel, Aldo Ariel Panzardo

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-23 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 11:58 [PATCH v2 RESEND 0/2] xfs: fix out-of-range remote xattr value length Aldo Ariel Panzardo
2026-09-23 11:58 ` [PATCH v2 RESEND 1/2] xfs: reject out-of-range attribute value lengths in xfs_attr_copy_value Aldo Ariel Panzardo
2026-09-23 16:59   ` Darrick J. Wong
2026-09-23 11:58 ` [PATCH v2 RESEND 2/2] xfs: reject remote xattr entries with an out-of-range value length Aldo Ariel Panzardo
2026-09-23 16:57   ` Darrick J. Wong

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®