Re: AUDIT of 2.5.15 copy_to/from_user

Rusty Russell
2002-05-20T01:35:44Z

In message <E179P70-0003dg-00@the-village.bc.nu> you write:
> Looking at 2.4.1x which has the same signal code
>
> > arch/i386/kernel/signal.c:37: return __copy_to_user(to, from,
sizeof(siginfo_t));
>
> not a bug

Disagree. May not cause problems at the moment, but a function which
does:

if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
return -EFAULT;
if (from->si_code < 0)
return __copy_to_user(to, from, sizeof(siginfo_t));

Is clearly wrong,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.