]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix off-by-one error in fsck_ffs(8) chkrange() block-number check.
authorKirk McKusick <mckusick@FreeBSD.org>
Tue, 9 May 2023 20:08:10 +0000 (13:08 -0700)
committerKirk McKusick <mckusick@FreeBSD.org>
Tue, 9 May 2023 20:08:10 +0000 (13:08 -0700)
commitb3fe5d932264445cbf9a1c4eab01afb6179b499b
treefe1d8350e90d73974e093cdd16bb0400c2eb2aa6
parent198558523361a654409b6d3f8d63c12ba3f72ae5
Fix off-by-one error in fsck_ffs(8) chkrange() block-number check.

On an amd64-CURRENT machine with an i-node that refers to a block
number that is one too large will cause a core dump, due to writing
beyond the end of blockmap[] and corrupting the next heap block,
which happens to contain a struct inoinfo in inphash[]. Note that
valgrind catches the blockmap[] access.

Reported by:  Robert Morris
PR:           271289
MFC after:    1 week
Sponsored by: The FreeBSD Foundation
sbin/fsck_ffs/inode.c