From: Alasdair G Kergon <agk@redhat.com>
To: Adrian Salido <salidoa@google.com>
Cc: dm-devel@redhat.com, snitzer@redhat.com, agk@redhat.com
Subject: Re: [PATCH] dm ioctl: prevent stack leak in dm ioctl call
Date: Wed, 26 Apr 2017 02:06:09 +0100 [thread overview]
Message-ID: <20170426010608.GD7433@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <CAEP91RG_9i80LpiGY+qSrcpcOt-F1ziUXAttSX2GUGFMsD8G6g@mail.gmail.com>
On Tue, Apr 25, 2017 at 05:57:41PM -0700, Adrian Salido wrote:
> 1. param_kernel is allocated from stack and passed to copy_params
> 2. copy_params only copies up to param_kernel->data from user
> (param_kernel->data still contains stack contents)
> 3. in copy_params, since there are no params it will skip through and
> return param = dmi = param_kernel
after setting
dmi->data_size = minimum_data_size;
and then
input_param_size = param->data_size;
> 4. that stale data is copied back to user
because it is incorrectly extending the buffer?
param->data_size = sizeof(*param);
instead of continuing to use input_param_size?
Alasdair
next prev parent reply other threads:[~2017-04-26 1:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170425233129.GA155598@google.com>
2017-04-26 0:11 ` [PATCH] dm ioctl: prevent stack leak in dm ioctl call Alasdair G Kergon
[not found] ` <CAEP91RFJTRk7Ux3W=1TMfgjzF1cMc5jXF+om4Qchh8RDx84MtQ@mail.gmail.com>
2017-04-26 0:42 ` Alasdair G Kergon
[not found] ` <CAEP91RG_9i80LpiGY+qSrcpcOt-F1ziUXAttSX2GUGFMsD8G6g@mail.gmail.com>
2017-04-26 1:06 ` Alasdair G Kergon [this message]
2017-04-27 15:43 ` Alasdair G Kergon
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=20170426010608.GD7433@agk-dp.fab.redhat.com \
--to=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=salidoa@google.com \
--cc=snitzer@redhat.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 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.