lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 21 Mar 2012 11:09:41 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Sasikantha babu <sasikanth.v19@...il.com>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] setitimer : Return -EFAULT if the user pointer
 "value" is NULL

On Tue, 20 Mar 2012, Sasikantha babu wrote:

> Return -EFAULT if user  pointer "value" is  NULL.

In principle I agree, though this might break exisiting user space as
this behaviour has been there since Linux 1.1.52

So the right thing to do is to add a WARN_ONCE() in the else path and
schedule the removal of this "feature" for v3.6

> diff --git a/kernel/itimer.c b/kernel/itimer.c
> index 22000c3..f356bdf 100644
> --- a/kernel/itimer.c
> +++ b/kernel/itimer.c
> @@ -279,19 +279,18 @@ SYSCALL_DEFINE3(setitimer, int, which, struct itimerval __user *, value,
>  		struct itimerval __user *, ovalue)
>  {
>  	struct itimerval set_buffer, get_buffer;
> -	int error;
> +	int error = -EFAULT;

Instead of ripping the whole thing apart, it's way simpler to just do

	if (!value)
		return -EFAULT;

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ