LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de> To: linux-kernel@vger.kernel.org, stable@kernel.org, Greg KH <greg@kroah.com> Cc: Justin Forbes <jmforbes@linuxtx.org>, Zwane Mwaikambo <zwane@arm.linux.org.uk>, "Theodore Ts'o" <tytso@mit.edu>, Randy Dunlap <rdunlap@xenotime.net>, Dave Jones <davej@redhat.com>, Chuck Wolber <chuckw@quantumlinux.com>, Chris Wedgwood <reviews@ml.cw.f00f.org>, Michael Krufky <mkrufky@linuxtv.org>, Chuck Ebbert <cebbert@redhat.com>, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Shirish Pargaonkar <shirishp@us.ibm.com>, Steve French <sfrench@us.ibm.com> Subject: [patch 6/9] Fix oops when Windows server sent bad domain name null terminator Date: Mon, 26 Feb 2007 16:06:35 -0800 [thread overview] Message-ID: <20070227000635.GG6283@kroah.com> (raw) In-Reply-To: <20070227000538.GA6283@kroah.com> [-- Attachment #1: fix-oops-when-windows-server-sent-bad-domain-name-null-terminator.patch --] [-- Type: text/plain, Size: 1434 bytes --] -stable review patch. If anyone has any objections, please let us know. ------------------ From: Steve French <sfrench@us.ibm.com> [CIFS] Fix oops when Windows server sent bad domain name null terminator Fixes RedHat bug 211672 Windows sends one byte (instead of two) of null to terminate final Unicode string (domain name) in session setup response in some cases - this caused cifs to misalign some informational strings (making it hard to convert from UCS16 to UTF8). Thanks to Shaggy for his help and Akemi Yagi for debugging/testing Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- fs/cifs/sess.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- linux-2.6.19.5.orig/fs/cifs/sess.c +++ linux-2.6.19.5/fs/cifs/sess.c @@ -182,11 +182,14 @@ static int decode_unicode_ssetup(char ** cFYI(1,("bleft %d",bleft)); - /* word align, if bytes remaining is not even */ - if(bleft % 2) { - bleft--; - data++; - } + /* SMB header is unaligned, so cifs servers word align start of + Unicode strings */ + data++; + bleft--; /* Windows servers do not always double null terminate + their final Unicode string - in which case we + now will not attempt to decode the byte of junk + which follows it */ + words_left = bleft / 2; /* save off server operating system */ --
next prev parent reply other threads:[~2007-02-27 0:08 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20070226235248.438556696@mini.kroah.org> 2007-02-27 0:05 ` [patch 0/9] 2.6.19-stable review Greg KH 2007-02-27 0:06 ` [patch 1/9] fix umask when noACL kernel meets extN tuned for ACLs Greg KH 2007-02-27 0:28 ` Andreas Gruenbacher 2007-02-27 0:06 ` [patch 2/9] Backport of psmouse suspend/shutdown cleanups Greg KH 2007-02-27 0:06 ` [patch 3/9] fix memory corruption from misinterpreted bad_inode_ops return values (CVE-2006-5753) Greg KH 2007-02-27 0:06 ` [patch 4/9] netpoll: drivers must not enable IRQ unconditionally in their NAPI handler Greg KH 2007-02-27 0:06 ` [patch 5/9] hda-intel - Dont try to probe invalid codecs Greg KH 2007-02-27 0:06 ` Greg KH [this message] 2007-02-27 0:06 ` [patch 7/9] USB: usbnet driver bugfix Greg KH 2007-02-27 0:06 ` [patch 8/9] hda-codec - Dont return error at initialization of modem codec Greg KH 2007-02-27 0:06 ` [patch 9/9] Missing critical phys_to_virt in lib/swiotlb.c Greg KH 2007-02-27 2:47 ` [patch 0/9] 2.6.19-stable review (mmc: Power quirk for ENE controllers) Darren Salt 2007-02-27 20:23 ` [patch 0/9] 2.6.19-stable review Michael Krufky 2007-03-03 1:23 ` Greg KH 2007-03-03 1:48 ` Michael Krufky 2007-03-03 7:48 ` Greg KH
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070227000635.GG6283@kroah.com \ --to=gregkh@suse.de \ --cc=akpm@linux-foundation.org \ --cc=alan@lxorguk.ukuu.org.uk \ --cc=cebbert@redhat.com \ --cc=chuckw@quantumlinux.com \ --cc=davej@redhat.com \ --cc=greg@kroah.com \ --cc=jmforbes@linuxtx.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mkrufky@linuxtv.org \ --cc=rdunlap@xenotime.net \ --cc=reviews@ml.cw.f00f.org \ --cc=sfrench@us.ibm.com \ --cc=shirishp@us.ibm.com \ --cc=stable@kernel.org \ --cc=torvalds@linux-foundation.org \ --cc=tytso@mit.edu \ --cc=zwane@arm.linux.org.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).