[Bug 4730] New: Integer overflow in util-linux/mkfs-minix.c
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jan 24 01:02:44 UTC 2012
https://bugs.busybox.net/show_bug.cgi?id=4730
Summary: Integer overflow in util-linux/mkfs-minix.c
Product: Busybox
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at busybox.net
ReportedBy: abhijithoskeri at gmail.com
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
There is an integer overflow in get_size() function for block devices greater
than 4G in size, which results in failure to create the minix filesystem.
This failure happens only for block devices, which go down the BLKGETSIZE path,
and not for normal files.
Eg.,
$ stat /tmp/a
File: `/tmp/a'
Size: 4294967297 Blocks: 1408 IO Block: 4096 regular file
Device: 801h/2049d Inode: 213866 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ abhijit) Gid: ( 1000/ abhijit)
Access: 2012-01-23 13:56:34.000000000 -0800
Modify: 2012-01-23 13:56:26.000000000 -0800
Change: 2012-01-23 13:56:26.000000000 -0800
$ busybox mkfs.minix /tmp/a
21856 inodes
65535 blocks
Firstdatazone=696 (696)
Zonesize=1024
Maxsize=268966912
$ sudo losetup -a
/dev/loop0: [0801]:213866 (/tmp/a)
$ sudo busybox mkfs.minix /dev/loop0
mkfs.minix: must have at least 10 blocks
This is on a 32bit linux system, with busybox built from latest git.
This problem can be worked around by passing the size in kbytes from the
command line.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list