Commit c953093
NFSD: Protect against send buffer overflow in NFSv3 READ
jira VULN-155649
cve CVE-2022-50410
commit-author Chuck Lever <chuck.lever@oracle.com>
commit fa6be9c
upstream-diff LTS 8.6 version of the function `nfsd3_proc_read()'
misses changes from 0cb4d23,
cc9bcda and
be63bd2. Preserved the logic of what
is assigned to `resp->count' despite the missing changes.
Since before the git era, NFSD has conserved the number of pages
held by each nfsd thread by combining the RPC receive and send
buffers into a single array of pages. This works because there are
no cases where an operation needs a large RPC Call message and a
large RPC Reply at the same time.
Once an RPC Call has been received, svc_process() updates
svc_rqst::rq_res to describe the part of rq_pages that can be
used for constructing the Reply. This means that the send buffer
(rq_res) shrinks when the received RPC record containing the RPC
Call is large.
A client can force this shrinkage on TCP by sending a correctly-
formed RPC Call header contained in an RPC record that is
excessively large. The full maximum payload size cannot be
constructed in that case.
Cc: <stable@vger.kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
(cherry picked from commit fa6be9c)
Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>1 parent 57d3d17 commit c953093
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
0 commit comments