Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1302200
| From | Mike Snitzer <snitzer@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: dm ioctl: Access user-land memory through safe functions. |
| Date | 2016-01-05 22:20 +0100 |
| Message-ID | <qNHbk-8sH-5@gated-at.bofh.it> (permalink) |
| References | <qAXQC-4Jq-7@gated-at.bofh.it> <qDvbs-5QP-15@gated-at.bofh.it> <qNGfi-7Oo-69@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jan 05 2016 at 3:16pm -0500, Mike Snitzer <snitzer@redhat.com> wrote: > On Tue, Dec 08 2015 at 1:26pm -0500, > Scotty Bauer <sbauer@eng.utah.edu> wrote: > > > Friendly ping, is anyone interested in this? > > The passed @user argument is flagged via __user so it can be > deferenced directly. It does look like directly deferencing > user->version is wrong. > > But even if such indirect access is needed (because __user flag is only > applicable to @user arg, not the contained version member) we could more > easily just do something like this no?: > > uint32_t __user *versionp = (uint32_t __user *)user->version; > ... > if (copy_from_user(version, versionp, sizeof(version))) > return -EFAULT; > > I've staged the following, thanks: > https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.5&id=bffc9e237a0c3176712bcd93fc6a184a61e0df26 Alasdair helped me understand that we do need your original fix. I've staged it for 4.5 (and stable@) here: https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.5&id=ead3db62bf10fe143bec99e7b7ff370d7a6d23ef Thanks again, Mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: dm ioctl: Access user-land memory through safe functions. Mike Snitzer <snitzer@redhat.com> - 2016-01-05 21:20 +0100
Re: dm ioctl: Access user-land memory through safe functions. Mike Snitzer <snitzer@redhat.com> - 2016-01-05 22:20 +0100
Re: dm ioctl: Access user-land memory through safe functions. Scotty Bauer <sbauer@eng.utah.edu> - 2016-01-07 02:30 +0100
Re: dm ioctl: Access user-land memory through safe functions. Mike Snitzer <snitzer@redhat.com> - 2016-01-07 03:10 +0100
csiph-web