mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: "Renato S. Yamane" <yamane@diamondcut.com.br>
Cc: torvalds@linux-foundation.org, sfrench@gmail.com,
	linux-kernel@vger.kernel.org, stable@kernel.org,
	linux-cifs-client@lists.samba.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] cifs: fix buffer overrun in parse_DFS_referrals
Date: Wed, 17 Dec 2008 10:49:53 -0500	[thread overview]
Message-ID: <20081217104953.2c6fc497@tleilax.poochiereds.net> (raw)
In-Reply-To: <49491D88.3020106@diamondcut.com.br>

On Wed, 17 Dec 2008 13:40:56 -0200
"Renato S. Yamane" <yamane@diamondcut.com.br> wrote:

> Jeff Layton wrote:
> > ---
> >  fs/cifs/cifssmb.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> > index 9395928..824df14 100644
> > --- a/fs/cifs/cifssmb.c
> > +++ b/fs/cifs/cifssmb.c
> > @@ -3992,7 +3992,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
> >  
> >  		node->flags = le16_to_cpu(pSMBr->DFSFlags);
> >  		if (is_unicode) {
> > -			__le16 *tmp = kmalloc(strlen(searchName)*2, GFP_KERNEL);
> > +			__le16 *tmp = kmalloc(strlen(searchName)*2 + 2,
> > +						GFP_KERNEL);
> >  			cifsConvertToUCS((__le16 *) tmp, searchName,
> >  					PATH_MAX, nls_codepage, remap);
> >  			node->path_consumed = hostlen_fromUCS(tmp,
> 
> This patch can't be applied in -stable release:
> 
> yamane@mandachuva:~/kernel/linux-2.6.27.9$ patch -p1 < cifs.patch
> patching file fs/cifs/cifssmb.c
> patch unexpectedly ends in middle of line
> Hunk #1 FAILED at 3992.
> 1 out of 1 hunk FAILED -- saving rejects to file fs/cifs/cifssmb.c.rej
> 

My apologies. The patch that introduced this problem isn't in stable
releases. You can drop this patch from stable queue. Sorry for false alarm.

It would be good for 2.6.28 kernels though since it's a regression and
possible memory corruptor.

Thanks,
-- 
Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2008-12-17 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 11:31 Jeff Layton
2008-12-17 15:40 ` Renato S. Yamane
2008-12-17 15:49   ` Jeff Layton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-16 15:04 Jeff Layton
2008-12-17  3:34 ` Steve French

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=20081217104953.2c6fc497@tleilax.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=linux-cifs-client@lists.samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfrench@gmail.com \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yamane@diamondcut.com.br \
    /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: link
Be 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

all inboxes | Powered by JetHome®