NFSD: Prevent NULL dereference in nfsd4_process_cb_update()

BugLink: https://bugs.launchpad.net/bugs/2101915

[ Upstream commit 1e02c641c3a43c88cecc08402000418e15578d38 ]

@ses is initialized to NULL. If __nfsd4_find_backchannel() finds no
available backchannel session, setup_callback_client() will try to
dereference @ses and segfault.

Fixes: dcbeaa68db ("nfsd4: allow backchannel recovery")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
CVE-2024-53217
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
Chuck Lever
2025-03-11 08:51:19 +09:00
committed by Stefan Bader
parent 0b1a6e0e11
commit 951cf3bc52
+2
View File
@@ -1450,6 +1450,8 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
ses = c->cn_session;
}
spin_unlock(&clp->cl_lock);
if (!c)
return;
err = setup_callback_client(clp, &conn, ses);
if (err) {