linux-stable/net/sunrpc/auth_gss
Martijn de Gouw d48c812474 SUNRPC: fix copying of multiple pages in gss_read_proxy_verf()
When the passed token is longer than 4032 bytes, the remaining part
of the token must be copied from the rqstp->rq_arg.pages. But the
copy must make sure it happens in a consecutive way.

With the existing code, the first memcpy copies 'length' bytes from
argv->iobase, but since the header is in front, this never fills the
whole first page of in_token->pages.

The mecpy in the loop copies the following bytes, but starts writing at
the next page of in_token->pages.  This leaves the last bytes of page 0
unwritten.

Symptoms were that users with many groups were not able to access NFS
exports, when using Active Directory as the KDC.

Signed-off-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>
Fixes: 5866efa8cb "SUNRPC: Fix svcauth_gss_proxy_init()"
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2020-10-20 13:21:30 -04:00
..
auth_gss.c SUNRPC: rpc_call_null_helper() should set RPC_TASK_SOFT 2020-06-11 13:33:48 -04:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
gss_krb5_keys.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
gss_krb5_mech.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
gss_krb5_seal.c sunrpc: convert to time64_t for expiry 2020-01-15 10:54:30 -05:00
gss_krb5_seqnum.c sunrpc: fix 4 more call sites that were using stack memory with a scatterlist 2019-02-15 14:56:51 -05:00
gss_krb5_unseal.c sunrpc: convert to time64_t for expiry 2020-01-15 10:54:30 -05:00
gss_krb5_wrap.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
gss_mech_switch.c sunrpc: clean up properly in gss_mech_unregister() 2020-05-28 18:15:00 -04:00
gss_rpc_upcall.c sunrpc: use kmemdup_nul() in gssp_stringify() 2020-06-08 10:51:32 -04:00
gss_rpc_upcall.h SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
gss_rpc_xdr.c SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
gss_rpc_xdr.h SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
Makefile SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00
svcauth_gss.c SUNRPC: fix copying of multiple pages in gss_read_proxy_verf() 2020-10-20 13:21:30 -04:00
trace.c SUNRPC: remove duplicate include 2020-08-19 13:19:42 -04:00