Add nid_namelen bounds check to nfssvc system call
commitf73a7179da3396b35ddef811a1d46d42a62596ee
authoremaste <emaste@FreeBSD.org>
Fri, 6 May 2016 21:19:28 +0000 (6 21:19 +0000)
committeremaste <emaste@FreeBSD.org>
Fri, 6 May 2016 21:19:28 +0000 (6 21:19 +0000)
tree8d81a1a39ca87f147a973d141934ecac50122f21
parent17e4d8bd453a78461460de07b72b68016b843cef
Add nid_namelen bounds check to nfssvc system call

This is only allowed by root and only used by the nfs daemon, which
should not provide an incorrect value. However, it's still good
practice to validate data provided by userland.

PR: 206626
Reported by: CTurt <cturt@hardenedbsd.org>
Reviewed by: rmacklem
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D6201
sys/fs/nfs/nfs_commonsubs.c