[Bug 271312] inum > maxino should probably be inum >= maxino in fsck_ffs

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 07 Jun 2023 23:16:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271312

--- Comment #3 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

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

commit fbfbd0638a5a3dd4f76eaf17f81450cc09d48e5b
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2023-05-27 23:07:09 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2023-06-07 22:44:12 +0000

    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    |  4 ++--
 sbin/fsck_ffs/fsutil.c |  2 +-
 sbin/fsck_ffs/inode.c  | 14 ++++++++------
 sbin/fsck_ffs/pass2.c  |  4 ++--
 4 files changed, 13 insertions(+), 11 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.