HomeFreeBSD

Fix off-by-one error in fsck_ffs(8) chkrange() block-number check.

Description

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

Details

Provenance
mckusickAuthored on May 9 2023, 8:08 PM
Parents
rG198558523361: ktls: re-work alloc thread
Branches
Unknown
Tags
Unknown