TencentOS-kernel/net/sunrpc/auth_gss
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
..
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
auth_gss.c SUNRPC: Move simple_get_bytes and simple_get_netobj into private header 2021-04-12 12:51:59 +08:00
auth_gss_internal.h SUNRPC: Handle 0 length opaque XDR object data properly 2021-04-12 12:52:00 +08:00
gss_generic_token.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
gss_krb5_crypto.c SUNRPC: Add "@len" parameter to gss_unwrap() 2021-03-16 16:27:45 +08:00
gss_krb5_keys.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
gss_krb5_mech.c SUNRPC: Move simple_get_bytes and simple_get_netobj into private header 2021-04-12 12:51:59 +08:00
gss_krb5_seal.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
gss_krb5_seqnum.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
gss_krb5_unseal.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
gss_krb5_wrap.c SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()") 2021-03-16 16:33:47 +08:00
gss_mech_switch.c sunrpc: clean up properly in gss_mech_unregister() 2021-03-16 16:29:51 +08:00
gss_rpc_upcall.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
gss_rpc_upcall.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
gss_rpc_xdr.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
gss_rpc_xdr.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
svcauth_gss.c rpc: fix NULL dereference on kmalloc failure 2021-05-20 16:06:45 +08:00
trace.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