1
0
Fork 0
alistair23-linux/net/sunrpc/auth_gss
Chuck Lever 18d1bb4973 SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()")
[ Upstream commit 986a4b63d3 ]

Braino when converting "buf->len -=" to "buf->len = len -".

The result is under-estimation of the ralign and rslack values. On
krb5p mounts, this has caused READDIR to fail with EIO, and KASAN
splats when decoding READLINK replies.

As a result of fixing this oversight, the gss_unwrap method now
returns a buf->len that can be shorter than priv_len for small
RPC messages. The additional adjustment done in unwrap_priv_data()
can underflow buf->len. This causes the nfsd_request_too_large
check to fail during some NFSv3 operations.

Reported-by: Marian Rainer-Harbach
Reported-by: Pierre Sauter <pierre.sauter@stwm.de>
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1886277
Fixes: 31c9590ae4 ("SUNRPC: Add "@len" parameter to gss_unwrap()")
Reviewed-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:21 +02:00
..
Makefile SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00
auth_gss.c SUNRPC: Fix GSS privacy computation of auth->au_ralign 2020-05-20 08:20:05 +02:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c SUNRPC: Add "@len" parameter to gss_unwrap() 2020-05-20 08:20:04 +02:00
gss_krb5_keys.c sunrpc: Use kzfree rather than its implementation. 2019-09-05 12:06:04 +02:00
gss_krb5_mech.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
gss_krb5_seal.c SUNRPC: Use atomic(64)_t for seq_send(64) 2018-11-01 13:55:24 -04: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: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_wrap.c SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()") 2020-08-19 08:16:21 +02:00
gss_mech_switch.c sunrpc: clean up properly in gss_mech_unregister() 2020-06-22 09:31:24 +02:00
gss_rpc_upcall.c SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05: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
svcauth_gss.c SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()") 2020-08-19 08:16:21 +02:00
trace.c SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00