linux/net
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
..
6lowpan
9p
802
8021q vlan: Do not put vlan headers back on bridge and macvlan ports 2015-11-17 14:38:35 -05:00
appletalk
atm
ax25
batman-adv
bluetooth
bridge switchdev: bridge: Check return code is not EOPNOTSUPP 2015-11-16 14:56:03 -05:00
caif
can
ceph Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2015-11-13 09:24:40 -08:00
core net/core: revert "net: fix __netdev_update_features return.." and add comment 2015-11-17 15:25:45 -05:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ipv4 raw: increment correct SNMP counters for ICMP messages 2015-11-16 15:08:48 -05:00
ipv6 snmp: Remove duplicate OUTMCAST stat increment 2015-11-16 16:36:32 -05:00
ipx
irda
iucv
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls
netfilter ipvs: use skb_to_full_sk() helper 2015-11-15 18:39:48 -05:00
netlabel
netlink
netrom
nfc
openvswitch
packet packet: Use PAGE_ALIGNED macro 2015-11-17 15:25:44 -05:00
phonet
rds Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
rfkill
rose
rxrpc
sched net_sched: em_meta: use skb_to_full_sk() helper 2015-11-08 20:56:39 -05:00
sctp sctp: translate host order to network order when setting a hmacid 2015-11-15 18:27:27 -05:00
sunrpc nfs4: limit callback decoding to received bytes 2015-11-23 22:03:15 -05:00
switchdev
tipc
unix af_unix: take receive queue lock while appending new skb 2015-11-17 15:25:45 -05:00
vmw_vsock
wimax
wireless
x25
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c