Re: AUDIT: copy_from_user is a deathtrap.

Rusty Russell (rusty@rustcorp.com.au)
Sun, 19 May 2002 12:10:38 +1000


In message <Pine.LNX.4.44.0205180910570.26742-100000@home.transmeta.com> you wr
ite:
>
>
> On 18 May 2002, Andi Kleen wrote:
> >
> > Are you sure they even exist ?
>
> Oh, like read() or write() for regular files? Yup, they exist.

Huh? No, you ask for 2000 bytes into a buffer that can only take 1000
bytes without hitting an unmapped page, returning EFAULT or giving a
SIGSEGV is perfectly acceptable.

As a coder, I'd *really* prefer that to hiding the bug!

There's only one case which really actually cares for a valid reason:
the hack in copying mount options.

Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/