]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
mke2fs: Avoid crashes / infinite loops for absurdly large devices
authorJan Kara <jack@suse.cz>
Tue, 25 Oct 2016 18:08:59 +0000 (14:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 25 Oct 2016 18:08:59 +0000 (14:08 -0400)
commit101ef2e93c253ae62320628e8958067d2d2a4e2a
tree02a6421a6f04baf926cd22d3a24668b2d709dfb2
parent79fa861670a437ec813317afd150750e961d3c5f
mke2fs: Avoid crashes / infinite loops for absurdly large devices

When a device reports absurdly high size, some arithmetics in mke2fs can
overflow (e.g. number of block descriptors) and we end in an infinite
loop. Fix that by checking and refusing insanely large devices.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c