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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1010291141520.6879@pobox.suse.cz>
Date:	Fri, 29 Oct 2010 11:42:02 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Nicolas Kaiser <nikai@...ai.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] telephony: fix return value

On Tue, 26 Oct 2010, Nicolas Kaiser wrote:

> If copy_from_user fails, the return value gets overwritten.
> 
> Signed-off-by: Nicolas Kaiser <nikai@...ai.net>
> ---
>  drivers/telephony/ixj.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
> index 0d236f4..2d1280a 100644
> --- a/drivers/telephony/ixj.c
> +++ b/drivers/telephony/ixj.c
> @@ -6581,7 +6581,8 @@ static long do_ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long ar
>  	case IXJCTL_SET_FILTER:
>  		if (copy_from_user(&jf, argp, sizeof(jf))) 
>  			retval = -EFAULT;
> -		retval = ixj_init_filter(j, &jf);
> +		else
> +			retval = ixj_init_filter(j, &jf);
>  		break;
>  	case IXJCTL_SET_FILTER_RAW:
>  		if (copy_from_user(&jfr, argp, sizeof(jfr))) 

Applied, thanks Nicolas.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
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