public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: AUDIT: copy_from_user is a deathtrap.
@ 2002-05-19  3:38 Rusty Russell
  2002-05-19  5:23 ` Linus Torvalds
  0 siblings, 1 reply; 14+ messages in thread
From: Rusty Russell @ 2002-05-19  3:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, alan

> Um, what about delivering a SIGSEGV?  So, copy_to/from_user always
> returns 0, but a signal is delivered.  Then the only places which need
> to be clever are the mount option copying, and the signal delivery
> code for SIGSEGV (which uses copy_to_user).

Sorry, this doesn't work here either: this would return the wrong
value from read.

Of course, everyone who does more than one copy_to_user should be
checking that return value, and not doing:

	if (copy_to_user(uptr....) 
	   || copy_to_user(uptr+10,....) 
		return -EFAULT

So that such gc schemes actually work,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

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

end of thread, other threads:[~2002-05-21 20:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-19  3:38 AUDIT: copy_from_user is a deathtrap Rusty Russell
2002-05-19  5:23 ` Linus Torvalds
2002-05-17  0:00   ` Pavel Machek
2002-05-18 21:47   ` Benjamin Herrenschmidt
2002-05-19 12:22     ` Alan Cox
2002-05-19 18:29     ` Linus Torvalds
2002-05-19 19:57       ` Roman Zippel
2002-05-20  2:06       ` Rusty Russell
2002-05-20  2:54         ` Linus Torvalds
2002-05-19 17:59           ` [BK PATCH] char: " Arnaldo Carvalho de Melo
2002-05-20  4:53           ` Rusty Russell
2002-05-19 20:12             ` Arnaldo Carvalho de Melo
2002-05-20 16:00             ` Linus Torvalds
2002-05-19 11:41   ` Alan Cox

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