freebsd-dev/sbin/fsck_ffs
Ian Dowse 16241a05dd Fsck_ffs did not properly range-check the inode 'di_size'
field, so it was possible for a filesystem marked clean by fsck_ffs
to cause kernel crashes later when mounted. This could occur when
fsck_ffs was used to repair a badly corrupted filesystem.

As pointed out by bde, it is not sufficient to restrict di_size to
just the superblock fs_maxfilesize limit. The use of 32-bit logical
block numbers (both in fsck and the kernel) induces another file
size limit which is usually lower than fs_maxfilesize. Also, the
old 4.3BSD filesystem does not have fs_maxfilesize initialised.

Following this change, fsck_ffs will enforce exactly the same
file size limits as are used by the kernel.

PR:		kern/15065
Discussed with:	bde
Reviewed by:	bde, mckusick
2001-01-31 15:16:56 +00:00
..
SMM.doc Reviewed by: rwatson, bp 2000-10-09 08:26:35 +00:00
dir.c If the lost+found directory is created by fsck, it will do a cacheino() 2000-07-24 19:50:20 +00:00
fsck_ffs.8 Document fsck_ffs's new SIGINFO handler. 2001-01-03 13:53:48 +00:00
fsck.h Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
fsutil.c The ffs superblock includes a 128-byte region for use by temporary 2001-01-15 18:30:40 +00:00
inode.c Make a tighter test for valid inode numbers in getnextinode(). 2000-07-15 18:28:36 +00:00
main.c Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
Makefile Some missed magic in the fsck wrapper commit which is required by other 2000-10-09 09:21:04 +00:00
pass1.c Fsck_ffs did not properly range-check the inode 'di_size' 2001-01-31 15:16:56 +00:00
pass1b.c Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
pass2.c Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
pass3.c Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
pass4.c Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
pass5.c Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of 2000-12-15 14:23:55 +00:00
preen.c Reviewed by: rwatson, bp 2000-10-09 08:26:35 +00:00
setup.c Fsck_ffs did not properly range-check the inode 'di_size' 2001-01-31 15:16:56 +00:00
utilities.c Add a missing period and newline to a message. 2000-12-18 21:14:25 +00:00