bin/67982: integer overflow in statfs structure

Klaus Steden klaus at compt.com
Tue Jun 15 18:10:44 GMT 2004


>Number:         67982
>Category:       bin
>Synopsis:       integer overflow in statfs structure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 15 18:10:16 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Klaus Steden
>Release:        4.9-STABLE
>Organization:
>Environment:
FreeBSD kubrick.compt.com 4.9-STABLE FreeBSD 4.9-STABLE #0: Tue Nov 25 18:16:15 EST 2003     klaus at kubrick.compt.com:/usr/obj/usr/src/sys/Manhattan  i386

>Description:
One of my NFS-mounted volumes is quite large (about 1.1 TB, or 2291609600 blocks to be precise); df incorrectly reports the size as a negative value:

@kubrick:~[285]$ df -h /helios
Filesystem      Size   Used  Avail Capacity  Mounted on
atlas:/helios -955.3G   840G   252G   -88%    /helios

I compiled df from source with debugging symbols and ran it through gdb, and it appears that the f_blocks member in the statfs structure used by statfs() is simply not big enough to hold the value returned.
>How-To-Repeat:
Can be repeated by using df, and presumably also by any program that uses a statfs structure on a large filesystem.
>Fix:
Increase the size of the f_blocks parameter (and possibly others) to something larger.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list