Whamcloud - gitweb
libext2fs: teach ext2fs_open() to reject file systems with an invalid cluster size
authorTheodore Ts'o <tytso@mit.edu>
Sat, 6 Aug 2022 05:37:20 +0000 (01:37 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 6 Aug 2022 06:16:47 +0000 (02:16 -0400)
commit2a2b9ceb99c226952a96abbcfb95b2540f8b7ecd
treed8e69a74e160a16087d67e18bc505d5c28c20097
parent0288b1fd6909e92e3668dde8f1f6401fdabd1494
libext2fs: teach ext2fs_open() to reject file systems with an invalid cluster size

If the cluster size is smaller than the block size, this can result in
a negative shift, which is undefined.  When such a file system is
opened, immediately return an error indicating that the file system is
corrupted.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/openfs.c