summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-07-30 20:01:59 +0000
committerpeter <peter@FreeBSD.org>2001-07-30 20:01:59 +0000
commit4763bc528ea62c67eec3c4061a9901246e7e9655 (patch)
treeda5c7ff1f8b96df60597620dea4899c781694eff /sys/nfs
parentf1723cd9eadfe2f1740877262d2d32694f7e959d (diff)
downloadFreeBSD-src-4763bc528ea62c67eec3c4061a9901246e7e9655.zip
FreeBSD-src-4763bc528ea62c67eec3c4061a9901246e7e9655.tar.gz
Check the filehandle size when mounting.
Obtained from: Constantine Sapuntzakis <csapuntz@openbsd.org>
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_vfsops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 706fd1f..bc6f3c0 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/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);
OpenPOWER on IntegriCloud