Check the minimum block size on v5 filesystems. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- libxfs/xfs_sb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index adc47e2..46e57aa 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -259,6 +259,13 @@ xfs_mount_validate_sb( return -EFSCORRUPTED; } + if (xfs_sb_version_hascrc(&mp->m_sb) && + unlikely( + sbp->sb_blocksize < XFS_MIN_CRC_BLOCKSIZE)) { + xfs_notice(mp, "v5 SB sanity check failed"); + return -EFSCORRUPTED; + } + /* * Currently only very few inode sizes are supported. */ -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html