kernel-fxtec-pro1x/net/sunrpc
Roberto Bergantinos Corpas a90c2c5e8c sunrpc: expiry_time should be seconds not timeval
commit 3d96208c30f84d6edf9ab4fac813306ac0d20c10 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:34:07 -08:00
..
auth_gss sunrpc: expiry_time should be seconds not timeval 2020-02-11 04:34:07 -08:00
xprtrdma xprtrdma: Fix use-after-free in rpcrdma_post_recvs 2020-01-27 14:50:59 +01:00
addr.c
auth.c
auth_generic.c
auth_null.c
auth_unix.c
backchannel_rqst.c
cache.c sunrpc: fix crash when cache_head become valid before update 2019-12-17 20:35:52 +01:00
clnt.c
debugfs.c
Kconfig
Makefile
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c
socklib.c
stats.c
sunrpc.h
sunrpc_syms.c
svc.c
svc_xprt.c
svcauth.c
svcauth_unix.c
svcsock.c
sysctl.c
timer.c
xdr.c
xprt.c
xprtmultipath.c
xprtsock.c sunrpc: safely reallow resvport min/max inversion 2019-12-01 09:16:41 +01:00