Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2017 15:20:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 218592] [patch] fsck_ffs(8): incorrect bounds check in preen mode when softdep is enabled
Message-ID:  <bug-218592-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

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.miller@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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218592-8>