kernel_optimize_test/net/sunrpc
J. Bruce Fields 5fb71b231c rpc: fix NULL dereference on kmalloc failure
[ Upstream commit 0ddc942394013f08992fc379ca04cffacbbe3dae ]

I think this is unlikely but possible:

svc_authenticate sets rq_authop and calls svcauth_gss_accept.  The
kmalloc(sizeof(*svcdata), GFP_KERNEL) fails, leaving rq_auth_data NULL,
and returning SVC_DENIED.

This causes svc_process_common to go to err_bad_auth, and eventually
call svc_authorise.  That calls ->release == svcauth_gss_release, which
tries to dereference rq_auth_data.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Link: https://lore.kernel.org/linux-nfs/3F1B347F-B809-478F-A1E9-0BE98E22B0F0@oracle.com/T/#t
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-07 15:00:04 +02:00
..
auth_gss rpc: fix NULL dereference on kmalloc failure 2021-04-07 15:00:04 +02:00
xprtrdma svcrdma: disable timeouts on rdma backchannel 2021-03-25 09:04:08 +01: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
cache.c
clnt.c
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: Set memalloc_nofs_save() for sync tasks 2021-03-17 17:06:33 +01: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 NFS READs that start at non-page-aligned offsets 2021-02-10 09:29:13 +01:00
sysctl.c net/sunrpc: fix useless comparison in proc_do_xprt() 2020-11-08 16:28:25 -05:00
timer.c
xdr.c
xprt.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-30 11:53:30 +01:00
xprtmultipath.c
xprtsock.c sunrpc: fix xs_read_xdr_buf for partial pages receive 2020-12-30 11:53:53 +01:00