• Chuck Lever's avatar
    SUNRPC: Fix svcauth_gss_proxy_init() · 5866efa8
    Chuck Lever authored
    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: 3316f063 ("svcrdma: Persistently allocate and DMA- ... ")
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Tested-by: default avatarBill Baker <bill.baker@oracle.com>
    Reviewed-by: default avatarSimo Sorce <simo@redhat.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    5866efa8
svcauth_gss.c 47.8 KB