1
0
Fork 0
alistair23-linux/net/sunrpc/auth_gss
Roberto Bergantinos Corpas 65afa69581 sunrpc: expiry_time should be seconds not timeval
commit 3d96208c30 upstream.

When upcalling gssproxy, cache_head.expiry_time is set as a
timeval, not seconds since boot. As such, RPC cache expiry
logic will not clean expired objects created under
auth.rpcsec.context cache.

This has proven to cause kernel memory leaks on field. Using
64 bit variants of getboottime/timespec

Expiration times have worked this way since 2010's c5b29f885a "sunrpc:
use seconds since boot in expiry cache".  The gssproxy code introduced
in 2012 added gss_proxy_save_rsc and introduced the bug.  That's a while
for this to lurk, but it required a bit of an extreme case to make it
obvious.

Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 030d794bf4 "SUNRPC: Use gssproxy upcall for server..."
Tested-By: Frank Sorenson <sorenson@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:35:35 -08:00
..
Makefile SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00
auth_gss.c SUNRPC: Rename xdr_buf_read_netobj to xdr_buf_read_mic 2019-09-20 15:15:24 -04:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08: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: Remove xdr_buf_trim() 2019-02-14 09:39:34 -05:00
gss_mech_switch.c SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05: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: expiry_time should be seconds not timeval 2020-02-11 04:35:35 -08:00
trace.c SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00