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

    cifs: fix NULL pointer dereference in cifs_find_smb_ses

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

The filename of the patch is:
     cifs-fix-null-pointer-dereference-in-cifs_find_smb_ses.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From fc87a40677bbe0937e2ff0642c7e83c9a4813f3d Mon Sep 17 00:00:00 2001
From: Jeff Layton <[email protected]>
Date: Wed, 18 Aug 2010 13:13:39 -0400
Subject: cifs: fix NULL pointer dereference in cifs_find_smb_ses

From: Jeff Layton <[email protected]>

commit fc87a40677bbe0937e2ff0642c7e83c9a4813f3d upstream.

cifs_find_smb_ses assumes that the vol->password field is a valid
pointer, but that's only the case if a password was passed in via
the options string. It's possible that one won't be if there is
no mount helper on the box.

Reported-by: diabel <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Steve French <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/cifs/connect.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1605,7 +1605,8 @@ cifs_find_smb_ses(struct TCP_Server_Info
                                    MAX_USERNAME_SIZE))
                                continue;
                        if (strlen(vol->username) != 0 &&
-                           strncmp(ses->password, vol->password,
+                           strncmp(ses->password,
+                                   vol->password ? vol->password : "",
                                    MAX_PASSWORD_SIZE))
                                continue;
                }


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/cifs-fix-null-pointer-dereference-in-cifs_find_smb_ses.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/cifs-clean-up-cifs_find_smb_ses-try-2.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/cifs-check-for-null-session-password.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to