Patch "NFSD: Prevent NULL dereference in nfsd4_process_cb_update()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    NFSD: Prevent NULL dereference in nfsd4_process_cb_update()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsd-prevent-null-dereference-in-nfsd4_process_cb_up.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b681176e2772e1af459d6987e8f2a612051b6e59
Author: Chuck Lever <chuck.lever@xxxxxxxxxx>
Date:   Thu Oct 17 11:03:53 2024 -0400

    NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
    
    [ 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: dcbeaa68dbbd ("nfsd4: allow backchannel recovery")
    Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
    Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index e6c7448d3d89a..8ca4c12dd22ec 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -1134,6 +1134,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) {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux