android_kernel_xiaomi_sm7250/net/sunrpc/auth_gss
Chuck Lever 66ed7b413d SUNRPC: Fix svcauth_gss_proxy_init()
commit 5866efa8cbfbadf3905072798e96652faf02dbe8 upstream.

gss_read_proxy_verf() assumes things about the XDR buffer containing
the RPC Call that are not true for buffers generated by
svc_rdma_recv().

RDMA's buffers look more like what the upper layer generates for
sending: head is a kmalloc'd buffer; it does not point to a page
whose contents are contiguous with the first page in the buffers'
page array. The result is that ACCEPT_SEC_CONTEXT via RPC/RDMA has
stopped working on Linux NFS servers that use gssproxy.

This does not affect clients that use only TCP to send their
ACCEPT_SEC_CONTEXT operation (that's all Linux clients). Other
clients, like Solaris NFS clients, send ACCEPT_SEC_CONTEXT on the
same transport as they send all other NFS operations. Such clients
can send ACCEPT_SEC_CONTEXT via RPC/RDMA.

I thought I had found every direct reference in the server RPC code
to the rqstp->rq_pages field.

Bug found at the 2019 Westford NFS bake-a-thon.

Fixes: 3316f06311 ("svcrdma: Persistently allocate and DMA- ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Bill Baker <bill.baker@oracle.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-27 14:49:51 +01:00
..
auth_gss.c SUNRPC: Fix leak of krb5p encode pages 2018-12-13 09:16:19 +01:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c NFS client updates for Linux 4.19 2018-08-23 16:03:58 -07:00
gss_krb5_keys.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_mech.c sunrpc: GFP_KERNEL should be GFP_NOFS in crypto code 2016-11-01 15:47:52 -04:00
gss_krb5_seal.c SUNRPC: Fix a compile warning for cmpxchg64() 2019-12-01 09:16:40 +01:00
gss_krb5_seqnum.c sunrpc: fix 4 more call sites that were using stack memory with a scatterlist 2019-02-23 09:07:27 +01:00
gss_krb5_unseal.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_wrap.c NFS client updates for Linux 4.19 2018-08-23 16:03:58 -07:00
gss_mech_switch.c xprtrdma: No direct data placement with krb5i and krb5p 2016-07-11 15:50:43 -04:00
gss_rpc_upcall.c sunrpc: Extract target name into svc_cred 2018-08-22 18:32:07 -04:00
gss_rpc_upcall.h Merge branch 'nfs-for-next' of git://linux-nfs.org/~trondmy/nfs-2.6 into for-3.10 2013-04-29 16:23:34 -04:00
gss_rpc_xdr.c kernel: make groups_sort calling a responsibility group_info allocators 2017-12-14 16:00:49 -08:00
gss_rpc_xdr.h sunrpc/auth_gss: fix decoder callback prototypes 2017-07-13 15:57: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
svcauth_gss.c SUNRPC: Fix svcauth_gss_proxy_init() 2020-01-27 14:49:51 +01:00