1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00
freebsd/sys/fs/nfsclient
Rick Macklem 026cdaa3b3 nfscl: Scan readdir reply filenames for invalid characters
The NFS RFCs are pretty loose with respect to what characters
can be in a filename returned by a Readdir.  However, FreeBSD,
as a POSIX system will not handle imbedded '/' or nul characters
in file names.  Also, for NFSv4, the file names "." and ".."
are handcrafted on the client and should not be returned by a
NFSv4 server.

This patch scans for the above in filenames returned by Readdir and
ignores any entry returned by Readdir which has them in it.
Because an imbedded nul would be a string terminator, it was
not possible to code this check efficiently using string(3)
functions.

Reported by:	Apple Security Engineering and Architecture (SEAR)
MFC after:	1 week
2024-07-21 15:56:16 -07:00
..
nfs_clbio.c Revert "nfscl: Do not do readahead for directories" 2024-05-26 08:02:30 -07:00
nfs_clcomsubs.c nfsclient: Propagate copyin() errors from nfsm_uiombuf() 2023-12-12 14:05:24 -05:00
nfs_clkdtrace.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
nfs_clkrpc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfs_clnfsiod.c nfscl: Clear out a lot of cruft related to B_DIRECT 2024-04-27 17:10:48 -07:00
nfs_clnode.c Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
nfs_clport.c nfsclient: eliminate ncl_writebp() 2024-01-05 06:58:18 +02:00
nfs_clrpcops.c nfscl: Scan readdir reply filenames for invalid characters 2024-07-21 15:56:16 -07:00
nfs_clstate.c nfscl: Add support for read delegations and atomic upgrade 2024-06-12 16:41:12 -07:00
nfs_clsubs.c nfscl: Add support for read delegations and atomic upgrade 2024-06-12 16:41:12 -07:00
nfs_clvfsops.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfs_clvnops.c nfscl: Add support for read delegations and atomic upgrade 2024-06-12 16:41:12 -07:00
nfs_kdtrace.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
nfs.h nfscl: Clear out a lot of cruft related to B_DIRECT 2024-04-27 17:10:48 -07:00
nfsmount.h nfscl: Revert part of commit 196787f79e 2024-04-25 12:32:02 -07:00
nfsnode.h nfscl: Clear out a lot of cruft related to B_DIRECT 2024-04-27 17:10:48 -07:00
nlminfo.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00