]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: fix integer overflow in i915_gem_execbuffer2()
authorXi Wang <xi.wang@gmail.com>
Mon, 23 Apr 2012 08:06:41 +0000 (04:06 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:39 +0000 (13:14 +0100)
commita9206caacef21a1eeee7083d8fb188cfeb15fd52
treef210aacdd7f6e9ace027d256539fdc5e965a68c7
parent95053b00dba206bb36217801c60bbb612d8160e0
drm/i915: fix integer overflow in i915_gem_execbuffer2()

commit ed8cd3b2cd61004cab85380c52b1817aca1ca49b upstream.

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

This vulnerability was introduced in commit 8408c282 ("drm/i915:
First try a normal large kmalloc for the temporary exec buffers").

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/i915_gem_execbuffer.c