diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-29 11:32:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-29 11:32:05 -0700 |
commit | 65544319372b33d2eed7c56b4864122ad0074670 (patch) | |
tree | c9b6a07f40a9237a052d52b03f2358e3c27aca08 | |
parent | 706b23bde27a391f0974df2a8351661770fa2e07 (diff) | |
parent | 18097b91aaff215e843f04b84ec2c686270bb55f (diff) | |
download | op-kernel-dev-65544319372b33d2eed7c56b4864122ad0074670.zip op-kernel-dev-65544319372b33d2eed7c56b4864122ad0074670.tar.gz |
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 a4b71b2..a30f294 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, if (user_cmd.command_size > PAGE_SIZE - sizeof(union qxl_release_info)) return -EINVAL; + if (!access_ok(VERIFY_READ, + (void *)(unsigned long)user_cmd.command, + user_cmd.command_size)) + return -EFAULT; + ret = qxl_alloc_release_reserved(qdev, sizeof(union qxl_release_info) + user_cmd.command_size, |