Re: AUDIT of 2.5.15 copy_to/from_user

Rusty Russell (rusty@rustcorp.com.au)
Mon, 20 May 2002 11:38:32 +1000


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.
-
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/