Files
linux/fs
Dan Carpenter 634fae934e nfsd: fix double fget() bug in __write_ports_addfd()
[ Upstream commit c034203b6a ]

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:47:54 +02:00
..
2023-05-30 14:17:25 +01:00
2023-05-11 23:16:53 +09:00
2022-08-20 11:34:33 -04:00
2023-04-05 18:06:23 -07:00
2023-05-11 23:16:49 +09:00
2023-01-19 09:24:30 +01:00
2023-01-11 15:47:40 -05:00
2022-12-21 14:45:25 +01:00