The branch stable/13 has been updated by mckusick:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b51ac373dd38f776b90d69f56652c2a9a6f165f8

commit b51ac373dd38f776b90d69f56652c2a9a6f165f8
Author:     Kirk McKusick <[email protected]>
AuthorDate: 2023-05-26 21:37:23 +0000
Commit:     Kirk McKusick <[email protected]>
CommitDate: 2023-05-26 21:37:23 +0000

    Updates to UFS/FFS superblock integrity checks when reading a superblock.
    
    Reinstall MFC commit 4660b60a00c as it has should now work correctly
    with fix for CGSIZE macro in MFC 4a3834e31fd.
---
 sys/ufs/ffs/ffs_subr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c
index 1bd298315dd9..4ba452b05ec9 100644
--- a/sys/ufs/ffs/ffs_subr.c
+++ b/sys/ufs/ffs/ffs_subr.c
@@ -449,6 +449,7 @@ validate_sblock(struct fs *fs, int isaltsblk)
        CHK(fs->fs_old_cgoffset, <, 0, %jd);
        CHK2(fs->fs_old_cgoffset, >, 0, ~fs->fs_old_cgmask, <, 0, %jd);
        CHK(fs->fs_old_cgoffset * (~fs->fs_old_cgmask), >, fs->fs_fpg, %jd);
+       CHK(CGSIZE(fs), >, fs->fs_bsize, %jd);
        /*
         * If anything has failed up to this point, it is usafe to proceed
         * as checks below may divide by zero or make other fatal calculations.

Reply via email to