[kernel] add 2.6.23 security fixes for rb532 missed in 8.09.1
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.23 / 994-cve-2009-1439.patch
1 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1439
2
3 --- a/fs/cifs/connect.c
4 +++ b/fs/cifs/connect.c
5 @@ -3398,14 +3398,11 @@ CIFSTCon(unsigned int xid, struct cifsSe
6 BCC(smb_buffer_response)) {
7 kfree(tcon->nativeFileSystem);
8 tcon->nativeFileSystem =
9 - kzalloc(length + 2, GFP_KERNEL);
10 + kzalloc((4 * length) + 2, GFP_KERNEL);
11 cifs_strfromUCS_le(tcon->nativeFileSystem,
12 (__le16 *) bcc_ptr,
13 length, nls_codepage);
14 - bcc_ptr += 2 * length;
15 - bcc_ptr[0] = 0; /* null terminate the string */
16 - bcc_ptr[1] = 0;
17 - bcc_ptr += 2;
18 + bcc_ptr += (2 * length) + 2;
19 }
20 /* else do not bother copying these information fields*/
21 } else {