Module Name:    src
Committed By:   mlelstv
Date:           Sat Apr  4 07:07:20 UTC 2020

Modified Files:
        src/sys/nfs: nfs_serv.c nfs_subs.c nfsm_subs.h

Log Message:
NFSv2 is limited to use only 32bit in metadata. Prevent that larger
metadata values are simply truncated.

-> clamp filesystem block counts to signed 32bit.
-> clamp file sizes to signed 32bit (*)

Some NFSv2 clients also have problems to handle buffer sizes larger
than (signed) 16bit.
-> clamp buffer sizes to signed 16bit for better compatibility.

(*) This can lead to erroneous behaviour for files larger than 2GB
that NFSv2 cannot handle but it is still better than before.
An alternative would be to (partially) reject operations on files
larger than 2GB, but which causes other problems.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.238 -r1.239 src/sys/nfs/nfs_subs.c
cvs rdiff -u -r1.53 -r1.54 src/sys/nfs/nfsm_subs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to