From: Hans Verkuil <hansverk@cisco.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: hans.verkuil@cisco.com, linux-media@vger.kernel.org
Subject: Re: [media] v4l2-subdev: add support for the new edid ioctls
Date: Wed, 26 Sep 2012 10:13:34 +0200 [thread overview]
Message-ID: <201209261013.34299.hansverk@cisco.com> (raw)
In-Reply-To: <20120926080106.GA5268@elgon.mountain>
On Wed 26 September 2012 10:01:06 Dan Carpenter wrote:
> Hi Hans,
>
> The patch ed45ce2cc0b3: "[media] v4l2-subdev: add support for the new
> edid ioctls" from Aug 10, 2012, needs an overflow check the same as the
> other cases in that switch statement.
>
> drivers/media/v4l2-core/v4l2-ioctl.c
>
> 2200 case VIDIOC_SUBDEV_G_EDID:
> 2201 case VIDIOC_SUBDEV_S_EDID: {
> 2202 struct v4l2_subdev_edid *edid = parg;
> 2203
> 2204 if (edid->blocks) {
> 2205 *user_ptr = (void __user *)edid->edid;
> 2206 *kernel_ptr = (void *)&edid->edid;
> 2207 *array_size = edid->blocks * 128;
> ^^^^^^^^^^^^^^^^^^
> This can overflow.
>
> 2208 ret = 1;
> 2209 }
> 2210 break;
> 2211 }
True. Thanks for reporting this! I'll make a fix for it.
Regards,
Hans
prev parent reply other threads:[~2012-09-26 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 8:01 [media] v4l2-subdev: add support for the new edid ioctls Dan Carpenter
2012-09-26 8:13 ` Hans Verkuil [this message]
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=201209261013.34299.hansverk@cisco.com \
--to=hansverk@cisco.com \
--cc=dan.carpenter@oracle.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.