smbd: add vfs_valid_{pread,pwrite}_range() checks where needed
commit0d29e442b159ed1123356c8c1ced29b8282903a9
authorStefan Metzmacher <metze@samba.org>
Mon, 11 May 2020 16:18:24 +0000 (11 18:18 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 14 May 2020 07:25:45 +0000 (14 07:25 +0000)
tree86c8d2ee1d432e5e3bc9d480ba96dda7263f3ab6
parent3197bd27b359746aaa70fa80b1971fc42cc96c13
smbd: add vfs_valid_{pread,pwrite}_range() checks where needed

I checked all callers of SMB_VFS_PWRITE[_SEND](),
all callers of SMB_VFS_PREAD[_SEND]() and also
places where we append to the file and allocate
more space.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 6fa753a1a67d563cd22d0cad73ae15ee267512fc)
selftest/knownfail.d/rw-invalid
source3/modules/vfs_default.c
source3/smbd/aio.c
source3/smbd/fileio.c
source3/smbd/vfs.c