[Bug 218592] [patch] fsck_ffs(8): incorrect bounds check in preen mode when softdep is enabled
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Apr 12 15:20:44 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218592
Bug ID: 218592
Summary: [patch] fsck_ffs(8): incorrect bounds check in preen
mode when softdep is enabled
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Some People
Priority: ---
Component: misc
Assignee: freebsd-bugs at FreeBSD.org
Reporter: todd.miller at courtesan.com
Keywords: patch
Created attachment 181719
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=181719&action=edit
Prevent inosused from wrapping
The loop that scans the used inode map when soft updates is in use assumes that
the inosused variable is signed. However, ino_t is unsigned, so the loop
invariant is incorrect and the check for inosused wrapping to < 0 can never be
true.
Instead of checking for wrap after the fact it is possible to just prevent it
from happening in the first place, which the attached patch does. I've just
committed a similar fix to OpenBSD.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list