public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [CHECKER] security rules?  (and 2.4.5-ac4 security bug)
@ 2001-06-04 12:20 Hank Leininger
  2001-06-09 18:07 ` Theodore Tso
  0 siblings, 1 reply; 6+ messages in thread
From: Hank Leininger @ 2001-06-04 12:20 UTC (permalink / raw)
  To: linux-kernel

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

You may want to check out and/or subscribe to the security-audit list; most
of the discussion is about userland security issues but kernel problems (or
potential  ones) are discussed as well.  We have archives of the list at:
http://marc.theaimsgroup.com/?l=linux-security-audit&r=1&w=2
And see http://www.linuxhelp.org/lsap.shtml for more info, subscribing,
etc.

--
Hank Leininger <hlein@progressive-comp.com> 
  

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [CHECKER] security rules?  (and 2.4.5-ac4 security bug)
@ 2001-06-03  8:07 Dawson Engler
  2001-06-03 11:22 ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Dawson Engler @ 2001-06-03  8:07 UTC (permalink / raw)
  To: linux-kernel

Hi All,

Enclosed is a potential security hole in 2.4.5-ac where an integer from
user space is used as a length argument to copy_to_user.

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:

	1. user pointers are dereferenced

	2. an integer from user space is used as a length argument to
	   copy*user or as an array index. (this is getting extended
	   to include data from network packets)

	3. user input can trigger a known bug (e.g., the failed release of
	a lock, or a copy_*_user call with interrupts disabled).

more preliminary:
	(4) a checker that derives when you're supposed to
	    do an capable? call and warns when you don't.

	(5) checkers to find typical format string bugs.

I'm sure there are a huge set of security holes that are not covered by
these sorts of checks, so if anyone has suggestions, please let us know.

Dawson

PS Someone from world.std.com (I believe) sent a nice rule yesterday,
   but I accidently deleted the message --- could you please resend?


[BUG]
/u2/engler/mc/oses/linux/2.4.5-ac4/drivers/char/random.c:1813:uuid_strategy: ERROR:RANGE:1809:1813: Using user length "len" as argument to "copy_to_user" [type=LOCAL] set by 'get_user':1813

                uuid[8] = 0;
        }
        if (uuid[8] == 0)
                generate_random_uuid(uuid);

Start --->
        get_user(len, oldlenp);
        if (len) {
                if (len > 16)
                        len = 16;
Error --->
                if (copy_to_user(oldval, table->data, len))
                        return -EFAULT;
                if (put_user(len, oldlenp))
                        return -EFAULT;


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-06-10  2:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-04 12:20 [CHECKER] security rules? (and 2.4.5-ac4 security bug) Hank Leininger
2001-06-09 18:07 ` Theodore Tso
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox