linux/fs/squashfs
Phillip Lougher 44cff8a9ee Squashfs: handle corruption of directory structure
Handle the rare case where a directory metadata block is uncompressed and
corrupted, leading to a kernel oops in directory scanning (memcpy).
Normally corruption is detected at the decompression stage and dealt with
then, however, this will not happen if:

- metadata isn't compressed (users can optionally request no metadata
  compression), or
- the compressed metadata block was larger than the original, in which
  case the uncompressed version was used, or
- the data was corrupt after decompression

This patch fixes this by adding some sanity checks against known maximum
values.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2011-03-16 01:04:18 +00:00
..
block.c squashfs: fix use of uninitialised variable in zlib & xz decompressors 2011-01-26 10:50:05 +10:00
cache.c Squashfs: move squashfs_i() definition from squashfs.h 2011-01-13 21:24:15 +00:00
decompressor.c Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00
decompressor.h Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00
dir.c Squashfs: handle corruption of directory structure 2011-03-16 01:04:18 +00:00
export.c Squashfs: factor out remaining zlib dependencies into separate wrapper file 2010-01-20 21:47:47 +00:00
file.c Squashfs: factor out remaining zlib dependencies into separate wrapper file 2010-01-20 21:47:47 +00:00
fragment.c Squashfs: move squashfs_i() definition from squashfs.h 2011-01-13 21:24:15 +00:00
id.c Squashfs: move squashfs_i() definition from squashfs.h 2011-01-13 21:24:15 +00:00
inode.c squashfs: add xattr support configure option 2010-05-17 19:54:07 +01:00
Kconfig Squashfs: Update Kconfig help text to include xz compression 2011-02-28 18:35:28 +00:00
lzo_wrapper.c Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00
Makefile Squashfs: Add XZ compression configuration option 2011-01-13 21:16:52 +00:00
namei.c Squashfs: handle corruption of directory structure 2011-03-16 01:04:18 +00:00
squashfs_fs_i.h Squashfs: move squashfs_i() definition from squashfs.h 2011-01-13 21:24:15 +00:00
squashfs_fs_sb.h squashfs: add xattr id support 2010-05-17 19:54:05 +01:00
squashfs_fs.h Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00
squashfs.h Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00
super.c Squashfs: wrap squashfs_mount() definition 2011-02-28 18:43:48 +00:00
symlink.c squashfs: add xattr support configure option 2010-05-17 19:54:07 +01:00
xattr_id.c Squashfs: move squashfs_i() definition from squashfs.h 2011-01-13 21:24:15 +00:00
xattr.c Squashfs: fix use of __le64 annotated variable 2010-10-28 17:44:11 +01:00
xattr.h Squashfs: fix function prototype 2010-10-28 17:44:19 +01:00
xz_wrapper.c Squashfs: xz_wrapper doesn't need to include squashfs_fs_i.h anymore 2011-02-28 18:35:44 +00:00
zlib_wrapper.c Squashfs: extend decompressor framework to handle compression options 2011-02-28 18:21:59 +00:00