linux/fs/squashfs
Phillip Lougher 4b0180a49f Squashfs: add mount time sanity check for block_size and block_log match
Squashfs currently has a sanity check for block_size less than or
equal to the maximum block_size (1 Mbyte).  This catches some
superblock corruption, but obviously with a block_size maximum
of 1 Mbyte there's 7 correct values (4K, 8K, 16K, 32K, ... etc) and
a lot of incorrect values which are not caught by this check.

The Squashfs superblock, however, has both a block_size and
a block_log (2^block_log == block_size).  Checking that the block_size
matches the block_log is a much more robust check.  Corruption of the
superblock is unlikely to produce values which match, and it also
ensures the block_size is an exact power of two.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2012-03-10 03:01:02 +00:00
..
block.c Squashfs: update comment removing reference to zlib only 2012-03-10 03:01:00 +00:00
cache.c Squashfs: optimise squashfs_cache_get entry search 2011-12-30 01:24:13 +00:00
decompressor.c Squashfs: Make ZLIB compression support optional 2011-07-22 03:01:28 +01:00
decompressor.h Squashfs: Make ZLIB compression support optional 2011-07-22 03:01:28 +01:00
dir.c Squashfs: fix f_pos check in get_dir_index_using_offset 2012-03-10 03:01:02 +00:00
export.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
file.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
fragment.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
id.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
inode.c Squashfs: fix i_blocks calculation with extended regular files 2012-01-03 04:00:43 +00:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next 2011-11-04 16:48:37 -07:00
lzo_wrapper.c Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00
Makefile Squashfs: Make ZLIB compression support optional 2011-07-22 03:01:28 +01:00
namei.c Squashfs: remove redundant length initialisation in squashfs_lookup 2012-03-10 03:01:01 +00:00
squashfs_fs_i.h Squashfs: update email address 2011-05-26 10:49:11 +01:00
squashfs_fs_sb.h Squashfs: optimise squashfs_cache_get entry search 2011-12-30 01:24:13 +00:00
squashfs_fs.h Squashfs: get rid of obsolete definitions in header file 2012-03-10 03:01:01 +00:00
squashfs.h Squashfs: Make ZLIB compression support optional 2011-07-22 03:01:28 +01:00
super.c Squashfs: add mount time sanity check for block_size and block_log match 2012-03-10 03:01:02 +00:00
symlink.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
xattr_id.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
xattr.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
xattr.h Squashfs: update email address 2011-05-26 10:49:11 +01:00
xz_wrapper.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
zlib_wrapper.c Squashfs: update email address 2011-05-26 10:49:11 +01:00