NFSv4: Fix range checking in __nfs4_get_acl_uncached and __nfs4_proc_set_acl
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 24 Aug 2012 14:59:25 +0000 (10:59 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 5 Jun 2017 20:13:51 +0000 (21:13 +0100)
commit6962db53ad0331c5670f5797d212b25ad8338168
tree2ef0ccbe75fae6f7b5b8287e8463c27b0fa7f473
parent352524a4f80851c29018c6030fc67a484f0a756b
NFSv4: Fix range checking in __nfs4_get_acl_uncached and __nfs4_proc_set_acl

commit 21f498c2f73bd6150d82931f09965826dca0b5f2 upstream.

Ensure that the user supplied buffer size doesn't cause us to overflow
the 'pages' array.

Also fix up some confusion between the use of PAGE_SIZE and
PAGE_CACHE_SIZE when calculating buffer sizes. We're not using
the page cache for anything here.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/nfs/nfs4proc.c