From 4763bc528ea62c67eec3c4061a9901246e7e9655 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 30 Jul 2001 20:01:59 +0000 Subject: Check the filehandle size when mounting. Obtained from: Constantine Sapuntzakis --- sys/nfsclient/nfs_vfsops.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/nfsclient') diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 706fd1f..bc6f3c0 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -804,6 +804,8 @@ nfs_mount(mp, path, data, ndp, p) nfs_decode_args(nmp, &args); return (0); } + if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX) + return (EINVAL); error = copyin((caddr_t)args.fh, (caddr_t)nfh, args.fhsize); if (error) return (error); -- cgit v1.1