From: Theodore Tso <tytso@mit.edu>
To: Hank Leininger <hlein@progressive-comp.com>
Cc: linux-kernel@vger.kernel.org, alan@redhat.com, engler@csl.Stanford.EDU
Subject: Re: [CHECKER] security rules? (and 2.4.5-ac4 security bug)
Date: Sat, 9 Jun 2001 14:07:18 -0400 [thread overview]
Message-ID: <20010609140718.A2570@think.thunk.org> (raw)
In-Reply-To: <200106041220.IAA07493@mailer.progressive-comp.com>
In-Reply-To: <200106041220.IAA07493@mailer.progressive-comp.com>; from linux-kernel@progressive-comp.com on Mon, Jun 04, 2001 at 08:20:01AM -0400
On Mon, Jun 04, 2001 at 08:20:01AM -0400, Hank Leininger wrote:
> On 2001-06-03, Dawson Engler <engler@csl.Stanford.EDU> wrote:
>
> > Additionally, do people have suggestions for good security rules?
> > We're looking to expand our security checkers. Right now we just have
> > checkers that warn when:
>
> Do you already have checks for signed/unsigned issues? Those often result
> in security problems, although you may already be checking for them simply
> for reliable-code purposes. ...Hm, looking at the archives, I see Chris
> Evans responded about signedness issues when you asked last month :-P
Indeed; the bug in the uuid_strategy which you pointed out in the
random driver wasn't caused by the fact that we were using a
user-specified length (since the length was being capped to a maximum
value of 16). The security bug was that the test was done on a signed
value, and copy_to_user() takes an unsigned value.
So your checker found a real bug, but it wasn't the one that the
checker thought it was. :-)
Alan, I assume you've fixed this already, but here's a patch in case
you haven't. Note this also fixes the problem the problem pointed out
by Florian Weimer about copy_to_user being passed a null pointer in
the RANDOM_UUID case.
- Ted
--- random.c 2001/06/09 18:05:08 1.1
+++ random.c 2001/06/09 18:05:19
@@ -1793,7 +1793,7 @@
void *newval, size_t newlen, void **context)
{
unsigned char tmp_uuid[16], *uuid;
- int len;
+ unsigned int len;
if (!oldval || !oldlenp)
return 1;
@@ -1810,7 +1810,7 @@
if (len) {
if (len > 16)
len = 16;
- if (copy_to_user(oldval, table->data, len))
+ if (copy_to_user(oldval, uuid, len))
return -EFAULT;
if (put_user(len, oldlenp))
return -EFAULT;
next prev parent reply other threads:[~2001-06-09 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-04 12:20 [CHECKER] security rules? (and 2.4.5-ac4 security bug) Hank Leininger
2001-06-09 18:07 ` Theodore Tso [this message]
2001-06-10 2:13 ` Dawson Engler
-- strict thread matches above, loose matches on Subject: below --
2001-06-03 8:07 Dawson Engler
2001-06-03 11:22 ` Alan Cox
2001-06-08 11:24 ` Florian Weimer
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=20010609140718.A2570@think.thunk.org \
--to=tytso@mit.edu \
--cc=alan@redhat.com \
--cc=engler@csl.Stanford.EDU \
--cc=hlein@progressive-comp.com \
--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 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.