linux/net/sunrpc
Frank Sorenson a56609f725 sunrpc: correct the computation for page_ptr when truncating
commit 5d7a5bcb67 upstream.

When truncating the encode buffer, the page_ptr is getting
advanced, causing the next page to be skipped while encoding.
The page is still included in the response, so the response
contains a page of bogus data.

We need to adjust the page_ptr backwards to ensure we encode
the next page into the correct place.

We saw this triggered when concurrent directory modifications caused
nfsd4_encode_direct_fattr() to return nfserr_noent, and the resulting
call to xdr_truncate_encode() corrupted the READDIR reply.

Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:24:14 +01:00
..
auth_gss sunrpc: Don't use stack buffer with scatterlist 2018-09-15 09:45:26 +02:00
xprtrdma xprtrdma: Fix corner cases when handling device removal 2018-07-22 14:28:42 +02:00
addr.c
auth_generic.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
auth_null.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
auth_unix.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
auth.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
backchannel_rqst.c SUNRPC: Don't hold the transport lock when receiving backchannel data 2017-08-16 15:10:16 -04:00
cache.c NFS client updates for Linux 4.11 2017-03-01 16:10:30 -08:00
clnt.c NFSv4 client live hangs after live data migration recovery 2018-09-09 19:55:59 +02:00
debugfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netns.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpc_pipe.c rpc_pipefs: fix double-dput() 2018-04-24 09:36:38 +02:00
rpcb_clnt.c sunrpc: mark all struct rpc_procinfo instances as const 2017-07-13 15:57:57 -04:00
sched.c sunrpc: Fix rpc_task_begin trace point 2017-12-14 09:53:09 +01:00
socklib.c sunrpc: do not pull udp headers on receive 2016-04-11 15:31:33 -04:00
stats.c sunrpc: move pc_count out of struct svc_procinfo 2017-07-13 15:58:02 -04:00
sunrpc_syms.c SUNRPC: cleanup ida information when removing sunrpc module 2017-01-24 15:29:24 -05:00
sunrpc.h
svc_xprt.c nfsd: Fix an Oops in free_session() 2018-11-13 11:15:10 -08:00
svc.c sunrpc: Const-ify struct sv_serv_ops 2017-08-24 22:13:50 -04:00
svcauth_unix.c kernel: make groups_sort calling a responsibility group_info allocators 2017-12-20 10:10:18 +01:00
svcauth.c locking/atomic, kref: Implement kref_put_lock() 2017-01-18 10:03:29 +01:00
svcsock.c NFS client updates for Linux 4.14 2017-09-11 22:01:44 -07:00
sysctl.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
timer.c
xdr.c sunrpc: correct the computation for page_ptr when truncating 2018-11-21 09:24:14 +01:00
xprt.c SUNRPC: Fix a race in the receive code path 2017-12-20 10:10:21 +01:00
xprtmultipath.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xprtsock.c SUNRPC: Don't call __UDPX_INC_STATS() from a preemptible context 2018-04-26 11:02:19 +02:00