From: Darrick J. Wong <djwong@xxxxxxxxxx> commit 7f8b718c58783f3ff0810b39e2f62f50ba2549f6 upstream. V4 symlink blocks didn't have headers, so return early if this is a V4 filesystem. Cc: <stable@xxxxxxxxxxxxxxx> # v5.1 Fixes: 39708c20ab5133 ("xfs: miscellaneous verifier magic value fixups") Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/xfs/libxfs/xfs_symlink_remote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/xfs/libxfs/xfs_symlink_remote.c +++ b/fs/xfs/libxfs/xfs_symlink_remote.c @@ -89,8 +89,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)) Patches currently in stable-queue which might be from djwong@xxxxxxxxxx are queue-5.15/xfs-don-t-drop-errno-values-when-we-fail-to-ficlone-the-entire-range.patch queue-5.15/xfs-fix-scrub-tracepoints-when-inode-rooted-btrees-are-involved.patch queue-5.15/xfs-update-btree-keys-correctly-when-_insrec-splits-an-inode-root-block.patch queue-5.15/xfs-return-from-xfs_symlink_verify-early-on-v4-filesystems.patch