linux-stable/include/linux/sunrpc
Dan Carpenter c034203b6a nfsd: fix double fget() bug in __write_ports_addfd()
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>
2023-05-31 09:57:14 -04:00
..
addr.h
auth.h
auth_gss.h
bc_xprt.h
cache.h SUNRPC: return proper error from get_expiry() 2023-04-26 09:05:00 -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.h SUNRPC: Move remaining internal definitions to gss_krb5_internal.h 2023-02-20 09:20:46 -05:00
metrics.h
msg_prot.h SUNRPC: Convert svcauth_unix_accept() to use xdr_stream 2023-02-20 09:20:11 -05:00
rpc_pipe_fs.h SUNRPC: ensure the matching upcall is in-flight upon downcall 2022-12-15 18:13:53 -05:00
rpc_rdma.h
rpc_rdma_cid.h
sched.h NFS Client Updates for Linux 6.1 2022-10-13 09:58:42 -07:00
stats.h
svc.h SUNRPC: Relocate svc_free_res_pages() 2023-04-26 09:05:01 -04:00
svc_rdma.h SUNRPC: always free ctxt when freeing deferred request 2023-05-14 15:55:02 -04:00
svc_rdma_pcl.h
svc_xprt.h SUNRPC: always free ctxt when freeing deferred request 2023-05-14 15:55:02 -04:00
svcauth.h
svcauth_gss.h
svcsock.h nfsd: fix double fget() bug in __write_ports_addfd() 2023-05-31 09:57:14 -04:00
timer.h
types.h
xdr.h SUNRPC: Push svcxdr_init_encode() into svc_process_common() 2023-02-20 09:20:27 -05:00
xprt.h
xprtmultipath.h
xprtrdma.h
xprtsock.h