From: Russell King <rmk@arm.linux.org.uk>
To: Chris Evans <chris@scary.beasts.org>
Cc: David Schleef <ds@schleef.org>,
Dawson Engler <engler@csl.Stanford.EDU>,
linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] copy_*_user length bugs?
Date: Wed, 18 Apr 2001 14:00:59 +0100 [thread overview]
Message-ID: <20010418140059.A442@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20010418015254.A29893@stm.lbl.gov> <Pine.LNX.4.30.0104181206130.28455-100000@ferret.lmh.ox.ac.uk>
In-Reply-To: <Pine.LNX.4.30.0104181206130.28455-100000@ferret.lmh.ox.ac.uk>; from chris@scary.beasts.org on Wed, Apr 18, 2001 at 12:14:56PM +0100
On Wed, Apr 18, 2001 at 12:14:56PM +0100, Chris Evans wrote:
> To justify this, consider if len were set to minus 2 billion. This will
> pass the sanity check, and pass the value straight on to copy_to_user. The
> copy_to_user parameter is unsigned, so this value because approximately
> +2Gb.
For ARM, this isn't a problem (we do 33-bit arithmetic in access_ok
specifically to catch this type of thing). x86 does the same thing (or
did when I wrote the code for ARM.
> Now, providing the malicious user passes a low user space pointer (e.g.
> just above 0), the kernel's virtual address space wrap check will not
> trigger because ~0 + ~2Gb does not exceed 4G. And the result is the user
> being able to read kernel memory.
But ~0 + ~2GB = ~2GB. Last time I checked, ~2GB is less than 3GB, and 3GB
is the start of kernel memory on x86. Therefore, I don't see that the
user will be able to read kernel memory.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2001-04-18 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-18 4:39 Dawson Engler
2001-04-18 8:52 ` David Schleef
2001-04-18 11:14 ` Chris Evans
2001-04-18 13:00 ` Russell King [this message]
2001-04-18 13:11 ` Chris Evans
2001-04-18 15:21 ` Andreas Schwab
2001-04-18 12:18 ` Richard B. Johnson
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=20010418140059.A442@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=chris@scary.beasts.org \
--cc=ds@schleef.org \
--cc=engler@csl.Stanford.EDU \
--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
all inboxes | Powered by JetHome®