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:	Sun, 07 Oct 2012 20:04:22 -0500
From:	Larry Finger <Larry.Finger@...inger.net>
To:	Wei Yongjun <weiyj.lk@...il.com>
CC:	florian.c.schilhabel@...glemail.com, gregkh@...uxfoundation.org,
	yongjun_wei@...ndmicro.com.cn, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8712u: fix potential NULL pointer dereference
 in r871x_wps_start()

On 10/07/2012 07:43 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> The dereference should be moved below the NULL test.
>
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> ---
>   drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Larry Finger <Larry.Finger@...inger.net>

Thanks,

Larry

>
> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> index c9a6a7f..3a64790 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -2110,10 +2110,10 @@ static int r871x_wps_start(struct net_device *dev,
>   	struct iw_point *pdata = &wrqu->data;
>   	u32   u32wps_start = 0;
>
> -	if (copy_from_user((void *)&u32wps_start, pdata->pointer, 4))
> -		return -EFAULT;
>   	if ((padapter->bDriverStopped) || (pdata == NULL))
>   		return -EINVAL;
> +	if (copy_from_user((void *)&u32wps_start, pdata->pointer, 4))
> +		return -EFAULT;
>   	if (u32wps_start == 0)
>   		u32wps_start = *extra;
>   	if (u32wps_start == 1) /* WPS Start */
>
>

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