1
0
Fork 0
alistair23-linux/net/sunrpc
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
..
auth_gss sunrpc: expiry_time should be seconds not timeval 2020-02-11 04:35:35 -08:00
xprtrdma SUNRPC: Fix backchannel latency metrics 2020-01-26 10:00:59 +01:00
Kconfig SUNRPC: Drop redundant CONFIG_ from CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES 2019-07-06 14:54:53 -04:00
Makefile SUNRPC: remove generic cred code. 2018-12-19 13:52:46 -05:00
addr.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
auth.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
auth_null.c SUNRPC: Add rpc_auth::au_ralign field 2019-02-14 11:48:36 -05:00
auth_unix.c SUNRPC: Use the client user namespace when encoding creds 2019-04-26 16:24:32 -04:00
backchannel_rqst.c SUNRPC: Destroy the back channel when we destroy the host transport 2019-10-30 12:04:35 -04:00
cache.c sunrpc: fix crash when cache_head become valid before update 2020-01-09 10:20:01 +01:00
clnt.c NFS Client Updates for Linux 5.3 2019-09-26 12:20:14 -07:00
debugfs.c NFS client updates for Linux 5.3 2019-07-18 14:32:33 -07:00
netns.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpc_pipe.c new helper: get_tree_keyed() 2019-09-05 14:34:22 -04:00
rpcb_clnt.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sched.c SUNRPC: Avoid RPC delays when exiting suspend 2019-12-13 08:42:34 +01:00
socklib.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
stats.c Merge branch 'multipath_tcp' 2019-07-06 14:54:52 -04:00
sunrpc.h sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
sunrpc_syms.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
svc.c sunrpc: clean up indentation issue 2019-09-25 11:13:12 -04:00
svc_xprt.c nfs: fix out-of-date connectathon talk URL 2019-07-03 17:52:09 -04:00
svcauth.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
svcauth_unix.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
svcsock.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sysctl.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
timer.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
xdr.c SUNRPC: Fix another issue with MIC buffer space 2020-01-26 10:01:07 +01:00
xprt.c SUNRPC: Destroy the back channel when we destroy the host transport 2019-10-30 12:04:35 -04:00
xprtmultipath.c SUNRPC: Optimise transport balancing code 2019-07-18 14:43:52 -04:00
xprtsock.c SUNRPC: Fix backchannel latency metrics 2020-01-26 10:00:59 +01:00