]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.
authorKirk McKusick <mckusick@FreeBSD.org>
Sat, 27 May 2023 23:07:09 +0000 (16:07 -0700)
committerKirk McKusick <mckusick@FreeBSD.org>
Wed, 7 Jun 2023 22:44:12 +0000 (15:44 -0700)
commitfbfbd0638a5a3dd4f76eaf17f81450cc09d48e5b
treefa23c82b126b39ffe750d2f150497f8cdca293d1
parent52f50301aaabddc6e3c1bc8c354101cfd7ea0463
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

The last valid inode in the filesystem is maxino - 1, not maxino.
Thus validity checks should ino < maxino, not ino <= maxino.

Reported-by: Robert Morris
PR:           271312
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 11ce203e0535c1c8f520c9bda81ab9326cf5db80)
sbin/fsck_ffs/dir.c
sbin/fsck_ffs/fsutil.c
sbin/fsck_ffs/inode.c
sbin/fsck_ffs/pass2.c