]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
NFSD: Clamp WRITE offsets
authorChuck Lever <chuck.lever@oracle.com>
Tue, 25 Jan 2022 21:36:22 +0000 (16:36 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 7 Mar 2022 10:41:56 +0000 (11:41 +0100)
commit36707c0fe6666083184fb6e58d8e60f422fe74f8
treeab4da6ab4470d3983ee68760f092662c5dc3de1a
parent714cd86b5093c499ec8c35e96a86f1be0721504a
NFSD: Clamp WRITE offsets

BugLink: https://bugs.launchpad.net/bugs/1963889
commit 6260d9a56ab352b54891ec66ab0eced57d55abc6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/nfsd/nfs3proc.c
fs/nfsd/nfs4proc.c