[Bug 271312] inum > maxino should probably be inum >= maxino in fsck_ffs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 May 2023 23:08:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271312 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=11ce203e0535c1c8f520c9bda81ab9326cf5db80 commit 11ce203e0535c1c8f520c9bda81ab9326cf5db80 Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2023-05-27 23:07:09 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2023-05-27 23:07:09 +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 MFC-after: 1 week Sponsored-by: The FreeBSD Foundation 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.