From: Vasiliy Kulikov <segooon@gmail.com>
To: "Miller, Mike (OS Dev)" <Mike.Miller@hp.com>
Cc: "kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Jens Axboe <jaxboe@fusionio.com>,
"Stephen M. Cameron" <scameron@beardog.cce.hp.com>,
Andrew Morton <akpm@linux-foundation.org>,
ISS StorageDev <iss_storagedev@hp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] block: cciss: fix information leak to userland
Date: Wed, 27 Oct 2010 15:43:12 +0000 [thread overview]
Message-ID: <20101027154312.GA9008@albatros> (raw)
In-Reply-To: <0F5B06BAB751E047AB5C87D1F77A77887D0E280943@GVW0547EXC.americas.hpqcorp.net>
Hi Mike,
On Mon, Oct 25, 2010 at 16:36 +0000, Miller, Mike (OS Dev) wrote:
>
>
> > -----Original Message-----
> > From: Miller, Mike (OS Dev)
> > Sent: Monday, October 25, 2010 9:41 AM
> > To: Vasiliy Kulikov; kernel-janitors@vger.kernel.org
> > Cc: Jens Axboe; Stephen M. Cameron; Andrew Morton; ISS StorageDev;
> > linux-kernel@vger.kernel.org
> > Subject: RE: [PATCH 1/2] block: cciss: fix information leak to userland
> >
> >
> >
> > > -----Original Message-----
> > > From: Vasiliy Kulikov [mailto:segooon@gmail.com]
> > > Sent: Saturday, October 23, 2010 3:25 AM
> > > To: kernel-janitors@vger.kernel.org
> > > Cc: Miller, Mike (OS Dev); Jens Axboe; Stephen M. Cameron;
> > > Andrew Morton; ISS StorageDev; linux-kernel@vger.kernel.org
> > > Subject: [PATCH 1/2] block: cciss: fix information leak to userland
> > >
> > > Structure IOCTL_Command_struct is copied to userland with
> > > some padding fields at the end of the struct unitialized.
> > > It leads to leaking of stack memory.
> > >
> > > Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> > > ---
> > > drivers/block/cciss.c | 1 +
> > > 1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> > > index 762a81a..cd08324 100644
> > > --- a/drivers/block/cciss.c
> > > +++ b/drivers/block/cciss.c
> > > @@ -1142,6 +1142,7 @@ static int
> > > cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode,
> > > int err;
> > > u32 cp;
> > >
> > > + memset(&arg64, 0, sizeof(arg64));
> > > err = 0;
> > > err |> > > copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
> > > --
> >
> > Acked-by: Mike Miller <mike.miller@hp.com>
>
> BTW: this change needs to go into the cciss_ioctl32_big_passthru
I've sent the patch, thanks.
> and the other passthru ioctls, also.
I don't see problems with them, they do copy_from_user() before
filling the structure.
>
> -- mikem
>
> >
> > > 1.7.0.4
> > >
> > >
Thanks,
--
Vasiliy
prev parent reply other threads:[~2010-10-27 15:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 8:25 [PATCH 1/2] block: cciss: fix information leak to userland Vasiliy Kulikov
2010-10-25 14:03 ` scameron
2010-10-25 14:40 ` Miller, Mike (OS Dev)
2010-10-25 16:36 ` Miller, Mike (OS Dev)
2010-10-27 15:43 ` Vasiliy Kulikov [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=20101027154312.GA9008@albatros \
--to=segooon@gmail.com \
--cc=Mike.Miller@hp.com \
--cc=akpm@linux-foundation.org \
--cc=iss_storagedev@hp.com \
--cc=jaxboe@fusionio.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scameron@beardog.cce.hp.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