linux-stable/net/sunrpc
Frank Sorenson 4d9d47c7e5 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:26:03 +01:00
..
auth_gss sunrpc: Don't use stack buffer with scatterlist 2018-09-15 09:42:57 +02:00
xprtrdma xprtrdma: Return -ENOBUFS when no pages are available 2018-07-25 11:24:02 +02:00
addr.c
auth.c sunrpc: replace generic auth_cred hash with auth-specific function 2016-09-30 15:47:47 -04:00
auth_generic.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
auth_null.c sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags 2016-07-19 16:23:24 -04:00
auth_unix.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
backchannel_rqst.c SUNRPC: Refactor rpc_xdr_buf_init() 2016-09-19 13:08:37 -04:00
cache.c sunrpc: queue work on system_power_efficient_wq 2016-09-27 14:35:36 -04:00
clnt.c NFSv4 client live hangs after live data migration recovery 2018-09-09 20:01:23 +02:00
debugfs.c SUNRPC: Address kbuild warning in net/sunrpc/debugfs.c 2015-06-11 14:01:06 -04:00
Kconfig rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
Makefile SUNRPC: Add a structure to track multiple transports 2016-02-05 18:48:54 -05:00
netns.h
rpc_pipe.c rpc_pipefs: fix double-dput() 2018-04-24 09:34:17 +02:00
rpcb_clnt.c SUNRPC: Use the multipath iterator to assign a transport to each task 2016-02-05 18:48:55 -05:00
sched.c sunrpc: Fix rpc_task_begin trace point 2017-12-14 09:28:23 +01:00
socklib.c sunrpc: do not pull udp headers on receive 2016-04-11 15:31:33 -04:00
stats.c
sunrpc.h
sunrpc_syms.c SUNRPC: cleanup ida information when removing sunrpc module 2017-02-01 08:33:09 +01:00
svc.c NFSv4: Fix callback server shutdown 2017-09-27 14:39:18 +02:00
svc_xprt.c nfsd: Fix an Oops in free_session() 2018-11-13 11:17:01 -08:00
svcauth.c svcrpc: move some initialization to common code 2015-11-24 10:39:16 -07:00
svcauth_unix.c kernel: make groups_sort calling a responsibility group_info allocators 2018-01-10 09:29:52 +01:00
svcsock.c net: sunrpc: svcsock: fix NULL-pointer exception 2017-08-30 10:21:51 +02:00
sysctl.c Sunrpc: Supports hexadecimal number for sysctl files of sunrpc debug 2015-11-03 15:56:49 -05:00
timer.c
xdr.c sunrpc: correct the computation for page_ptr when truncating 2018-11-21 09:26:03 +01:00
xprt.c SUNRPC: Generalize the RPC buffer release API 2016-09-19 13:08:37 -04:00
xprtmultipath.c SUNRPC search xprt switch for sockaddr 2016-09-19 13:08:36 -04:00
xprtsock.c SUNRPC: ensure correct error is reported by xs_tcp_setup_socket() 2018-04-13 19:48:14 +02:00