drm/i915: fix integer overflow in i915_gem_do_execbuffer()
authorXi Wang <xi.wang@gmail.com>
Mon, 23 Apr 2012 08:06:42 +0000 (04:06 -0400)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 23 Apr 2012 20:32:15 +0000 (22:32 +0200)
commit44afb3a04391a74309d16180d1e4f8386fdfa745
treefeec2dbbdc8a76932bd10289a3532a4b29c6ef6a
parented8cd3b2cd61004cab85380c52b1817aca1ca49b
drm/i915: fix integer overflow in i915_gem_do_execbuffer()

On 32-bit systems, a large args->num_cliprects from userspace via ioctl
may overflow the allocation size, leading to out-of-bounds access.

This vulnerability was introduced in commit 432e58ed ("drm/i915: Avoid
allocation for execbuffer object list").

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c