android_kernel_msm-6.1_noth.../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.h
auth_gss.h
bc_xprt.h
cache.h
clnt.h
debug.h
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h
gss_krb5_enctypes.h
metrics.h
msg_prot.h
rpc_pipe_fs.h
rpc_rdma.h
rpc_rdma_cid.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.h
svc_rdma.h SUNRPC: always free ctxt when freeing deferred request 2023-05-24 17:32:45 +01:00
svc_rdma_pcl.h
svc_xprt.h SUNRPC: always free ctxt when freeing deferred request 2023-05-24 17:32:45 +01:00
svcauth.h
svcauth_gss.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
xprt.h
xprtmultipath.h
xprtrdma.h
xprtsock.h