summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-12-02 10:57:43 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-12 17:45:13 -0800
commit7f8b718c58783f3ff0810b39e2f62f50ba2549f6 (patch)
tree4332e1de5c21cc08b30b32d4d2a1c18dee911a15 /fs/xfs
parentc004a793e0ec34047c3bd423bcd8966f5fac88dc (diff)
downloadlinux-stable-7f8b718c58783f3ff0810b39e2f62f50ba2549f6.tar.gz
linux-stable-7f8b718c58783f3ff0810b39e2f62f50ba2549f6.tar.bz2
linux-stable-7f8b718c58783f3ff0810b39e2f62f50ba2549f6.zip
xfs: return from xfs_symlink_verify early on V4 filesystems
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_symlink_remote.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c
index f228127a88ff..fb47a76ead18 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))