Chuck Lever e6faac3f58 NFSD: Fix ia_size underflow
iattr::ia_size is a loff_t, which is a signed 64-bit type. NFSv3 and
NFSv4 both define file size as an unsigned 64-bit type. Thus there
is a range of valid file size values an NFS client can send that is
already larger than Linux can handle.

Currently decode_fattr4() dumps a full u64 value into ia_size. If
that value happens to be larger than S64_MAX, then ia_size
underflows. I'm about to fix up the NFSv3 behavior as well, so let's
catch the underflow in the common code path: nfsd_setattr().

Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2022-02-09 09:22:48 -05:00
..
2021-02-23 13:39:45 -08:00
2021-01-25 09:36:28 -05:00
2021-10-02 15:51:10 -04:00
2021-10-02 15:51:10 -04:00
2020-09-25 18:01:26 -04:00
2022-01-08 14:42:02 -05:00
2021-01-24 14:27:17 +01:00
2021-10-02 15:51:10 -04:00
2022-01-08 14:42:02 -05:00
2021-12-13 13:42:51 -05:00
2021-12-13 13:42:51 -05:00
2022-01-08 14:42:03 -05:00
2022-02-09 09:22:48 -05:00
2018-09-25 20:34:54 -04:00