opnsense-src/sys/fs
Rick Macklem db4f457f16 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.

Approved by:	so
Security:	FreeBSD-SA-24:07.nfsclient
Security:	CVE-2024-6759
Reported by:	Apple Security Engineering and Architecture (SEAR)

(cherry picked from commit 026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51)
(cherry picked from commit 9328ded386)
2024-08-07 17:14:11 +02:00
..
autofs sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
cd9660 cd9660: Add support for mask,dirmask,uid,gid options 2024-04-08 10:25:46 -07:00
cuse sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
deadfs sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
devfs Fix MNT_IGNORE for devfs, fdescfs and nullfs 2024-04-22 15:48:15 +02:00
ext2fs Fix build with gcc12. 2023-10-31 08:59:28 -07:00
fdescfs Fix MNT_IGNORE for devfs, fdescfs and nullfs 2024-04-22 15:48:15 +02:00
fifofs sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
fuse fusefs: correct a comment 2024-04-21 08:10:47 -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-03-01 06:12:02 +02:00
nfs nfsd: Fix Link conformance with RFC8881 for delegations 2024-05-12 21:49:04 -07:00
nfsclient nfscl: Scan readdir reply filenames for invalid characters 2024-08-07 17:14:11 +02:00
nfsserver nfsd: Fix Link conformance with RFC8881 for delegations 2024-05-12 21:49:04 -07:00
nullfs nullfs: Show correct exported flag. 2024-04-22 15:48:15 +02:00
procfs sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pseudofs pseudofs: fix off by one in hash iteration in pfs_purge 2023-11-24 17:22:15 +00:00
smbfs Add vnode_pager_clean_{a,}sync(9) 2024-01-18 02:51:33 +02:00
tarfs tarfs: Implement VOP_BMAP 2024-04-15 10:06:12 -04:00
tmpfs tmpfs: allow recurse as that does happen when using unionfs 2024-06-03 11:06:53 +02:00
udf udf: uma_zcreate() does not fail 2024-05-02 09:25:08 -04:00
unionfs unionfs_lookup(): fix wild accesses to vnode private data 2024-04-27 12:42:36 -05:00