linux/fs/bfs
Eric Sesterhenn e1f89ec95b bfs: add some basic sanity checks
bfs_fill_super() already touches all inodes, so we can easily add some
cheap sanity checks and check if the inode start and end blocks are
smaller than the maximum number of blocks, the inode start block lies
behind the end block or the file end offset is behind the end of the
filesystem.  Also check if the start of data offset in the super block
fits the filesystem.

The added sanity checks catch softlockup issues early when we try to
sb_bread() lots of blocks in a loop in bfs_readdir() and bfs_find_entry().
 In addition an oom issue in bfs_fill_super() is prevented by this when
s_start is corrupted, which influences imap_len and we try to allocate a
huge info->si_imap.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:31 -08:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bfs.h bfs: kill BKL 2008-07-26 12:00:03 -07:00
dir.c CRED: Wrap task credential accesses in the BFS filesystem 2008-11-14 10:38:47 +11:00
file.c bfs: kill BKL 2008-07-26 12:00:03 -07:00
inode.c bfs: add some basic sanity checks 2009-01-06 15:59:31 -08:00