From: "Mark Peloquin" <peloquin@us.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, evms-devel@lists.sourceforge.ne
Subject: Re: [Evms-devel] Re: [PATCH] EVMS core 3/4: evms_ioctl.h
Date: Fri, 4 Oct 2002 09:44:16 -0500 [thread overview]
Message-ID: <OF3A568674.694920EA-ON85256C48.004FE459@pok.ibm.com> (raw)
On 10/03/2002 at 6:49 PM, Andi Kleen wrote:
> I think you have some security holes in there:
> +parms.buffer_address = (u8 *)uvirt_to_kernel(parms32.buffer_address);
> [...]
> +set_fs(KERNEL_DS);
> +rc = sys_ioctl(fd, kcmd, (unsigned long)karg);
> +set_fs(old_fs);
> parms32.buffer_address comes from user space. With the set_fs you turn
> off all access checking. Surely when whatever sits at the bottom of
> sys_ioctl accesses it it'll use copy_from/to_user and it will do an
> unchecked reference of a user supplied pointer, allowing it to read/write
> all memory.
> Same bug is present in more functions.
> The rule is: when you do set_fs(KERNEL_DS) you have to copy all user
supplied
> pointers before it.
Yes, we became aware of this while working on sparc64 and have
coded the appropriate copy *before* set_fs(KERNEL_DS).
Unfortunately, that code didn't make it into CVS yet.
This will be fixed ASAP.
Thanks for pointing it out.
Mark
next reply other threads:[~2002-10-04 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-04 14:44 Mark Peloquin [this message]
2002-10-07 16:43 [Evms-devel] Re: [PATCH] EVMS core 3/4: evms_ioctl.h Mark Peloquin
2002-10-07 17:34 ` Christoph Hellwig
2002-10-07 17:50 ` Alexander Viro
2002-10-07 18:40 ` Christoph Hellwig
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=OF3A568674.694920EA-ON85256C48.004FE459@pok.ibm.com \
--to=peloquin@us.ibm.com \
--cc=ak@suse.de \
--cc=evms-devel@lists.sourceforge.ne \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).