[kernel] r13211 - in dists/lenny/linux-2.6/debian: . patches/bugfix/all patches/series

Dann Frazier dannf at alioth.debian.org
Mon Mar 23 05:14:37 UTC 2009


Author: dannf
Date: Mon Mar 23 05:14:31 2009
New Revision: 13211

Log:
[cifs] Fix oops when mounting servers that don't specify their OS
(Closes: #463402)

Added:
   dists/lenny/linux-2.6/debian/patches/bugfix/all/cifs-fix-oops-in-cifs_strfromUCS_le.patch
Modified:
   dists/lenny/linux-2.6/debian/changelog
   dists/lenny/linux-2.6/debian/patches/series/14

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	(original)
+++ dists/lenny/linux-2.6/debian/changelog	Mon Mar 23 05:14:31 2009
@@ -22,6 +22,8 @@
      - Mio C520-GPS units and Mio Moov 330 GPS
      - Nokia phones: 7610, Supernova, 3500c, 3109c, 5300 and 5310
      - Nokia 6233 (Closes: #493415)
+  * [cifs] Fix oops when mounting servers that don't specify their OS
+    (Closes: #463402)
 
   [ dann frazier ]
   * Fix softlockups in sungem driver (Closes: #514624)

Added: dists/lenny/linux-2.6/debian/patches/bugfix/all/cifs-fix-oops-in-cifs_strfromUCS_le.patch
==============================================================================
--- (empty file)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/cifs-fix-oops-in-cifs_strfromUCS_le.patch	Mon Mar 23 05:14:31 2009
@@ -0,0 +1,41 @@
+commit 69765529d701c838df19ea1f5ad2f33a528261ae
+Author: Steve French <sfrench at us.ibm.com>
+Date:   Tue Feb 17 01:29:40 2009 +0000
+
+    [CIFS] Fix oops in cifs_strfromUCS_le mounting to servers which do not specify their OS
+    
+    Fixes kernel bug #10451 http://bugzilla.kernel.org/show_bug.cgi?id=10451
+    
+    Certain NAS appliances do not set the operating system or network operating system
+    fields in the session setup response on the wire.  cifs was oopsing on the unexpected
+    zero length response fields (when trying to null terminate a zero length field).
+    
+    This fixes the oops.
+    
+    Acked-by: Jeff Layton <jlayton at redhat.com>
+    CC: stable <stable at kernel.org>
+    Signed-off-by: Steve French <sfrench at us.ibm.com>
+
+Adjusted to apply to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+
+diff -urpN a/fs/cifs/sess.c b/fs/cifs/sess.c
+--- a/fs/cifs/sess.c	2008-07-13 15:51:29.000000000 -0600
++++ b/fs/cifs/sess.c	2009-03-22 23:06:06.000000000 -0600
+@@ -228,7 +228,7 @@ static int decode_unicode_ssetup(char **
+ 
+ 	kfree(ses->serverOS);
+ 	/* UTF-8 string will not grow more than four times as big as UCS-16 */
+-	ses->serverOS = kzalloc(4 * len, GFP_KERNEL);
++	ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL);
+ 	if (ses->serverOS != NULL)
+ 		cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);
+ 	data += 2 * (len + 1);
+@@ -241,7 +241,7 @@ static int decode_unicode_ssetup(char **
+ 		return rc;
+ 
+ 	kfree(ses->serverNOS);
+-	ses->serverNOS = kzalloc(4 * len, GFP_KERNEL); /* BB this is wrong length FIXME BB */
++	ses->serverNOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL);
+ 	if (ses->serverNOS != NULL) {
+ 		cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,
+ 				   nls_cp);

Modified: dists/lenny/linux-2.6/debian/patches/series/14
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/14	(original)
+++ dists/lenny/linux-2.6/debian/patches/series/14	Mon Mar 23 05:14:31 2009
@@ -33,3 +33,4 @@
 + bugfix/all/sunrpc-add-sv_maxconn-field-to-svc_serv.patch
 + bugfix/all/lockd-increase-sv_maxconn.patch
 + bugfix/all/usb-unusual-devs-update-nokia-6233.patch
++ bugfix/all/cifs-fix-oops-in-cifs_strfromUCS_le.patch



More information about the Kernel-svn-changes mailing list