opnsense-src/sys/fs
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
..
autofs Reduce reliance on sys/sysproto.h pollution 2024-04-15 21:35:40 +01:00
cd9660 cd9660: Add support for mask,dirmask,uid,gid options 2024-01-12 14:51:31 -08:00
cuse sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
deadfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
devfs devfs_allocv(): style 2024-05-12 04:13:00 +03:00
ext2fs ext4_ext_tree_init: correct memset initialization 2024-06-25 10:41:11 -07:00
fdescfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fifofs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fuse fusefs: fix two bugs regarding _PC_MIN_HOLE_SIZE 2024-06-24 10:02:02 -06:00
mntfs sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
msdosfs fs/msdosfs fatblock: use ulmin() rather than min() 2024-02-23 19:37:52 +02:00
nfs nfsd: Fix nfsrv_cleanclient so that it can be called with a mutex 2024-06-21 15:08:48 -07:00
nfsclient nfscl: Scan readdir reply filenames for invalid characters 2024-07-21 15:56:16 -07:00
nfsserver nfsd: Make modifying vfs.nfsd.enable_locallocks safe 2024-06-23 15:47:22 -07:00
nullfs nullfs: Show correct exported flag. 2024-04-13 17:21:01 +02:00
p9fs p9fs: remove duplicated code 2024-07-12 21:40:09 -06:00
procfs uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-05-10 13:43:36 -07:00
pseudofs pseudofs: fix off by one in hash iteration in pfs_purge 2023-11-20 05:57:25 +00:00
smbfs Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
tarfs tarfs(5): Grammar fix for a source code comment 2024-04-20 11:21:54 +02:00
tmpfs tmpfs_node_init: use MTX_NEW on lock from uninitialized memory 2024-05-26 10:20:52 -07:00
udf udf: uma_zcreate() does not fail 2024-04-24 08:45:59 -04:00
unionfs unionfs: fix LINT build 2024-07-12 22:41:17 -05:00