All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: cem@kernel.org, djwong@kernel.org
Cc: stable@vger.kernel.org, hch@lst.de, hch@lst.de,
	linux-xfs@vger.kernel.org
Subject: [PATCH 5/6] xfs: return from xfs_symlink_verify early on V4 filesystems
Date: Fri, 06 Dec 2024 16:32:09 -0800	[thread overview]
Message-ID: <173353139385.192136.1552414924467294012.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <173353139288.192136.15243674953215007178.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

V4 symlink blocks didn't have headers, so return early if this is a V4
filesystem.

Cc: <stable@vger.kernel.org> # v5.1
Fixes: 39708c20ab5133 ("xfs: miscellaneous verifier magic value fixups")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_symlink_remote.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c
index f228127a88ff26..fb47a76ead18c2 100644
--- a/fs/xfs/libxfs/xfs_symlink_remote.c
+++ b/fs/xfs/libxfs/xfs_symlink_remote.c
@@ -92,8 +92,10 @@ xfs_symlink_verify(
 	struct xfs_mount	*mp = bp->b_mount;
 	struct xfs_dsymlink_hdr	*dsl = bp->b_addr;
 
+	/* no verification of non-crc buffers */
 	if (!xfs_has_crc(mp))
-		return __this_address;
+		return NULL;
+
 	if (!xfs_verify_magic(bp, dsl->sl_magic))
 		return __this_address;
 	if (!uuid_equal(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid))


  parent reply	other threads:[~2024-12-07  0:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-07  0:29 [PATCHBOMB v3] xfs: proposed fixes for 6.13-rc2 Darrick J. Wong
2024-12-07  0:30 ` [PATCHSET v3] xfs: proposed bug fixes for 6.13 Darrick J. Wong
2024-12-07  0:31   ` [PATCH 1/6] xfs: don't move nondir/nonreg temporary repair files to the metadir namespace Darrick J. Wong
2024-12-07  0:31   ` [PATCH 2/6] xfs: don't crash on corrupt /quotas dirent Darrick J. Wong
2024-12-07  0:31   ` [PATCH 3/6] xfs: check pre-metadir fields correctly Darrick J. Wong
2024-12-07  0:31   ` [PATCH 4/6] xfs: fix zero byte checking in the superblock scrubber Darrick J. Wong
2024-12-07  0:32   ` Darrick J. Wong [this message]
2024-12-07  0:32   ` [PATCH 6/6] xfs: port xfs_ioc_start_commit to multigrain timestamps Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2024-12-11 20:07 [PATCHSET v4] xfs: bug fixes for 6.13 Darrick J. Wong
2024-12-11 20:08 ` [PATCH 5/6] xfs: return from xfs_symlink_verify early on V4 filesystems Darrick J. Wong
2024-12-04  3:02 [PATCHSET v2] xfs: proposed bug fixes for 6.13 Darrick J. Wong
2024-12-04  3:03 ` [PATCH 5/6] xfs: return from xfs_symlink_verify early on V4 filesystems Darrick J. Wong
2024-12-04  8:27   ` Christoph Hellwig

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=173353139385.192136.1552414924467294012.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.