Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* bug report: potential integer overflow in validate_exec_list()
@ 2010-11-20 18:32 Dan Carpenter
  2010-11-21  9:23 ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2010-11-20 18:32 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, dri-devel

Hello Chris,

Is there an integer overflow in validate_exec_list()?

drivers/gpu/drm/i915/i915_gem.c
  3633          size_t length = exec[i].relocation_count * sizeof(struct drm_i915_gem_relocation_entry);
  3634  
  3635          if (!access_ok(VERIFY_READ, ptr, length))
  3636                  return -EFAULT;
  3637  

My concern is that if relocation_count is larger than 0x8000000 the
multiplication can wrap.

This code was added in 2549d6c2 "drm/i915: Avoid vmallocing a buffer for
the relocations"

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-22 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20 18:32 bug report: potential integer overflow in validate_exec_list() Dan Carpenter
2010-11-21  9:23 ` Chris Wilson
2010-11-22  9:56   ` Dan Carpenter
2010-11-22 10:35     ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox