freebsd-nq/sys/fs
Rick Macklem 82164bdd76 Add a sanity check for nes_numsecflavor to the NFS server.
Ryan Moeller reported crashes in the NFS server that appear to be
caused by stack corruption in nfsrv_compound(). It appears that
the stack got corrupted just after a NFSv4.1 Lookup that crosses
a server mount point.
Although it is just a "theory" at this point, the most obvious way
the stack could get corrupted would be if nfsvno_checkexp() somehow
acquires an export with a bogus nes_numsecflavor value. This would
cause the copying of the secflavors to run off the end of the array,
which is allocated on the stack below where the corruption occurs.

This sanity check is simple to do and would stop the stack corruption
if the theory is correct. Otherwise, doing the sanity check seems to
be a reasonable safety belt to add to the code.

Reported by:	freqlabs
MFC after:	2 weeks
2020-04-17 02:21:46 +00:00
..
autofs Make autofs(5) timeout messages include affected process name and PID. 2020-03-16 16:17:58 +00:00
cd9660 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
cuse Fine grain locking inside the cuse(3) kernel module. 2020-03-30 18:25:43 +00:00
deadfs vfs: flatten vop vectors 2019-12-16 00:06:22 +00:00
devfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ext2fs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
fdescfs vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
fifofs Preallocate pipe buffers on pipe creation. 2020-03-09 21:55:26 +00:00
fuse fusefs: add a dtrace probe that fires after mounting is complete 2020-03-30 14:03:35 +00:00
mntfs Add a new "mntfs" pseudo file system which provides private device vnodes for 2020-03-06 18:41:37 +00:00
msdosfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Delete the mbuf macros that were used for the Mac OS/X port. 2020-04-13 00:07:37 +00:00
nfsclient Fix the NFSv4.2 extended attribute support for remove extended attrbute. 2020-04-15 21:27:52 +00:00
nfsserver Add a sanity check for nes_numsecflavor to the NFS server. 2020-04-17 02:21:46 +00:00
nullfs nullfs: don't pre lock exclusive in nullfs_root 2020-03-04 19:52:00 +00:00
procfs Retire procfs-based process debugging. 2020-04-01 19:22:09 +00:00
pseudofs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (10 of many) 2020-02-24 10:37:56 +00:00
smbfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tmpfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
udf vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
unionfs vfs: provide F_ISUNIONSTACK as a kludge for libc 2020-01-17 14:42:25 +00:00