Date: Wed, 31 Jan 2001 07:16:57 -0800 (PST) From: Ian Dowse <iedowse@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/fsck_ffs pass1.c setup.c Message-ID: <200101311516.f0VFGvj80532@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
iedowse 2001/01/31 07:16:57 PST
Modified files:
sbin/fsck_ffs pass1.c setup.c
Log:
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
Revision Changes Path
1.21 +7 -4 src/sbin/fsck_ffs/pass1.c
1.20 +3 -1 src/sbin/fsck_ffs/setup.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101311516.f0VFGvj80532>
