freebsd-dev/sys/fs
Mark Johnston 8bde6d15d1 nfsclient: Copy only initialized fields in nfs_getattr()
When loading attributes from the cache, the NFS client is careful to
copy only the fields that it initialized.  After fetching attributes
from the server, however, it would copy the entire vattr structure
initialized from the RPC response, so uninitialized stack bytes would
end up being copied to userspace.  In particular, va_birthtime (v2 and
v3) and va_gen (v3) had this problem.

Use a common subroutine to copy fields provided by the NFS client, and
ensure that we provide a dummy va_gen for the v3 case.

Reviewed by:	rmacklem
Reported by:	KMSAN
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30090
2021-05-04 08:53:57 -04:00
..
autofs Ensure that dirent's d_off field is initialized 2021-01-03 11:50:31 -05:00
cd9660 Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
cuse Fix for loading cuse.ko via rc.d . Make sure we declare the cuse(3) 2020-10-23 08:44:53 +00:00
deadfs vn_open(): If the vnode is reclaimed during open(2), do not return error. 2021-02-12 03:02:20 +02:00
devfs devfs: Avoid comparison with an uninitialized var in devfs_fp_check() 2021-05-03 13:24:30 -04:00
ext2fs ext2fs: clear write cluster tracking on truncation 2021-02-21 11:38:21 +02:00
fdescfs Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
fifofs fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
fuse fusefs: fix a dead store in fuse_vnop_advlock 2021-03-19 19:38:57 -06:00
mntfs Add a new "mntfs" pseudo file system which provides private device vnodes for 2020-03-06 18:41:37 +00:00
msdosfs Fix makefs bootstrap after d485c77f20 2021-02-22 17:55:45 +00:00
nfs nfsclient: Copy only initialized fields in nfs_getattr() 2021-05-04 08:53:57 -04:00
nfsclient nfsclient: Copy only initialized fields in nfs_getattr() 2021-05-04 08:53:57 -04:00
nfsserver nfsd: fix the slot sequence# when a callback fails 2021-04-26 16:24:10 -07:00
nullfs nullfs: protect against user creating inconsistent state 2021-04-02 15:40:25 +03:00
procfs Close races in vm object chain traversal for unlock 2021-02-25 12:11:19 -08:00
pseudofs pseudofs: limit writes to 1M 2021-04-14 10:23:21 +03:00
smbfs Ensure that dirent's d_off field is initialized 2021-01-03 11:50:31 -05:00
tmpfs tmpfs: implement pathconf(_PC_SYMLINK_MAX) 2021-01-29 09:30:25 +00:00
udf Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
unionfs Split out cwd/root/jail, cmask state from filedesc table 2020-11-17 21:14:13 +00:00