Files
linux/fs/nfsd
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
..
2021-12-03 18:44:06 +01:00
2022-11-28 12:54:44 -05:00
2023-03-10 09:38:47 -05:00
2021-10-02 15:51:10 -04:00
2022-09-26 14:02:47 -04:00
2022-10-20 10:13:27 +02:00
2022-11-28 12:54:44 -05:00
2022-09-26 14:02:47 -04:00
2021-12-13 13:42:51 -05:00
2023-02-20 09:20:21 -05:00