From: viro@parcelfarce.linux.theplanet.co.uk
To: "Robert T. Johnson" <rtjohnso@eecs.berkeley.edu>
Cc: Markus.Lidel@shadowconnect.com,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: PATCH: 2.6.7-rc3 drivers/message/i2o/i2o_config.c: user/kernel pointer bugs
Date: Thu, 10 Jun 2004 02:37:34 +0100 [thread overview]
Message-ID: <20040610013734.GZ12308@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1086822062.32052.129.camel@dooby.cs.berkeley.edu>
On Wed, Jun 09, 2004 at 04:01:02PM -0700, Robert T. Johnson wrote:
> Since arg is a user pointer, accessing values like cmd->iop requires an
> unsafe user pointer dereference.
>
> QUESTION: Does ioctl_passthru mean arg is a kernel pointer? If so, then
> disregard this bug report.
No - we have ->ioctl [== cfg_ioctl()] -> ioctl_passthru() chain in there,
so at the very least it can get arbitrary pointers straight from userland.
And yes, these cmd->iop and cmd->msg dereferences are broken.
> + if (copy_from_user(&cmd, (void *)arg, sizeof(cmd)))
> + return -EFAULT;
Fix the indentation, please.
> - memset(&msg, 0, MSG_FRAME_SIZE*4);
> + memset(msg, 0, MSG_FRAME_SIZE*4);
Not needed; they are equivalent and both legitimate. So that just clutters
the patch.
> - memset(&msg, 0, MSG_FRAME_SIZE*4);
> + memset(msg, 0, MSG_FRAME_SIZE*4);
Ditto.
next prev parent reply other threads:[~2004-06-10 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-09 23:01 Robert T. Johnson
2004-06-10 1:37 ` viro [this message]
2004-06-10 4:03 ` Robert T. Johnson
2004-06-11 6:24 ` Markus Lidel
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=20040610013734.GZ12308@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=Markus.Lidel@shadowconnect.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtjohnso@eecs.berkeley.edu \
/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®