e2fsprogs/lib/ext2fs
Thiemo Nagel 79a9ab1454 ext2fs_open2: Add more checks for filesystem consistency
Add more checks to assure the filesystem is sane to avoid later
division by zero errors.

Patch adds consistency checks on superblock to fix serveral crashes:
* require EXT2_INODES_PER_GROUP != 0
* require EXT2_DESC_PER_BLOCK != 0
* require s_first_data_block < s_blocks_count
* require group_desc_count * EXT2_INODES_PER_GROUP == s_inodes_count

Signed-off-by: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-19 23:16:10 -05:00
..
tdb Update to latest samba tdb library before LGPLv3 change 2008-02-17 17:35:54 -05:00
Makefile.in Update Makefile depend information for crc16.o 2008-10-02 08:59:09 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
alloc.c Fix various signed/unsigned gcc warnings 2008-11-16 10:06:59 -05:00
alloc_sb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
alloc_stats.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
alloc_tables.c Fix various signed/unsigned gcc warnings 2008-11-16 10:06:59 -05:00
badblocks.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
bb_compat.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
bb_inode.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
bitmaps.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
bitops.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
bitops.h libext2fs: Compile ext2fs_swab64() for all platforms 2008-09-02 08:49:10 -04:00
block.c ext2fs_block_iterate2: Preserve the uninit flag in extents 2009-01-19 19:30:59 -05:00
bmap.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
bmove.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
brel.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
brel_ma.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
check_desc.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
closefs.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
crc16.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
crc16.h Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
csum.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
dblist.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dblist_dir.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dir_iterate.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dirblock.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dirhash.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dosio.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dosio.h Many files: 1997-08-11 20:29:22 +00:00
dupfs.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
e2image.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
expanddir.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ext2_err.et.in Improve future compatibility for the 64-bit I/O channel functions 2008-08-27 21:46:26 -04:00
ext2_ext_attr.h Fix gcc -Wall complaints in libext2fs 2006-11-14 23:14:12 -05:00
ext2_fs.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ext2_io.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ext2_types.h.in Fix ext2fs_swap{16,32,64} for external applications on big-endian machines 2008-06-07 08:55:21 -04:00
ext2fs.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ext2fs.pc.in Fix pkg-config files: use Requires.private and fix the include directory 2008-09-02 21:20:44 -04:00
ext2fsP.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ext3_extents.h Remove vararg macro which causes portability problems from ext3_extent.h 2008-07-13 16:06:57 -04:00
ext_attr.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
extent.c e2fsck: Fix an unhandled corruption case in scan_extent_node() 2008-12-25 22:42:38 -05:00
extent_dbg.ct libext2fs: add new function ext2fs_extent_set_bmap() 2008-06-02 18:52:05 -04:00
fileio.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
finddev.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
flushb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
freefs.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
gen_bitmap.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
get_pathname.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
getsectsize.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
getsize.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
i_block.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
icount.c libext2fs: Make icount use a 32-bit counter 2008-03-15 01:39:19 -04:00
imager.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ind_block.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
initialize.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
inline.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
inode.c ext2fs_read_inode_full: Add safety check to avoid SEGV's on corrupted fs's 2009-01-19 23:09:37 -05:00
inode_io.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
io_manager.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
irel.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
irel_ma.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
ismounted.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
jfs_compat.h e2fsck: Add support to check journal checksums 2008-06-06 23:38:38 -04:00
jfs_dat.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
jfs_user.h Move linux/jbd.h to ext2fs/kernel-jbd.h, to avoid using the 2001-12-23 19:33:51 -05:00
kernel-jbd.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
kernel-list.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
link.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
llseek.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
lookup.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
mkdir.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
mkjournal.c Further optimize journal placement for flex_bg filesystems 2008-08-28 10:20:43 -04:00
namei.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
native.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
newdir.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
nt_io.c Many files: 2001-05-14 11:35:52 +00:00
openfs.c ext2fs_open2: Add more checks for filesystem consistency 2009-01-19 23:16:10 -05:00
read_bb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
read_bb_file.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
res_gdt.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
rw_bitmaps.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
sparse.c Add support for on-line resizing ala the resize inode. This patch 2004-12-15 14:39:16 -05:00
swapfs.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tdb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tdb.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tdbtool.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
test_io.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_badblocks.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_bitops.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_byteswap.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_csum.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
tst_getsectsize.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_getsize.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_iscan.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_super_size.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
tst_types.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
undo_io.c Fix gcc -Wall warnings in libext2fs 2008-06-07 11:53:56 -04:00
unix_io.c unix_io: check for read-only devices when opening R/W 2008-10-12 23:12:22 -04:00
unlink.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
valid_blk.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
version.c Stop after the second '.' when parsing version numbers 2007-07-08 12:37:13 -04:00
write_bb_file.c Fix signed vs unsigned printf format strings for block and inode numbers 2006-09-12 14:56:15 -04:00