freebsd-nq/sys/fs/ext2fs
Pedro F. Giffuni 771ec59bb7 ext2fs: Add some extra consistency checks for the superblock.
Maliciously formed, or badly corrupted, filesystems can cause kernel
panics.  In general, such acts of foot-shooting can only be accomplished
by root, but in a world with VM images that is  moving towards automated
mounts it is important to have some form of prevention.

Reported by: Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert
of Fraunhofer FKIE.
Incidentaly this should also fix a memory corruption issue reported by
Dr Silvio Cesare of InfoSect.

Huge thanks to all reseachers for making us aware of the issue.

admbug:		872, 891
Reviewed by:	fsu
Obtained from:	NetBSD (with minor changes)
MFC after:	3 days
2019-01-25 22:22:29 +00:00
..
ext2_acl.c
ext2_acl.h
ext2_alloc.c Change unused inodes counters behavior in the cylinder groups. 2018-08-21 18:39:29 +00:00
ext2_balloc.c
ext2_bmap.c Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
ext2_csum.c Fix directory blocks checksum updating logic. 2018-08-21 18:39:02 +00:00
ext2_dinode.h
ext2_dir.h Split the dir_index and dir_nlink features. 2018-08-08 12:08:46 +00:00
ext2_extattr.c
ext2_extattr.h
ext2_extents.c Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
ext2_extents.h Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
ext2_extern.h Fix directory blocks checksum updating logic. 2018-08-21 18:39:02 +00:00
ext2_hash.c Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
ext2_htree.c Fix directory blocks checksum updating logic. 2018-08-08 12:07:45 +00:00
ext2_inode_cnv.c Fix directory blocks checksumming. 2018-05-13 19:48:30 +00:00
ext2_inode.c Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
ext2_lookup.c Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
ext2_mount.h
ext2_subr.c Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
ext2_vfsops.c ext2fs: Add some extra consistency checks for the superblock. 2019-01-25 22:22:29 +00:00
ext2_vnops.c When loading an inode from disk, verify that its mode is valid. 2018-12-27 07:18:53 +00:00
ext2fs.h
fs.h Fix EXT2FS_DEBUG definition usage. 2018-05-13 19:19:10 +00:00
htree.h
inode.h