diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-29 14:32:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-29 14:32:05 -0400 |
commit | 65544319372b33d2eed7c56b4864122ad0074670 (patch) | |
tree | c9b6a07f40a9237a052d52b03f2358e3c27aca08 | |
parent | 706b23bde27a391f0974df2a8351661770fa2e07 (diff) | |
parent | 18097b91aaff215e843f04b84ec2c686270bb55f (diff) |
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm/qxl fix from Dave Airlie:
"Bad me forgot an access check, possible security issue, but since this
is the first kernel with it, should be fine to just put it in now"
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/qxl: add missing access check for execbuffer ioctl
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c index a4b71b25fa53..a30f29425c21 100644 --- a/drivers/gpu/drm/qxl/qxl_ioctl.c +++ b/drivers/gpu/drm/qxl/qxl_ioctl.c | |||
@@ -171,6 +171,11 @@ static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data, | |||
171 | if (user_cmd.command_size > PAGE_SIZE - sizeof(union qxl_release_info)) | 171 | if (user_cmd.command_size > PAGE_SIZE - sizeof(union qxl_release_info)) |
172 | return -EINVAL; | 172 | return -EINVAL; |
173 | 173 | ||
174 | if (!access_ok(VERIFY_READ, | ||
175 | (void *)(unsigned long)user_cmd.command, | ||
176 | user_cmd.command_size)) | ||
177 | return -EFAULT; | ||
178 | |||
174 | ret = qxl_alloc_release_reserved(qdev, | 179 | ret = qxl_alloc_release_reserved(qdev, |
175 | sizeof(union qxl_release_info) + | 180 | sizeof(union qxl_release_info) + |
176 | user_cmd.command_size, | 181 | user_cmd.command_size, |