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: 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>
2023-05-31 09:57:14 -04:00
..
2022-08-10 14:04:32 -07:00
2023-02-15 10:33:00 -05:00
2022-05-19 12:25:38 -04:00
2022-05-19 12:25:38 -04:00
2022-10-13 09:58:42 -07:00
2020-03-16 12:04:33 -04:00
2021-07-08 14:03:23 -04:00
2023-02-22 14:21:40 -08:00