From: Ian Abbott <abbotti@mev.co.uk>
To: Matteo Semenzato <mattew8898@gmail.com>,
gregkh@linuxfoundation.org, hsweeten@visionengravers.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: comedi: fix information leak
Date: Mon, 09 Mar 2015 23:34:42 +0000 [thread overview]
Message-ID: <54FE2E12.4000108@mev.co.uk> (raw)
In-Reply-To: <1425931697-10301-1-git-send-email-mattew8898@gmail.com>
On 09/03/15 20:08, Matteo Semenzato wrote:
> From: Matteo Semenzato <mattew8898@gmail.com>
>
> The comedi_cmd struct has an hole after chanlist_len that could contain uninitialized
> memory, this struct is copied to userspace.
>
> Signed-off-by: Matteo Semenato <mattew8898@gmail.com>
> ---
> drivers/staging/comedi/comedi_fops.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> index 727640e..1cdf0a2 100644
> --- a/drivers/staging/comedi/comedi_fops.c
> +++ b/drivers/staging/comedi/comedi_fops.c
> @@ -1718,6 +1718,8 @@ static int do_cmdtest_ioctl(struct comedi_device *dev,
> unsigned int __user *user_chanlist;
> int ret;
>
> + memset(&cmd, 0, sizeof(cmd));
> +
> /* get the user's cmd and do some simple validation */
> ret = __comedi_get_user_cmd(dev, arg, &cmd);
> if (ret)
>
I see no information leak there. The cmd variable gets copied over with
user memory by the call to __comedi_get_user_cmd(), so zero-filling it
first is rather pointless.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
next prev parent reply other threads:[~2015-03-09 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 20:08 [PATCH] Staging: comedi: fix information leak Matteo Semenzato
2015-03-09 23:34 ` Ian Abbott [this message]
2015-03-10 6:44 ` Dan Carpenter
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=54FE2E12.4000108@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mattew8898@gmail.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