]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: Clamp WRITE offsets
authorChuck Lever <chuck.lever@oracle.com>
Tue, 25 Jan 2022 21:36:22 +0000 (16:36 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Wed, 9 Feb 2022 14:24:01 +0000 (09:24 -0500)
commit6260d9a56ab352b54891ec66ab0eced57d55abc6
tree08f0fa649fbfd2676938db6885fd58a3248bbc9a
parenta648fdeb7c0e17177a2280344d015dba3fbe3314
NFSD: Clamp WRITE offsets

Ensure that a client cannot specify a WRITE range that falls in a
byte range outside what the kernel's internal types (such as loff_t,
which is signed) can represent. The kiocb iterators, invoked in
nfsd_vfs_write(), should properly limit write operations to within
the underlying file system's s_maxbytes.

Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs3proc.c
fs/nfsd/nfs4proc.c