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:	Fri, 26 Feb 2016 16:47:48 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Alex Williamson <alex.williamson@...hat.com>,
	Baptiste Reynal <b.reynal@...tualopensystems.com>,
	Eric Auger <eric.auger@...aro.org>,
	Antonios Motakis <a.motakis@...tualopensystems.com>,
	Julia Lawall <Julia.Lawall@...6.fr>, kvm@...r.kernel.org
Subject: Re: [PATCH for-4.5] vfio: fix ioctl error handling

On Thu, Feb 25, 2016 at 01:34:43PM +0200, Michael S. Tsirkin wrote:
> Calling return copy_to_user(...) in an ioctl will not
> do the right thing if there's a pagefault:
> copy_to_user returns the number of bytes not copied
> in this case.
> 
> Fix up vfio to do
> 	if (copy_to_user(...))
> 		return -EFAULT;
> 
> everywhere.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

Heh.  I don't exactly deserve this credit.

I have updated Smatch to check for this (will push next week probably).
I wouldn't have caught the issues in vfio_platform_common.c because
that's ARM only.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ