TencentOS-kernel/net/sunrpc
J. Bruce Fields 86a3efcbf2 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-05-20 16:06:45 +08:00
..
auth_gss rpc: fix NULL dereference on kmalloc failure 2021-05-20 16:06:45 +08:00
xprtrdma svcrdma: disable timeouts on rdma backchannel 2021-04-12 12:53:17 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
addr.c net: sunrpc: interpret the return value of kstrtou32 correctly 2021-04-12 12:51:28 +08:00
auth.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
auth_null.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
auth_unix.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backchannel_rqst.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
cache.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
clnt.c SUNRPC: Signalled ASYNC tasks need to exit 2021-03-16 16:27:56 +08:00
debugfs.c net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs' 2021-03-16 16:42:59 +08:00
netns.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rpc_pipe.c sunrpc: fixed rollback in rpc_gssd_dummy_populate() 2021-03-16 16:31:12 +08:00
rpcb_clnt.c SUNRPC: stop printk reading past end of string 2021-03-16 16:36:13 +08:00
sched.c SUNRPC: Set memalloc_nofs_save() for sync tasks 2021-04-12 12:53:10 +08:00
socklib.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
stats.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sunrpc.h sunrpc: check that domain table is empty at module unload. 2021-03-16 16:32:44 +08:00
sunrpc_syms.c sunrpc: check that domain table is empty at module unload. 2021-03-16 16:32:44 +08:00
svc.c sunrpc: fix refcount leak for rpc auth modules 2021-04-12 12:53:17 +08:00
svc_xprt.c NFSD: Repair misuse of sv_lock in 5.10.16-rt30. 2021-04-12 12:53:17 +08:00
svcauth.c sunrpc: check that domain table is empty at module unload. 2021-03-16 16:32:44 +08:00
svcauth_unix.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
svcsock.c nfsd: Fix NFSv4 READ on RDMA when using readv 2021-03-16 16:33:11 +08:00
sysctl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
timer.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xdr.c SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() 2021-03-16 16:31:12 +08:00
xprt.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2021-03-16 16:42:59 +08:00
xprtmultipath.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xprtsock.c sunrpc: fix xs_read_xdr_buf for partial pages receive 2021-03-16 16:43:14 +08:00