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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Jun 2017 07:24:37 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     "Edward A. James" <eajames@...ibm.com>
Cc:     linux-kernel@...r.kernel.org, bradleyb@...ziesquirrel.com,
        jk@...abs.org, cbostic@...ux.vnet.ibm.com, joel@....id.au,
        andrew@...id.au
Subject: Re: [PATCH linux] drivers/fsi: Add SBEFIFO FSI client device driver

On Wed, Jun 14, 2017 at 02:47:27PM -0500, Edward A. James wrote:
> +static ssize_t sbefifo_read(struct file *file, char __user *buf,
> +		size_t len, loff_t *offset)
> +{
> +	struct sbefifo_client *client = file->private_data;
> +
> +	WARN_ON(*offset);

Huh?  Why?

> +	if (!access_ok(VERIFY_WRITE, buf, len))
> +		return -EFAULT;

What does this check?  You should never need to call access_ok in any
driver, copy_from/to_user handles that all for you just fine.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ