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@FreeBSD.org
          Reporter: todd.mil...@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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to