Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344253
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH for-4.5] vfio: fix ioctl error handling |
| Date | 2016-02-26 14:50 +0100 |
| Message-ID | <r6qWm-3Zw-9@gated-at.bofh.it> (permalink) |
| References | <r62qZ-37z-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@oracle.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH for-4.5] vfio: fix ioctl error handling "Michael S. Tsirkin" <mst@redhat.com> - 2016-02-25 12:40 +0100
Re: [PATCH for-4.5] vfio: fix ioctl error handling Dan Carpenter <dan.carpenter@oracle.com> - 2016-02-26 14:50 +0100
Re: [PATCH for-4.5] vfio: fix ioctl error handling Alex Williamson <alex.williamson@redhat.com> - 2016-02-28 14:30 +0100
Re: [PATCH for-4.5] vfio: fix ioctl error handling "Michael S. Tsirkin" <mst@redhat.com> - 2016-02-28 15:20 +0100
csiph-web