[PATCH] drm/i915: bounds check execbuffer relocations

2013-03-11 Thread Chris Wilson
On Mon, Mar 11, 2013 at 12:27:16PM -0700, Kees Cook wrote: > It is possible to wrap the counter used to allocate the buffer for > relocation copies. This could lead to heap writing overflows. Seems a sensible check, just in the wrong location. You need to do the checking upfront in

[PATCH] drm/i915: bounds check execbuffer relocations

2013-03-11 Thread Kees Cook
On Mon, Mar 11, 2013 at 1:52 PM, Chris Wilson wrote: > On Mon, Mar 11, 2013 at 12:27:16PM -0700, Kees Cook wrote: >> It is possible to wrap the counter used to allocate the buffer for >> relocation copies. This could lead to heap writing overflows. > > Seems a sensible check, just in the wrong

[PATCH] drm/i915: bounds check execbuffer relocations

2013-03-11 Thread Kees Cook
It is possible to wrap the counter used to allocate the buffer for relocation copies. This could lead to heap writing overflows. Signed-off-by: Kees Cook Reported-by: Pinkie Pie Cc: stable at vger.kernel.org --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 -- 1 file changed, 8

Re: [PATCH] drm/i915: bounds check execbuffer relocations

2013-03-11 Thread Chris Wilson
On Mon, Mar 11, 2013 at 12:27:16PM -0700, Kees Cook wrote: It is possible to wrap the counter used to allocate the buffer for relocation copies. This could lead to heap writing overflows. Seems a sensible check, just in the wrong location. You need to do the checking upfront in

Re: [PATCH] drm/i915: bounds check execbuffer relocations

2013-03-11 Thread Kees Cook
On Mon, Mar 11, 2013 at 1:52 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Mar 11, 2013 at 12:27:16PM -0700, Kees Cook wrote: It is possible to wrap the counter used to allocate the buffer for relocation copies. This could lead to heap writing overflows. Seems a sensible check,