From owner-cvs-all Sat Feb 3 17:52:31 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 0A05B37B503; Sat, 3 Feb 2001 17:52:12 -0800 (PST) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f141qB433351; Sat, 3 Feb 2001 17:52:11 -0800 (PST) (envelope-from iedowse) Message-Id: <200102040152.f141qB433351@freefall.freebsd.org> From: Ian Dowse Date: Sat, 3 Feb 2001 17:52:11 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ufs/ufs ufs_lookup.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG iedowse 2001/02/03 17:52:11 PST Modified files: sys/ufs/ufs ufs_lookup.c Log: Extend the sanity checks in ufs_lookup to ensure that each directory entry fits within its DIRBLKSIZ block. The surrounding code is extremely fragile with respect to corruption of the directory entry 'd_reclen' field; if directory corruption occurs, it can blindly scan forward beyond the end of the filesystem block. Usually this results in a 'fault on nofault entry' panic. Directory corruption is now much more likely to be detected, resulting in a 'ufs_dirbad' panic. If the filesystem is read-only, it will simply print a warning message, and skip the corrupted block. Reviewed by: mckusick Revision Changes Path 1.45 +3 -2 src/sys/ufs/ufs/ufs_lookup.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message