From owner-cvs-all Thu Oct 31 14:36:27 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 225AE37B401; Thu, 31 Oct 2002 14:36:26 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBC5543E6E; Thu, 31 Oct 2002 14:36:25 -0800 (PST) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9VMZ4mV024525; Thu, 31 Oct 2002 14:35:04 -0800 (PST) (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9VMZ420024524; Thu, 31 Oct 2002 14:35:04 -0800 (PST) Message-Id: <200210312235.g9VMZ420024524@repoman.freebsd.org> From: Jeff Roberson Date: Thu, 31 Oct 2002 14:35:04 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/nfsserver nfs_serv.c nfs_srvsubs.c nfsm_subs.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jeff 2002/10/31 14:35:04 PST Modified files: sys/nfsserver nfs_serv.c nfs_srvsubs.c nfsm_subs.h Log: - Introduce a new macro, since that's what nfs loves, called nfsm_srvpathsiz. This macro plucks a length out of an rpc request and verifies that its size does not exceed NFS_MAXPATHLEN. If it does it generates an ENAMETOOLONG response. - Use this macro, and the existing nfsm_srvnamsiz macro in two places where we deal with paths passed in by the client. This fixes a linux interoperability bug. Linux was sending oversized path components which would cause us to ignore the request all together. This causes linux to hang indefinitly while it waits for a response. This could still happen in other cases where we error out with EBADRPC. Sponsored by: Isilon Systems, Inc. Reviewed by: alfred, fabbri@isilon.com, neal@isilon.com Revision Changes Path 1.125 +2 -2 src/sys/nfsserver/nfs_serv.c 1.118 +2 -2 src/sys/nfsserver/nfs_srvsubs.c 1.34 +12 -2 src/sys/nfsserver/nfsm_subs.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message