[maverick, maverick/ti-omap4 CVE 3/3] cifs: check for NULL session password

Andy Whitcroft apw at canonical.com
Tue Oct 25 16:12:28 UTC 2011


From: Jeff Layton <jlayton at redhat.com>

It's possible for a cifsSesInfo struct to have a NULL password, so we
need to check for that prior to running strncmp on it.

Signed-off-by: Jeff Layton <jlayton at redhat.com>
Signed-off-by: Steve French <sfrench at us.ibm.com>

(cherry picked from commit 24e6cf92fde1f140d8eb0bf7cd24c2c78149b6b2)
CVE-2011-1585
BugLink: http://bugs.launchpad.net/bugs/869208
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 fs/cifs/connect.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 3cc37e0..5d83038 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1608,6 +1608,7 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
 				    MAX_USERNAME_SIZE))
 				continue;
 			if (strlen(vol->username) != 0 &&
+			    ses->password != NULL &&
 			    strncmp(ses->password,
 				    vol->password ? vol->password : "",
 				    MAX_PASSWORD_SIZE))
-- 
1.7.5.4





More information about the kernel-team mailing list