kernel_optimize_test/net/sunrpc/auth_gss
J. Bruce Fields 9aac782ab0 SUNRPC: fix sign error causing rpcsec_gss drops
commit 2ba5acfb34957e8a7fe47cd78c77ca88e9cc2b03 upstream.

If sd_max is unsigned, then sd_max - GSS_SEQ_WIN is a very large number
whenever sd_max is less than GSS_SEQ_WIN, and the comparison:

	seq_num <= sd->sd_max - GSS_SEQ_WIN

in gss_check_seq_num is pretty much always true, even when that's
clearly not what was intended.

This was causing pynfs to hang when using krb5, because pynfs uses zero
as the initial gss sequence number.  That's perfectly legal, but this
logic error causes knfsd to drop the rpc in that case.  Out-of-order
sequence IDs in the first GSS_SEQ_WIN (128) calls will also cause this.

Fixes: 10b9d99a3d ("SUNRPC: Augment server-side rpcgss tracepoints")
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-13 10:04:24 +02:00
..
auth_gss_internal.h SUNRPC: Handle 0 length opaque XDR object data properly 2021-02-13 13:55:12 +01:00
auth_gss.c SUNRPC: Move simple_get_bytes and simple_get_netobj into private header 2021-02-13 13:55:12 +01:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c SUNRPC: remove RC4-HMAC-MD5 support from KerberosV 2020-09-11 14:39:15 +10:00
gss_krb5_keys.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
gss_krb5_mech.c SUNRPC: Move simple_get_bytes and simple_get_netobj into private header 2021-02-13 13:55:12 +01:00
gss_krb5_seal.c SUNRPC: remove RC4-HMAC-MD5 support from KerberosV 2020-09-11 14:39:15 +10:00
gss_krb5_seqnum.c SUNRPC: remove RC4-HMAC-MD5 support from KerberosV 2020-09-11 14:39:15 +10:00
gss_krb5_unseal.c SUNRPC: remove RC4-HMAC-MD5 support from KerberosV 2020-09-11 14:39:15 +10:00
gss_krb5_wrap.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-10-13 08:50:16 -07: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 sign error causing rpcsec_gss drops 2021-10-13 10:04:24 +02:00
trace.c SUNRPC: remove duplicate include 2020-08-19 13:19:42 -04:00