kernel_samsung_a53x/include/linux/sunrpc
Dan Carpenter b85d90d836 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: 3064639423c4 ("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>
2024-11-19 12:28:32 +01: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 SUNRPC: Move definition of XDR_UNIT 2024-11-19 12:27:28 +01:00
rpc_pipe_fs.h
rpc_rdma.h
rpc_rdma_cid.h
sched.h
stats.h
svc.h SUNRPC: Parametrize how much of argsize should be zeroed 2024-11-19 12:28:23 +01:00
svc_rdma.h SUNRPC: Rename svc_encode_read_payload() 2024-11-19 12:27:20 +01:00
svc_xprt.h SUNRPC: Remove svc_shutdown_net() 2024-11-19 12:27:54 +01:00
svcauth.h SUNRPC: Add svc_rqst::rq_auth_stat 2024-11-19 12:27:45 +01:00
svcauth_gss.h
svcsock.h nfsd: fix double fget() bug in __write_ports_addfd() 2024-11-19 12:28:32 +01:00
timer.h
types.h
xdr.h NFSD: Refactor common code out of dirlist helpers 2024-11-19 12:28:23 +01:00
xprt.h
xprtmultipath.h
xprtrdma.h
xprtsock.h