[Bug 249533] fsck_msdosfs: Integer overflow in checksize() for files close to 4GiB in size on 32-bit platform

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Sep 22 20:02:25 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249533

            Bug ID: 249533
           Summary: fsck_msdosfs: Integer overflow in checksize() for
                    files close to 4GiB in size on 32-bit platform
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: delphij at FreeBSD.org

Reference:
https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/1428461

In checksize(), the physicalSize is represented in size_t, which is 32-bit on
32-bit platforms.  When the file size is within (4GiB-cluster size..4GiB)
range, the count of cluster * cluster size would be exactly 4 GiB, which will
wrap to 0 and cause the file to be errornously truncated.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list