kernel_optimize_test/net/sunrpc
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 SUNRPC: fix sign error causing rpcsec_gss drops 2021-10-13 10:04:24 +02:00
xprtrdma SUNRPC/xprtrdma: Fix reconnection locking 2021-09-18 13:40:13 +02:00
addr.c net: sunrpc: interpret the return value of kstrtou32 correctly 2021-01-19 18:27:33 +01:00
auth_null.c
auth_unix.c
auth.c
backchannel_rqst.c The one new feature this time, from Anna Schumaker, is READ_PLUS, which 2020-10-22 09:44:27 -07:00
cache.c sunrpc: raise kernel RPC channel buffer size 2020-10-20 13:21:30 -04:00
clnt.c SUNRPC in case of backlog, hand free slots directly to waiting task 2021-06-03 09:00:37 +02:00
debugfs.c net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs' 2020-12-30 11:53:30 +01:00
Kconfig
Makefile
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c SUNRPC: Should wake up the privileged task firstly. 2021-07-14 16:55:42 +02:00
socklib.c
socklib.h
stats.c
sunrpc_syms.c
sunrpc.h
svc_xprt.c NFSD: Repair misuse of sv_lock in 5.10.16-rt30. 2021-03-25 09:04:08 +01:00
svc.c sunrpc: fix refcount leak for rpc auth modules 2021-03-25 09:04:08 +01:00
svcauth_unix.c
svcauth.c
svcsock.c SUNRPC: fix ternary sign expansion bug in tracing 2021-05-19 10:13:04 +02:00
sysctl.c net/sunrpc: fix useless comparison in proc_do_xprt() 2020-11-08 16:28:25 -05:00
timer.c
xdr.c The one new feature this time, from Anna Schumaker, is READ_PLUS, which 2020-10-22 09:44:27 -07:00
xprt.c SUNRPC/xprtrdma: Fix reconnection locking 2021-09-18 13:40:13 +02:00
xprtmultipath.c
xprtsock.c sunrpc: Fix return value of get_srcport() 2021-09-18 13:40:14 +02:00