From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: devel@driverdev.osuosl.org, security@kernel.org,
netdev@vger.kernel.org,
Philippe Ombredanne <pombredanne@nexb.com>,
Thomas Gleixner <tglx@linutronix.de>,
Petr Vandrovec <petr@vandrovec.name>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] ncpfs: memory corruption in ncp_read_kernel()
Date: Mon, 19 Mar 2018 14:56:13 +0100 [thread overview]
Message-ID: <20180319135612.GA2465@kroah.com> (raw)
In-Reply-To: <20180319110745.GA12001@mwanda>
On Mon, Mar 19, 2018 at 02:07:45PM +0300, Dan Carpenter wrote:
> If the server is malicious then *bytes_read could be larger than the
> size of the "target" buffer. It would lead to memory corruption when we
> do the memcpy().
>
> Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/staging/ncpfs/ncplib_kernel.c b/drivers/staging/ncpfs/ncplib_kernel.c
> index 804adfebba2f..3e047eb4cc7c 100644
> --- a/drivers/staging/ncpfs/ncplib_kernel.c
> +++ b/drivers/staging/ncpfs/ncplib_kernel.c
Ugh, I have like 2 more months before I delete this code :)
Anyway, nice find, and fix, I'll go queue it up now, thanks.
greg k-h
prev parent reply other threads:[~2018-03-19 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+ygN1LiXW3uNuMS-eRv5Y_WJNyyr77+Rgycec4Y-Ju2VGrNWA@mail.gmail.com>
2018-03-19 11:07 ` [PATCH] ncpfs: memory corruption in ncp_read_kernel() Dan Carpenter
2018-03-19 13:56 ` Greg Kroah-Hartman [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=20180319135612.GA2465@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=petr@vandrovec.name \
--cc=pombredanne@nexb.com \
--cc=security@kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.