From: "Jörn Engel" <joern@logfs.org>
To: Przemyslaw Wegrzyn <czajnik@czajsoft.pl>
Cc: linux-kernel@vger.kernel.org, Steve French <smfrench@austin.rr.com>
Subject: Re: Buffer overflow in CIFS VFS.
Date: Thu, 8 Nov 2007 23:28:24 +0100 [thread overview]
Message-ID: <20071108222824.GD18903@lazybastard.org> (raw)
In-Reply-To: <47337D83.5040706@czajsoft.pl>
Not everyone has the time to read lkml. Added Steve to Cc:, just in
case.
On Thu, 8 November 2007 22:20:03 +0100, Przemyslaw Wegrzyn wrote:
>
> I was looking at CIFS VFS code recently, trying to solve other issue,
> just to find something that looks like a buffer overflow bug.
> The problem is in SendReceive() function in transport.c - it memcpy's
> message payload into a buffer passed via out_buf param. The function
> assumes that all buffers are of size (CIFSMaxBufSize +
> MAX_CIFS_HDR_SIZE) , unfortunately it is also called with smaller
> (MAX_CIFS_SMALL_BUFFER_SIZE) buffers.
>
> To check this finding I patched Samba server to send oversized logoffX
> messages. With ~ 16kB messages the client running 2.6.23.1 crashed upon
> unmounting.
>
> I've done a quick fix, available here:
> http://czajnick.sitenet.pl/cifs-buffer-overflow-fix.patch.gz
Jörn
--
When in doubt, punt. When somebody actually complains, go back and fix it...
The 90% solution is a good thing.
-- Rob Landley
prev parent reply other threads:[~2007-11-08 22:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 21:20 Przemyslaw Wegrzyn
2007-11-08 22:28 ` Jörn Engel [this message]
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=20071108222824.GD18903@lazybastard.org \
--to=joern@logfs.org \
--cc=czajnik@czajsoft.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=smfrench@austin.rr.com \
/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®