From: Dan Carpenter <error27@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: bug report: potential integer overflow in validate_exec_list()
Date: Sat, 20 Nov 2010 21:32:07 +0300 [thread overview]
Message-ID: <20101120183207.GC1522@bicker> (raw)
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
next reply other threads:[~2010-11-20 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 18:32 Dan Carpenter [this message]
2010-11-21 9:23 ` bug report: potential integer overflow in validate_exec_list() Chris Wilson
2010-11-22 9:56 ` Dan Carpenter
2010-11-22 10:35 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101120183207.GC1522@bicker \
--to=error27@gmail.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox