linux/net/sunrpc
Benjamin Coddington 38b7631fbe nfs4: limit callback decoding to received bytes
A truncated cb_compound request will cause the client to decode null or
data from a previous callback for nfs4.1 backchannel case, or uninitialized
data for the nfs4.0 case. This is because the path through
svc_process_common() advances the request's iov_base and decrements iov_len
without adjusting the overall xdr_buf's len field.  That causes
xdr_init_decode() to set up the xdr_stream with an incorrect length in
nfs4_callback_compound().

Fixing this for the nfs4.1 backchannel case first requires setting the
correct iov_len and page_len based on the length of received data in the
same manner as the nfs4.0 case.

Then the request's xdr_buf length can be adjusted for both cases based upon
the remaining iov_len and page_len.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-11-23 22:03:15 -05:00
..
auth_gss sunrpc: avoid warning in gss_key_timeout 2015-10-23 15:57:28 -04:00
xprtrdma NFS client updates for Linux 4.4 2015-11-09 18:11:22 -08:00
Kconfig rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
Makefile NFS client updates for Linux 4.2 2015-07-02 11:32:23 -07:00
addr.c replace strict_strto calls 2014-07-12 18:45:49 -04:00
auth.c kernel/params: constify struct kernel_param_ops uses 2015-05-28 11:32:10 +09:30
auth_generic.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
auth_null.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
auth_unix.c sunrpc: increase UNX_MAXNODENAME from 32 to __NEW_UTS_LEN bytes 2015-08-12 14:31:04 -04:00
backchannel_rqst.c nfs4: limit callback decoding to received bytes 2015-11-23 22:03:15 -05:00
cache.c sunrpc/cache: make cache flushing more reliable. 2015-10-23 15:57:30 -04:00
clnt.c SUNRPC: Don't reencode message if transmission failed with ENOBUFS 2015-07-03 09:42:12 -04:00
debugfs.c SUNRPC: Address kbuild warning in net/sunrpc/debugfs.c 2015-06-11 14:01:06 -04:00
netns.h Merge branch 'for-3.14' of git://linux-nfs.org/~bfields/linux 2014-01-30 10:18:43 -08:00
rpc_pipe.c VFS: net/: d_inode() annotations 2015-04-15 15:06:56 -04:00
rpcb_clnt.c SUNRPC: NULL utsname dereference on NFS umount during namespace cleanup 2015-02-03 16:40:17 -05:00
sched.c NFS client bugfixes for Linux 4.3 2015-09-25 11:33:52 -07:00
socklib.c net: Save software checksum complete 2014-06-11 15:46:13 -07:00
stats.c sunrpc: add rpc_count_iostats_idx 2015-02-03 11:06:38 -08:00
sunrpc.h SUNRPC: track whether a request is coming from a loop-back interface. 2014-05-22 15:59:18 -04:00
sunrpc_syms.c sunrpc: make debugfs file creation failure non-fatal 2015-04-23 14:42:27 -04:00
svc.c nfs4: limit callback decoding to received bytes 2015-11-23 22:03:15 -05:00
svc_xprt.c nfsd/sunrpc: turn enqueueing a svc_xprt into a svc_serv operation 2015-08-10 16:05:42 -04:00
svcauth.c nfsd4: better reservation of head space for krb5 2014-05-30 17:32:17 -04:00
svcauth_unix.c svcrpc: fix failures to handle -1 uid's 2013-07-08 17:27:23 -04:00
svcsock.c svcrpc: document lack of some memory barriers 2015-11-10 17:02:47 -05:00
sysctl.c Sunrpc: Supports hexadecimal number for sysctl files of sunrpc debug 2015-11-03 15:56:49 -05:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c rpc: fix xdr_truncate_encode to handle buffer ending on page boundary 2015-01-07 14:03:58 -05:00
xprt.c SUNRPC: Lock the transport layer on shutdown 2015-09-19 16:37:43 -04:00
xprtsock.c SUNRPC: fix variable type 2015-11-03 12:31:31 -05:00