From owner-cvs-all Wed Jan 31 7:17:19 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8516337B4EC; Wed, 31 Jan 2001 07:16:57 -0800 (PST) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0VFGvj80532; Wed, 31 Jan 2001 07:16:57 -0800 (PST) (envelope-from iedowse) Message-Id: <200101311516.f0VFGvj80532@freefall.freebsd.org> From: Ian Dowse Date: Wed, 31 Jan 2001 07:16:57 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/fsck_ffs pass1.c setup.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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