android_kernel_samsung_sm8650/include/linux/sunrpc
Dan Carpenter 4e5a5cda3d nfsd: fix double fget() bug in __write_ports_addfd()
[ Upstream commit c034203b6a9dae6751ef4371c18cb77983e30c28 ]

The bug here is that you cannot rely on getting the same socket
from multiple calls to fget() because userspace can influence
that.  This is a kind of double fetch bug.

The fix is to delete the svc_alien_sock() function and instead do
the checking inside the svc_addsock() function.

Fixes: 3064639423 ("nfsd: check passed socket's net matches NFSd superblock's one")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: NeilBrown <neilb@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09 10:34:04 +02:00
..
addr.h
auth_gss.h
auth.h
bc_xprt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE 2022-06-10 14:51:35 +02:00
cache.h SUNRPC: Make cache_req::thread_wait an unsigned long 2022-05-19 12:25:39 -04:00
clnt.h SUNRPC: Add API to force the client to disconnect 2022-10-06 09:52:09 -04:00
debug.h
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5_enctypes.h
gss_krb5.h
metrics.h
msg_prot.h
rpc_pipe_fs.h SUNRPC: ensure the matching upcall is in-flight upon downcall 2023-01-12 12:01:56 +01:00
rpc_rdma_cid.h
rpc_rdma.h
sched.h SUNRPC: remove the maximum number of retries in call_bind_status 2023-05-11 23:03:35 +09:00
stats.h
svc_rdma_pcl.h
svc_rdma.h SUNRPC: always free ctxt when freeing deferred request 2023-05-24 17:32:45 +01:00
svc_xprt.h SUNRPC: always free ctxt when freeing deferred request 2023-05-24 17:32:45 +01:00
svc.h SUNRPC: Parametrize how much of argsize should be zeroed 2022-09-26 14:02:42 -04:00
svcauth_gss.h
svcauth.h
svcsock.h nfsd: fix double fget() bug in __write_ports_addfd() 2023-06-09 10:34:04 +02:00
timer.h
types.h
xdr.h NFSD: Refactor common code out of dirlist helpers 2022-09-26 14:02:47 -04:00
xprt.h SUNRPC: Don't reuse bvec on retransmission of the request 2022-07-27 16:26:17 -04:00
xprtmultipath.h SUNRPC export xprt_iter_rewind function 2022-07-25 10:06:04 -04:00
xprtrdma.h
xprtsock.h